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

Allow package managers to have their own sub-directories under a workspace's software dir #703

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

douglasjacobsen
Copy link
Collaborator

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.

@douglasjacobsen douglasjacobsen added bug Something isn't working enhancement New feature or request labels Oct 17, 2024
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")
Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants