Comments (4)
yes, I think you are correct on all points here.
Having an i_accept
flag makes sense as it lets another interface wrap this to get the acceptance some other way.
I'll need to think a little more. But I think that all make sense.
I'm iffy over my use of the function name download
at all.
Maybe manually_resolve
might be better.
from datadeps.jl.
For the sake of completeness, this is how I currently do it in the PR
function with_accept(f, manual_overwrite)
auto_accept = if manual_overwrite == nothing
get(ENV, "DATADEPS_ALWAY_ACCEPT", false)
else
manual_overwrite
end
withenv(f, "DATADEPS_ALWAY_ACCEPT" => string(auto_accept))
end
function download_dep(depname,
dir = DataDeps.determine_save_path(depname);
i_accept_the_terms_of_use = nothing)
datadep = DataDeps.registry[depname]
with_accept(i_accept_the_terms_of_use) do
DataDeps.download(datadep, dir)
nothing
end
end
The intended purpose is to always trigger the download, even if the dataset is found. Which it currently happily does. I am guessing the rename to manually_resolve
you propose doesn't imply changing the behaviour, right?
from datadeps.jl.
I think the name i_accept_the_terms_of_use
is not quiet right.
In that the Y/N is not just terms of use, it is also "I accept that this will be downloaded",
and further some things (that are public domain for example) may have no terms of use.
from datadeps.jl.
I guess though it does really get the message across, so it will do for now.
from datadeps.jl.
Related Issues (20)
- Download problem: file name too long HOT 3
- Prompt fails on Pluto HOT 4
- Documentation badge links do not work HOT 5
- ERROR: HTTP.ExceptionRequest.StatusError HOT 1
- DataDeps.jl behavor in CI when a file cannot be read HOT 3
- Ability to silence 7zip output HOT 3
- datadep hanging HOT 1
- Closer integration with DrWatson HOT 2
- Better errors when the host is down HOT 2
- Garbage collection functionality HOT 7
- Error when using paths containing tilde HOT 1
- DataDeps doesn't build on aarch64-apple-darwin HOT 1
- display download progress bar HOT 2
- failed to install the latest DataDeps version in Julia-1.9 dev HOT 2
- Use case: nested data deps? HOT 2
- Documentation website is outdated, `gh-pages` is not being updated HOT 1
- Flush(stdout) before checking if accept terms
- Experience with Dropbox HOT 1
- Nondeterministic error in CI saying there is no writable folder in the load path HOT 5
- Change to scratch breaking? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datadeps.jl.