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

Allowing flags to be passed via env variables or external files #52

Open
idomic opened this issue Jan 31, 2023 · 3 comments
Open

Allowing flags to be passed via env variables or external files #52

idomic opened this issue Jan 31, 2023 · 3 comments
Labels
good first issue Good for newcomers

Comments

@idomic
Copy link
Contributor

idomic commented Jan 31, 2023

We should do it explicitly, and then make sure we support an external file or an env variable so users don't have to repeat those multiple times.

Ref: ploomber/ploomber-engine#37

@idomic idomic added the good first issue Good for newcomers label Mar 14, 2023
@edublancas
Copy link
Contributor

I like how pytest does this: https://docs.pytest.org/en/7.1.x/example/simple.html

@idomic
Copy link
Contributor Author

idomic commented Mar 18, 2023

Yeah, that sounds like a common pattern we can embrace:

Either via an engine.ini

[ploomber-engine]
flags = -ra -q

Or via setting a shared env var:
export ENGINE_FLAGS="-v"

Or the existing command-line built in mechanism:
ploomber-engine input.ipynb output.ipynb --remove-tagged-cells some-tag

@edublancas edublancas transferred this issue from ploomber/ploomber-engine Mar 18, 2023
@edublancas
Copy link
Contributor

Ok so I transferred this issue from ploomber-engine to core. We can implement the logic here to add it to other packages.

One thing I forgot to mention is that pytest supports multiple config files (there isn't a standard in the Python ecosystem, so I guess they decided to support them all)

https://docs.pytest.org/en/7.1.x/reference/customize.html

The most important ones are {package}.ini and pyproject.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants