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

remove shelling out from example #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/z20-for-pkg-devs.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ For example:
```
register(DataDep("eg", "eg message",
["http//example.com/text.txt", "http//example.com/sub1.zip", "http//example.com/sub2.zip"]
post_fetch_method = [identity, file->run(`unzip $file`), file->run(`unzip $file`)]
post_fetch_method = [identity, unpack, unpack]
))
```
So `identity` (i.e. nothing) will be done to the first paths resulting file, and the second and third will be unzipped.
Expand All @@ -168,7 +168,7 @@ can also be written:
```
register(DataDep("eg", "eg message",
["http//example.com/text.txt", ["http//example.com/sub1.zip", "http//example.com/sub2.zip"]]
post_fetch_method = [identity, file->run(`unzip $file`)]
post_fetch_method = [identity, unpack]
))
```
The unzip will be applied to both elements in the child array
Expand Down Expand Up @@ -199,7 +199,7 @@ The hierachy of methods for acquiring a datadep is:
`datadep"name/path"` ▶ `resolve("name/path", @__FILE__)` ▶ `resolve(::AbstractDataDep, "name", @__FILE__)` ▶ `download(::DataDep)`

One can make use of this at various levels to override the default generally sane behavior.
Most of the time you shouldn't have to -- the normal point of customization is in setting the `post_fetch_method`, and occasionally `fetch_method` or `hash=(hashmethod, key)`.
Most of the time you shouldn't have to -- the normal point of customization is in setting the `post_fetch_method`, and occasionally `fetch_method` or `hash=(hashmethod, key)`.


## `download` for low-level programmatic resolution.
Expand Down