GithubHelp home page GithubHelp logo

Comments (4)

patr1ckm avatar patr1ckm commented on July 26, 2024

Yes. I think adding a runs argument would handle this, and allow fetching of more script related functions like scripts_post_containers.

from civis-r.

crich011 avatar crich011 commented on July 26, 2024

Ah, so are you imagining adding runs as an argument option to fun_type along with adding patch as an argument option to verb, for example? In such a case, what do you imagine as the trade-off between client-end vs. user-end checking to ensure that the function it returns is valid?

For example, would trying to verify with something like exists("scripts_post_containers", where = "package:civis", mode = "function") work? (That seems like a simpler and better approach than the hacky series of asserts that I had in mind.)

from civis-r.

patr1ckm avatar patr1ckm commented on July 26, 2024

Ah, so are you imagining adding runs as an argument option to fun_type along with adding patch as an argument option to verb, for example?

Yes!

what do you imagine as the trade-off between client-end vs. user-end checking to ensure that the function it returns is valid?

Great q. The get call in get_script_fun returns the function in the package if it's available, and fails otherwise. Your suggestion using exists works similarly! Since the user of the function is the developer, it's on the developer to make sure that usage checks out. An end-user will experience a failure here as a cryptic error, but is a bug.

from civis-r.

crich011 avatar crich011 commented on July 26, 2024

Ahh, cool! I didn't realize that get did that! (Here I was imagining some complicated set of checks and it was already happening right under my nose!)

from civis-r.

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.