Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPass profile to constructor #7
Conversation
kba
added some commits
Nov 6, 2018
This comment has been minimized.
This comment has been minimized.
kba
added some commits
Nov 13, 2018
This comment has been minimized.
This comment has been minimized.
Hi, thanks. I merged master into #8 and rebased the other PRs against #8, so a sensible order would be:
If you are okay with all of these and don't want to resolve conflicts, feel free to merge my dev branch into master, it contains these commits and will mark all the PR as merged. |
This comment has been minimized.
This comment has been minimized.
Let's do them separate, so we have commits for each. |
ruebot
requested changes
Nov 13, 2018
Just need to change the URL here, and we're good to go.
import bagit | ||
from bagit_profile import Profile | ||
PROFILE_URL = 'https://raw.github.com/ruebot/bagit-profiles/master/bagProfileBar.json' |
This comment has been minimized.
This comment has been minimized.
ruebot
Nov 13, 2018
Collaborator
Might as well change this to the newer url even though GitHub is nice enough to redirect; https://raw.githubusercontent.com/bagit-profiles/bagit-profiles/master/bagProfileBar.json
# Test on unzipped Bag. | ||
self.assertTrue(self.profile.validate_serialization(os.path.abspath("test-bar"))) | ||
# Test on zipped Bag. | ||
self.profile = Profile('https://raw.github.com/ruebot/bagit-profiles/master/bagProfileFoo.json') |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kba
Nov 13, 2018
Contributor
I updated the URLs here and in the test assets to consistently point to
https://raw.github.com/bagit-profiles/bagit-profiles/master/bagProfileBar.json
This comment has been minimized.
This comment has been minimized.
They are still separate commits, it just has the branches merged with conflicts resolved. |
This comment has been minimized.
This comment has been minimized.
Oh, I mean squashed commits for each unit of work in the pull requests. |
kba commentedNov 7, 2018
Adds the possibility to pass the profile as a constructor arg, circumventing fetching via HTTP. The
url
parameter is still required. Here's the unit test to see what it does:We need to run many processes to quickly check profile adherence and running the same HTTP request over and over seems wasteful. When testing, it's also easier to pass a local profile. But we still need to verify that the
BagIt-Profile-Identifier
matches.(blocked by #5)