-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing )
Clumsy merge. But this will get squashed anyways, am I right? |
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) |
@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. 😉 |
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.
Squashed and CI passed. |
Nice work @helgee. Good candidate to add to Compat so packages can start using it. |
x-ref: #12120