diff --git a/PKG-INFO b/PKG-INFO index 19c0b5f6e29751519b7837a070581a9604dcf7ee..7f290ef4c9c403d7645464912ec4dbda077c282b 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: swh.deposit -Version: 0.0.35 +Version: 0.0.36 Summary: Software Heritage Deposit Server Home-page: https://forge.softwareheritage.org/source/swh-deposit/ Author: Software Heritage developers diff --git a/debian/control b/debian/control index 02e28978ad0a0d57d21f7ab42fe0ad87d5733be1..bf63c944fcd1b7add05d62edb8c335b32e1ad4f3 100644 --- a/debian/control +++ b/debian/control @@ -9,9 +9,9 @@ Build-Depends: debhelper (>= 9), python3-nose, python3-django-nose, python3-vcversioner, - python3-swh.core (>= 0.0.14~), + python3-swh.core (>= 0.0.36~), python3-swh.loader.core (>= 0.0.26~), - python3-swh.loader.tar (>= 0.0.31~), + python3-swh.loader.tar (>= 0.0.32~), python3-swh.scheduler (>= 0.0.19~), python3-django, python3-click, @@ -24,8 +24,7 @@ Homepage: https://forge.softwareheritage.org/source/swh-deposit/ Package: python3-swh.deposit Architecture: all -Depends: python3-swh.core (>= 0.0.14~), - python3-swh.loader.tar (>= 0.0.31~), +Depends: python3-swh.core (>= 0.0.36~), python3-swh.scheduler (>= 0.0.19~), ${misc:Depends}, ${python3:Depends} Description: Software Heritage Deposit Server @@ -33,9 +32,9 @@ Description: Software Heritage Deposit Server Package: python3-swh.deposit.loader Conflict: python3-swh.deposit.injection Architecture: all -Depends: python3-swh.core (>= 0.0.14~), +Depends: python3-swh.core (>= 0.0.36~), python3-swh.loader.core (>= 0.0.26~), - python3-swh.loader.tar (>= 0.0.31~), + python3-swh.loader.tar (>= 0.0.32~), python3-swh.scheduler (>= 0.0.19~), python3-requests, ${misc:Depends}, ${python3:Depends} diff --git a/requirements-swh.txt b/requirements-swh.txt index 4dbc28a47615a12b427c568b5a61d4cae6a2ef66..cc996a85f07d0b83449cc2b75577d4b2fb86a06b 100644 --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,4 +1,4 @@ -swh.core >= 0.0.14 -swh.loader.tar >= 0.0.31 +swh.core >= 0.0.36 +swh.loader.tar >= 0.0.32 swh.loader.core >= 0.0.26 swh.scheduler >= 0.0.19 diff --git a/swh.deposit.egg-info/PKG-INFO b/swh.deposit.egg-info/PKG-INFO index 19c0b5f6e29751519b7837a070581a9604dcf7ee..7f290ef4c9c403d7645464912ec4dbda077c282b 100644 --- a/swh.deposit.egg-info/PKG-INFO +++ b/swh.deposit.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: swh.deposit -Version: 0.0.35 +Version: 0.0.36 Summary: Software Heritage Deposit Server Home-page: https://forge.softwareheritage.org/source/swh-deposit/ Author: Software Heritage developers diff --git a/swh.deposit.egg-info/requires.txt b/swh.deposit.egg-info/requires.txt index 22235338c97edfd493f5ec6f9df5ecc4256460bc..3094da0decc98a33e4258c3a118437969faa85c5 100644 --- a/swh.deposit.egg-info/requires.txt +++ b/swh.deposit.egg-info/requires.txt @@ -2,9 +2,9 @@ Django click djangorestframework djangorestframework-xml -swh.core>=0.0.14 +swh.core>=0.0.36 swh.loader.core>=0.0.26 -swh.loader.tar>=0.0.31 +swh.loader.tar>=0.0.32 swh.scheduler>=0.0.19 vcversioner diff --git a/swh/deposit/api/private/deposit_read.py b/swh/deposit/api/private/deposit_read.py index 98a6e27394c7ac4d309c8891ee39fdfeec1a0b65..3413419a46bade778419dd19cf7bee7cfad16442 100644 --- a/swh/deposit/api/private/deposit_read.py +++ b/swh/deposit/api/private/deposit_read.py @@ -12,9 +12,10 @@ from contextlib import contextmanager from django.http import FileResponse from rest_framework import status -from swh.loader.tar import tarball +from swh.core import tarball from swh.model import identifiers +from ...config import SWH_PERSON from ..common import SWHGetDepositAPI, SWHPrivateAPIView from ...models import Deposit, DepositRequest @@ -177,11 +178,7 @@ class SWHDepositReadMetadata(SWHGetDepositAPI, SWHPrivateAPIView): # revision fullname = deposit.client.get_full_name() - author_committer = { - 'name': deposit.client.last_name, - 'fullname': fullname, - 'email': deposit.client.email, - } + author_committer = SWH_PERSON # metadata provider self.provider['provider_name'] = deposit.client.last_name diff --git a/swh/deposit/config.py b/swh/deposit/config.py index 92cf1526bccbcb416c010ba9df8f8148a51fc532..f2da70d6f7dd79df0337e61fe3beca833b8ba554 100644 --- a/swh/deposit/config.py +++ b/swh/deposit/config.py @@ -35,6 +35,13 @@ DEPOSIT_STATUS_READY_FOR_CHECKS = 'ready-for-checks' DEPOSIT_STATUS_LOAD_SUCCESS = 'success' DEPOSIT_STATUS_LOAD_FAILURE = 'failure' +# Revision author for deposit +SWH_PERSON = { + 'name': 'Software Heritage', + 'fullname': 'Software Heritage', + 'email': 'robot@softwareheritage.org' +} + def setup_django_for(platform): """Setup function for command line tools (swh.deposit.create_user, diff --git a/swh/deposit/tests/api/test_deposit_read_archive.py b/swh/deposit/tests/api/test_deposit_read_archive.py index a798baa71ff22616751451193b8d4eed69857018..b62843083999d11de96e19830bb16bf04b56e69f 100644 --- a/swh/deposit/tests/api/test_deposit_read_archive.py +++ b/swh/deposit/tests/api/test_deposit_read_archive.py @@ -12,7 +12,7 @@ from nose.plugins.attrib import attr from rest_framework import status from rest_framework.test import APITestCase -from swh.loader.tar import tarball +from swh.core import tarball from swh.deposit.config import PRIVATE_GET_RAW_CONTENT from swh.deposit.tests import TEST_CONFIG diff --git a/swh/deposit/tests/api/test_deposit_read_metadata.py b/swh/deposit/tests/api/test_deposit_read_metadata.py index 616d643bdb2a197698dacc9dc4901d613818426b..960764236e7bce7202d46eb78dfa4f5d6a68e04c 100644 --- a/swh/deposit/tests/api/test_deposit_read_metadata.py +++ b/swh/deposit/tests/api/test_deposit_read_metadata.py @@ -16,6 +16,7 @@ from swh.deposit.config import DEPOSIT_STATUS_LOAD_SUCCESS from swh.deposit.config import DEPOSIT_STATUS_PARTIAL +from ...config import SWH_PERSON from ..common import BasicTestCase, WithAuthTestCase, CommonCreationRoutine @@ -70,12 +71,8 @@ class DepositReadMetadataTest(APITestCase, WithAuthTestCase, BasicTestCase, 'synthetic': True, 'committer_date': None, 'message': ': Deposit %s in collection hal' % deposit_id, - 'author': { - 'fullname': '', 'email': '', 'name': '' - }, - 'committer': { - 'fullname': '', 'email': '', 'name': '' - }, + 'author': SWH_PERSON, + 'committer': SWH_PERSON, 'date': None, 'metadata': { '{http://www.w3.org/2005/Atom}external_identifier': @@ -154,12 +151,8 @@ class DepositReadMetadataTest(APITestCase, WithAuthTestCase, BasicTestCase, 'synthetic': True, 'date': None, 'committer_date': None, - 'author': { - 'fullname': '', 'email': '', 'name': '' - }, - 'committer': { - 'fullname': '', 'email': '', 'name': '' - }, + 'author': SWH_PERSON, + 'committer': SWH_PERSON, 'type': 'tar', 'message': ': Deposit %s in collection hal' % deposit_id, 'metadata': { diff --git a/swh/deposit/tests/common.py b/swh/deposit/tests/common.py index 75a73d1e81f31ac99490e2824c94329ebeab4c0f..bb5ec82f1dde0372ec954608077a78317321226e 100644 --- a/swh/deposit/tests/common.py +++ b/swh/deposit/tests/common.py @@ -21,7 +21,7 @@ from swh.deposit.models import DepositRequest from swh.deposit.models import DepositRequestType from swh.deposit.parsers import parse_xml from swh.deposit.settings.testing import MEDIA_ROOT -from swh.loader.tar import tarball +from swh.core import tarball def create_arborescence_zip(root_path, archive_name, filename, content, diff --git a/version.txt b/version.txt index 5971654bdca64e6b57fbfc29fb1591534a75adef..765fc5884d91a4831186565bbb8ad83ee2acda87 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v0.0.35-0-g6805414 \ No newline at end of file +v0.0.36-0-gdbcea99 \ No newline at end of file