Skip to content

Commit

Permalink
Update storage service to use PREMIS 3
Browse files Browse the repository at this point in the history
This commit updates the storage service to use PREMIS 3 in pointer
file generation. Various components have been touched upon including
initial ingest, replication, and then reingest.

The commit history is summarized as follows:

* Update metsrw.
* Use PREMIS 3 in pointer METS file.
* Consolidate pointer file generation logic.
* Timezone aware timestamp added to pointer file generation.
* Various code-review and test follow-up changes.
  • Loading branch information
cole authored and ross-spencer committed Jun 12, 2019
1 parent 5fb80c5 commit cf231e4
Show file tree
Hide file tree
Showing 12 changed files with 508 additions and 574 deletions.
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gunicorn==19.9.0
jsonfield==2.0.1
logutils==0.3.4.1
lxml==3.7.3
metsrw==0.3.1
metsrw==0.3.8
ndg-httpsclient==0.4.2
python-gnupg==0.4.0
python-keystoneclient==3.10.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ keystoneauth1==3.14.0 # via python-keystoneclient
logutils==0.3.4.1
git+https://github.com/seatme/django-longer-username.git@seatme#egg=longerusername
lxml==3.7.3
metsrw==0.3.1
metsrw==0.3.8
monotonic==1.5 # via oslo.utils
msgpack==0.6.1 # via oslo.serialization
mysqlclient==1.4.2.post1 # via agentarchives
Expand Down
2 changes: 1 addition & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ logutils==0.3.4.1
git+https://github.com/seatme/django-longer-username.git@seatme#egg=longerusername
lxml==3.7.3
markupsafe==1.1.1 # via jinja2
metsrw==0.3.1
metsrw==0.3.8
monotonic==1.5
msgpack==0.6.1
mysqlclient==1.4.2.post1
Expand Down
2 changes: 1 addition & 1 deletion requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ keystoneauth1==3.14.0
logutils==0.3.4.1
git+https://github.com/seatme/django-longer-username.git@seatme#egg=longerusername
lxml==3.7.3
metsrw==0.3.1
metsrw==0.3.8
monotonic==1.5
msgpack==0.6.1
mysqlclient==1.4.2.post1
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ keystoneauth1==3.14.0
logutils==0.3.4.1
git+https://github.com/seatme/django-longer-username.git@seatme#egg=longerusername
lxml==3.7.3
metsrw==0.3.1
metsrw==0.3.8
mock==3.0.5 # via pytest-mock, vcrpy
monotonic==1.5
more-itertools==5.0.0 # via pytest
Expand Down
8 changes: 4 additions & 4 deletions storage_service/common/management/commands/import_aip.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
from django.utils.six.moves import input

from administration.models import Settings
from common import utils
from common import premis, utils
from locations import models


Expand Down Expand Up @@ -360,7 +360,7 @@ def compress(aip_model_inst, compression_algorithm):
"""Use the Package model's compress_package method to compress the AIP
being imported, update the Package model's ``size`` attribute, retrieve
PREMIS agents and event for the compression (using the package model's
``get_premis_aip_compression_event`` method) and return a 3-tuple:
``create_premis_aip_compression_event`` method) and return a 3-tuple:
(aip_model_inst, compression_event, compression_agents).
"""
if not compression_algorithm:
Expand All @@ -379,8 +379,8 @@ def compress(aip_model_inst, compression_algorithm):
aip_model_inst.current_path = new_current_path
shutil.rmtree(compressed_aip_parent_path)
aip_model_inst.size = utils.recalculate_size(new_full_path)
compression_agents = utils.get_ss_premis_agents()
compression_event = aip_model_inst.get_premis_aip_compression_event(
compression_agents = [premis.SS_AGENT]
compression_event = premis.create_premis_aip_compression_event(
details["event_detail"],
details["event_outcome_detail_note"],
agents=compression_agents,
Expand Down
Loading

0 comments on commit cf231e4

Please sign in to comment.