Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @__DIR__ and document use in pkgs. Fix #12120 #18380

Merged
merged 1 commit into from
Sep 7, 2016

Conversation

helgee
Copy link
Contributor

@helgee helgee commented Sep 6, 2016

x-ref: #12120

@tkelman tkelman added needs tests Unit tests are required for this change needs docs Documentation for this change is required labels Sep 6, 2016
@helgee
Copy link
Contributor Author

helgee commented Sep 7, 2016

Added tests and docs.

package ``FooBar`` needs to load ``foo.csv`` from the ``data`` directory, use the following code::

datapath = joinpath(@__DIR__, "..", "data")
foo = readcsv(joinpath(datapath, "foo.csv")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing )

@tkelman tkelman removed needs docs Documentation for this change is required needs tests Unit tests are required for this change labels Sep 7, 2016
@helgee
Copy link
Contributor Author

helgee commented Sep 7, 2016

Clumsy merge. But this will get squashed anyways, am I right?

@tkelman
Copy link
Contributor

tkelman commented Sep 7, 2016

it should if you don't want to do it yourself (best to make pr's from branches other than master of your fork in the future)

@helgee
Copy link
Contributor Author

helgee commented Sep 7, 2016

@tkelman Forgetting to branch belongs to the things that happen in those quick-fix PRs past one's bedtime. I promise to be fully awake next time. 😉

@tkelman
Copy link
Contributor

tkelman commented Sep 7, 2016

oh and the squash merge should remember to remove the [ci skip]s from the intermediate commits since you do want ci to run on the merge.

Add test.

Add docs.

Move docstrings for @__FILE__ and @__DIR__ inline.

Missing paren.

Rephrase example.
@helgee
Copy link
Contributor Author

helgee commented Sep 7, 2016

Squashed and CI passed.

@StefanKarpinski StefanKarpinski merged commit 11ff9ab into JuliaLang:master Sep 7, 2016
@tkelman
Copy link
Contributor

tkelman commented Sep 7, 2016

Nice work @helgee. Good candidate to add to Compat so packages can start using it.

@helgee
Copy link
Contributor Author

helgee commented Sep 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants