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
API for managing SIP models #26
Conversation
- added class `SIPMetadata` to be able to have multiple metadata - added attribute `archive` (boolean) to say if the content should be archived or not
- updated the model views to integrate the new fields - added the model view for SIPMetadata with links to SIP
a670152
to
8ff0b8f
Compare
8ff0b8f
to
50e0313
Compare
@@ -66,7 +67,7 @@ | |||
'invenio-accounts>=1.0.0a10', | |||
'invenio-pidstore>=1.0.0a7', | |||
'invenio-jsonschemas>=1.0.0a3', | |||
'invenio-files-rest>=1.0.0a1', | |||
'invenio-files-rest>=1.0.0a14', |
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.
to use the bump version of fs: inveniosoftware/invenio-files-rest@bd3f879
invenio_sipstore/models.py
Outdated
@@ -71,24 +65,35 @@ class SIP(db.Model, Timestamp): | |||
agent = db.Column(JSONType, default=lambda: dict(), nullable=False) | |||
"""Agent information regarding given SIP.""" | |||
|
|||
archivable = db.Column( | |||
db.Boolean(name='ck_sip_archivable'), |
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.
ck_sipstore_archivable
- add a signal when a SIP is created from the API - 2 API classes: SIP and RecordSIP to manage the models based on Zenodo: https://github.com/zenodo/zenodo/blob/master/zenodo/modules/sipstore/api.py - add a function to automatically find the current storage location of a SIPFile - add a config variable to generate agent of the SIPs - updated tests
50e0313
to
f034df6
Compare
ready to merge |
The created model is stored in the attribute 'model'. | ||
:param bool archivable: tells if the SIP should be archived or not. | ||
Usefull if ``Invenio-Archivematica`` is installed. | ||
:param list files: The list of files to associate with the SIP. See |
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.
is :param <type> <name>
a standard?
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.
@@ -71,24 +65,35 @@ class SIP(db.Model, Timestamp): | |||
agent = db.Column(JSONType, default=lambda: dict(), nullable=False) | |||
"""Agent information regarding given SIP.""" | |||
|
|||
archivable = db.Column( |
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.
Is this flag necessary? perhaps we could reduce it to a single "state" flag (enum)?
Support for Invenio-Archivematica (see #25)
archivable
andarchived
booleans on SIPSIPMetadata
table to enable the storage of multiple metadataAPI based on https://github.com/zenodo/zenodo/blob/master/zenodo/modules/sipstore/api.py