Giter Club home page Giter Club logo

Comments (4)

oxinabox avatar oxinabox commented on June 13, 2024

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.

Evizero avatar Evizero commented on June 13, 2024

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.

oxinabox avatar oxinabox commented on June 13, 2024

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.

oxinabox avatar oxinabox commented on June 13, 2024

I guess though it does really get the message across, so it will do for now.

from datadeps.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.