making stashcp a package not a module (SOFTWARE-3799)#106
Merged
djw8605 merged 5 commits intoopensciencegrid:masterfrom Oct 2, 2019
Merged
making stashcp a package not a module (SOFTWARE-3799)#106djw8605 merged 5 commits intoopensciencegrid:masterfrom
djw8605 merged 5 commits intoopensciencegrid:masterfrom
Conversation
…ng the caches.json file (software-3799)
djw8605
requested changes
Sep 24, 2019
Member
djw8605
left a comment
There was a problem hiding this comment.
Can you fix the tests as well. They seem to want StashCache/stashcp.py.
added 2 commits
October 1, 2019 01:39
Member
|
Looks like the tests are failing to find caches.json anywhere? Previously it worked because stashcp would try to look at the directory that it was running in. but that was removed. Should it be added back? |
Author
|
What if we instead install the package (pip install StashCache/) and let it read the file from /share/stashcache ? I think that testing this way is more appropriate, what do you think? |
Member
|
Agreed, install stashcache before testing it. |
Member
|
Probably have to install |
Author
|
Tests are fine now, do everything else look fine? |
djw8605
approved these changes
Oct 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When installed as a package, the option package_data can be used to put caches.json within the package directory.
We still use data_files to put caches.json outside the package directory, in <sys.prefix>/share/stashcache, the later location of caches.json has precedence over the one inside the package directory and /etc/stashcache takes precedence over both of them.
/etc/stashcache/caches.json is not created by the installation process if needed has to be created by the user.