-
Notifications
You must be signed in to change notification settings - Fork 169
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
Modified the isisVarInit.py script #3945
Conversation
internally, and made it write out isis-activate.* and isis_deactivate.* files.
isis/scripts/isisVarInit.py
Outdated
csh = dict( | ||
extension=".csh", | ||
shebang="#!/usr/bin/env csh", | ||
activate="setenv {}={}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setenv doesn't use an =, this should be setenv {} {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I did mention that I didn't test it.
isis/scripts/isisVarInit.py
Outdated
|
||
|
||
def mkdir(p: Path): | ||
# This just wraps and reports on the directory creation: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convert this to a proper doc-string to match the other helper functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did. I also altered this to return a string instead of None. I don't like functions calling print() (unless I'm debugging).
and to return a string (only main should print(), functions shouldn't or should log, but that's overkill for this).
Description
isis-activate.*
andisis-deactivate.*
files instead of the genericenv_vars.*
filenames.Related Issue
Motivation and Context
I couldn't stand all the leading spaces, and since I was in the code already, I also addressed the above issues.
How Has This Been Tested?
I copied this script into the $CONDA_PREFIX/scripts/ directory of a ISIS 4.1.0 environment, and it seemed to do all the right things in my zsh shell, but did not test csh or fish.
Types of changes
Checklist:
Licensing
This project is mostly composed of free and unencumbered software released into the public domain, and we are unlikely to accept contributions that are not also released into the public domain. Somewhere near the top of each file should have these words: