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

feat: CLI options can be supplied using env vars #18

Merged
merged 2 commits into from
Mar 6, 2025

Conversation

183amir
Copy link
Collaborator

@183amir 183amir commented Mar 6, 2025

Although sbatch already allows providing values for options through SBATCH_ prefixed env vars, not all options are supported. This change adds support for all options of sbatch through a GRIDTK_SUBMIT_ prefix. For example, to always get emails when a job finishes, you can set GRIDTK_SUBMIT_MAIL_USER to your email address and GRIDTK_SUBMIT_MAIL_TYPE to END. This is useful when you have a set of options that you always want to use, but don't want to specify them every time you submit a job. Of course, other gridtk commands such as gridtk resubmit options can also be set using environment variables like: export GRIDTK_RESUBMIT_STATE=ALL.

fix: explicitly speficy the sphinx.configuration key in Read the Docs setup


📚 Documentation preview 📚: https://gridtk--18.org.readthedocs.build/en/18/

Although sbatch already allows providing values for options through SBATCH_ prefixed env vars, not all options are supported. This change adds support for all options of sbatch through a GRIDTK_SUBMIT_ prefix. For example, to always get emails when a job finishes, you can set GRIDTK_SUBMIT_MAIL_USER to your email address and GRIDTK_SUBMIT_MAIL_TYPE to END. This is useful when you have a set of options that you always want to use, but don't want to specify them every time you submit a job.
@183amir 183amir requested a review from Yannick-Dayer March 6, 2025 11:03
@183amir 183amir self-assigned this Mar 6, 2025
Copy link

github-actions bot commented Mar 6, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/gridtk
  cli.py
  manager.py
  models.py
Project Total  

This report was generated by python-coverage-comment-action

@183amir 183amir requested review from sgaist and anjos March 6, 2025 11:10
@@ -16,3 +16,6 @@ python:
path: .
extra_requirements:
- doc

sphinx:
configuration: doc/conf.py
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@183amir 183amir merged commit ae6b0ae into main Mar 6, 2025
10 checks passed
@183amir 183amir deleted the cli-options-from-env-var branch March 6, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants