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

Add sudo_options & 'env' parameters to run_command #167

Merged
merged 9 commits into from
Sep 17, 2020

Conversation

cceyda
Copy link
Contributor

@cceyda cceyda commented Sep 14, 2020

  • add the sudo_options parameter to some commands that were missing it (instance: start & stop, list_instances)

  • add an env parameter for passing environment variables to Client.instance and Client.execute
    I have been using spython to start some services dynamically and often found myself wanting to pass some environment variables, adding an 'env' parameter like this was a cleaner solution for me.
    If this is problematic and there is another way to pass many environment variables cleanly let me know

Copy link
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

This looks great! Please see my suggestion to use environ instead of env across functions. Then the final tweaks that will make it good for merge:

  • please update the CHANGELOG with detail to the addition
  • bump the version in spython/version.py

spython/instance/cmd/start.py Outdated Show resolved Hide resolved
Copy link
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

This looks good to me! Let me know when you are all finished and we can merge and release.

@vsoch
Copy link
Member

vsoch commented Sep 15, 2020

@cceyda
Copy link
Contributor Author

cceyda commented Sep 16, 2020

Looks like a lot of files(47) need to reformatted to pass that test and there are differences between different checks, what should I do?
spython-ci / formatting uses -> black-19.10b0
ci/circleci: Singularity 3.2.1 - Python 3 uses -> black-20.8b1

@vsoch
Copy link
Member

vsoch commented Sep 16, 2020

heyo! Sorry for the delay! I just updated master with pinning a black version (and making the lints) so you should be able to rebase and update the PR here. fb33495

merge: running black-20.8b1 for linting, pinning version in testing (singularityhub#168)
@cceyda
Copy link
Contributor Author

cceyda commented Sep 17, 2020

~ Done ~

@vsoch vsoch merged commit 4542532 into singularityhub:master Sep 17, 2020
@vsoch
Copy link
Member

vsoch commented Sep 17, 2020

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