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

Saves metadata from bag-info.txt to application #133

Merged
merged 17 commits into from Dec 11, 2017
Merged

Conversation

helrond
Copy link
Member

@helrond helrond commented Nov 20, 2017

Adds models for metadata in bag-info.txt, as per #125. Started to add this data into views, but leaving most of that work for other PRs.

This is branched from #132, so that should be merged first.

bagit_profile_identifier = models.URLField()

@classmethod
def save_metadata(cls, metadata, archive=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This would be more useful as a method of Archives just like get_bag_data should be a save_bag_data, that way you don't need to expose another object, and prevents class method.
  • also, foreign key shouldn't be blank or null

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-And if logic needs to be in try/catch then return bool so code can react to it.

@helrond
Copy link
Member Author

helrond commented Nov 28, 2017

This is ready for another look!

Copy link
Contributor

@dboutmybizness dboutmybizness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@helrond I'll send you dump of the database that you'd be able to apply migrations too successfully (ideally what will happen when we go live)

Also, I made this a part of the ERROR Routine so you'll have to add BIERR to the ecodes..

@helrond
Copy link
Member Author

helrond commented Nov 29, 2017

@dboutmybizness your changes look good to me.

As I was testing, I discovered a host of problems that occur when the bag metadata is saved before validation is complete, so I have moved that function down in the bag_checker.py sequence.

@dboutmybizness
Copy link
Contributor

@helrond are you working on changes here?

@helrond
Copy link
Member Author

helrond commented Nov 30, 2017

@dboutmybizness I am done with my work on this PR, unless you see issues that need to be addressed.

@helrond helrond mentioned this pull request Dec 4, 2017
Copy link
Contributor

@dboutmybizness dboutmybizness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good to go, I updated migrations, couple small tweaks, and NOTE: BIERR prior to launch live.

@dboutmybizness dboutmybizness merged commit f4f8f64 into master Dec 11, 2017
@helrond helrond deleted the bag-info branch December 21, 2017 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants