Coder Social home page Coder Social logo

"Dynamic" recipes about databooks HOT 2 CLOSED

datarootsio avatar datarootsio commented on May 30, 2024
"Dynamic" recipes

from databooks.

Comments (2)

nicogelders avatar nicogelders commented on May 30, 2024

The --help thing might be tricky maybe do something like this

databooks inspect-recipe max_cells

from databooks.

murilo-cunha avatar murilo-cunha commented on May 30, 2024

After some thought, I see 3 ways of accomplishing this:

  1. We could allow extra arguments and if they are passed we replace the string with the right values
  2. We could dynamically create subcommands - one for each recipe with it's own help and call each subcommand after assert has run
  3. Create another command entirely for recipes

Some points to consider:

  • What if the user passes multiple recipes?
  • What if the arguments have similar names?
  • How can we enforce that the arguments go to the correct recipe?

As of now, I do not see a feature like this because

  • It may make the app less intuitive for users and add some unnecessary complexity
  • We only have one recipe that it'd make sense to pass arguments (max-cells)
  • If a user really wants another value, he/she can easily do this by passing the expression instead of the recipe + argument (databooks assert "len(nb.cells) < 10")

That being said, I'm open to revisit this once we have more recipes/there's community interest in a feature like this. If there's a simple way to go around this I'm also open to review any PRs regarding this.

Thanks for your suggestion! 🚀

from databooks.

Related Issues (13)

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.