-
Notifications
You must be signed in to change notification settings - Fork 27
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
Allow package managers to have their own sub-directories under a workspace's software dir #703
base: develop
Are you sure you want to change the base?
Allow package managers to have their own sub-directories under a workspace's software dir #703
Conversation
def package_manager_dir(self, package_manager): | ||
if package_manager is not None: | ||
return os.path.join(self.software_dir, package_manager.name) | ||
return os.path.join(self.software_dir, "no-package-manager") |
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.
Do you think when package_manager
is the "no package manager" package manager it should still have a valid object to give a more consistent interface?
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 don't dislike the idea, but I also can't decide what is a reasonable name for that package manager.
TBF, I think this case should never happen (because if the package manager is none, then it will never actually try to create a software environment, and it won't need to have it's own directory).
So this is more a very unnecessary fallback mode to avoid some gross error from popping up if you call this method without a package manager.
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 updated this so that the package_manager_dir
is an attribute of the package manager, rather than the workspace. This should get around the error case where package_manager
is None now to help simplify the interface.
1e232bd
to
a6bc0c2
Compare
This commit allows package managers to have their own directories to house their software environments. This allows experiments in the same workspace that use the same named environment but different package managers to not have collisions on the environment directory.
a6bc0c2
to
c406f8a
Compare
This merge allows a workspace to have multiple package manager directories under the
software
directory, which can be used to house independent software environments.This allows the same named environment to render differently for different experiments (if needed) without causing collisions.
Tests and documentation are updated for this as well.