Changeset View
Changeset View
Standalone View
Standalone View
docs/specs/spec-loading.rst
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
Origin artifact | Origin artifact | ||||
~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~ | ||||
We create an origin using the url in the deposited metadata. | We create an origin using the url in the deposited metadata. | ||||
The current deposit and future deposits with the same url or external_id | The current deposit and future deposits with the same url or external_id | ||||
will be associated to this origin. | will be associated to this origin. | ||||
.. code-block:: json | .. code-block:: json | ||||
origin: { | { | ||||
"origin": { | |||||
"id": 89283768, | "id": 89283768, | ||||
"origin_visits_url": "/api/1/origin/89283768/visits/", | "origin_visits_url": "/api/1/origin/89283768/visits/", | ||||
"type": "deposit", | "type": "deposit", | ||||
"url": "https://hal.archives-ouvertes.fr/hal-02140606" | "url": "https://hal.archives-ouvertes.fr/hal-02140606" | ||||
} | } | ||||
} | |||||
Visits | Visits | ||||
~~~~~~~ | ~~~~~~~ | ||||
We identify with a visit each deposit push of the same external_id. | We identify with a visit each deposit push of the same external_id. | ||||
Here in the example below, two snapshots are identified by two different visits. | Here in the example below, two snapshots are identified by two different visits. | ||||
.. code-block:: json | .. code-block:: json | ||||
visits: [ | { | ||||
"visits": [ | |||||
{ | { | ||||
"date": "2019-06-03T09:28:10.223007+00:00", | "date": "2019-06-03T09:28:10.223007+00:00", | ||||
"origin": 89283768, | "origin": 89283768, | ||||
"origin_visit_url": "/api/1/origin/89283768/visit/2/", | "origin_visit_url": "/api/1/origin/89283768/visit/2/", | ||||
"snapshot": "a3773941561cc557853898773a19c07cfe2efc5a", | "snapshot": "a3773941561cc557853898773a19c07cfe2efc5a", | ||||
"snapshot_url": "/api/1/snapshot/a3773941561cc557853898773a19c07cfe2efc5a/", | "snapshot_url": "/api/1/snapshot/a3773941561cc557853898773a19c07cfe2efc5a/", | ||||
"status": "full", | "status": "full", | ||||
"type": "deposit", | "type": "deposit", | ||||
"visit": 2 | "visit": 2 | ||||
}, | }, | ||||
{ | { | ||||
"date": "2019-05-27T12:23:31.037273+00:00", | "date": "2019-05-27T12:23:31.037273+00:00", | ||||
"origin": 89283768, | "origin": 89283768, | ||||
"origin_visit_url": "/api/1/origin/89283768/visit/1/", | "origin_visit_url": "/api/1/origin/89283768/visit/1/", | ||||
"snapshot": "43fdb8291f1bf6962211c370e394f6abb1cbe01d", | "snapshot": "43fdb8291f1bf6962211c370e394f6abb1cbe01d", | ||||
"snapshot_url": "/api/1/snapshot/43fdb8291f1bf6962211c370e394f6abb1cbe01d/", | "snapshot_url": "/api/1/snapshot/43fdb8291f1bf6962211c370e394f6abb1cbe01d/", | ||||
"status": "full", | "status": "full", | ||||
"type": "deposit", | "type": "deposit", | ||||
"visit": 1 | "visit": 1 | ||||
} | } | ||||
] | ] | ||||
} | |||||
Snapshot artifact | Snapshot artifact | ||||
~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~ | ||||
The snapshot represents one deposit push. The master branch points to a | The snapshot represents one deposit push. The master branch points to a | ||||
synthetic revision. We will create a second branch pointing to a release | synthetic revision. We will create a second branch pointing to a release | ||||
artifact, if the indicate that the deposit is a release with a `releaseNotes`. | artifact, if the indicate that the deposit is a release with a `releaseNotes`. | ||||
.. code-block:: json | .. code-block:: json | ||||
snapshot: { | { | ||||
"snapshot": { | |||||
"branches": { | "branches": { | ||||
"master": { | "master": { | ||||
"target": "396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52", | "target": "396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52", | ||||
"target_type": "revision", | "target_type": "revision", | ||||
"target_url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/" | "target_url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/" | ||||
} | } | ||||
"refs/tags/v1.1": { | "refs/tags/v1.1": { | ||||
"target": "a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97", | "target": "a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97", | ||||
"target_type": "release", | "target_type": "release", | ||||
"target_url": "/api/1/release/a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97/" | "target_url": "/api/1/release/a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97/" | ||||
} | } | ||||
}, | }, | ||||
"id": "a3773941561cc557853898773a19c07cfe2efc5a", | "id": "a3773941561cc557853898773a19c07cfe2efc5a", | ||||
"next_branch": null | "next_branch": null | ||||
} | } | ||||
} | |||||
Release artifact | Release artifact | ||||
~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~ | ||||
The content is deposited with a set of descriptive metadata in the CodeMeta | The content is deposited with a set of descriptive metadata in the CodeMeta | ||||
vocabulary. The following CodeMeta terms implies that the | vocabulary. The following CodeMeta terms implies that the | ||||
artifact is a release: | artifact is a release: | ||||
- `releaseNotes` | - `releaseNotes` | ||||
Show All 15 Lines | |||||
| date | release date = publication date | datePublished | deposit_date | | | date | release date = publication date | datePublished | deposit_date | | ||||
+-------------------+-----------------------------------+-----------------+----------------+ | +-------------------+-----------------------------------+-----------------+----------------+ | ||||
| author | deposit client | author | client | | | author | deposit client | author | client | | ||||
+-------------------+-----------------------------------+-----------------+----------------+ | +-------------------+-----------------------------------+-----------------+----------------+ | ||||
.. code-block:: json | .. code-block:: json | ||||
release: { | { | ||||
"release": { | |||||
"author": { | "author": { | ||||
"email": "hal@ccsd.cnrs.fr", | "email": "hal@ccsd.cnrs.fr", | ||||
"fullname": "HAL <phal@ccsd.cnrs.fr>", | "fullname": "HAL <phal@ccsd.cnrs.fr>", | ||||
"id": x, | |||||
"name": "HAL" | "name": "HAL" | ||||
}, | }, | ||||
"author_url": "/api/1/person/x/", | "author_url": "/api/1/person/x/", | ||||
"date": "2019-05-27T16:28:33+02:00", | "date": "2019-05-27T16:28:33+02:00", | ||||
"id": "a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97", | "id": "a9f3396f372ed4a51d75e15ca16c1c2df1fc5c97", | ||||
"message": "AffectationRO Version 1.1 - added new feature\n", | "message": "AffectationRO Version 1.1 - added new feature\n", | ||||
"name": "1.1", | "name": "1.1", | ||||
"synthetic": true, | "synthetic": true, | ||||
"target": "396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52", | "target": "396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52", | ||||
"target_type": "revision", | "target_type": "revision", | ||||
"target_url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/" | "target_url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/" | ||||
} | } | ||||
} | |||||
Revision artifact | Revision artifact | ||||
~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~ | ||||
The metadata sent with the deposit is included in the revision which affects | The metadata sent with the deposit is included in the revision which affects | ||||
the hash computation, thus resulting in a unique identifier. | the hash computation, thus resulting in a unique identifier. | ||||
This way, by depositing the same content with different metadata, will result | This way, by depositing the same content with different metadata, will result | ||||
in two different revisions in the SWH archive. | in two different revisions in the SWH archive. | ||||
The date mapping | The date mapping | ||||
^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^ | ||||
A deposit may contain 4 different dates concerning the software artifacts. | A deposit may contain 4 different dates concerning the software artifacts. | ||||
The deposit's revision will reflect the most accurate point in time available. | The deposit's revision will reflect the most accurate point in time available. | ||||
Here are all dates that can be available in a deposit: | Here are all dates that can be available in a deposit: | ||||
+-------------------+-----------------------------------+-----------------------------------------------+ | +-------------------+-----------------------------------+-----------------------------------------------+ | ||||
| dates | location | Description | | | dates | location | Description | | ||||
+===================+===================================+===============================================+ | +===================+===================================+===============================================+ | ||||
Show All 31 Lines | |||||
| SWH release field |Description |CodeMeta term | Fallback value | | | SWH release field |Description |CodeMeta term | Fallback value | | ||||
+===================+==================================+===============+================+ | +===================+==================================+===============+================+ | ||||
| date |release date = publication date |datePublished |reception_date | | | date |release date = publication date |datePublished |reception_date | | ||||
+-------------------+----------------------------------+---------------+----------------+ | +-------------------+----------------------------------+---------------+----------------+ | ||||
.. code-block:: json | .. code-block:: json | ||||
revision: { | { | ||||
"revision": { | |||||
"author": { | "author": { | ||||
"email": "robot@softwareheritage.org", | "email": "robot@softwareheritage.org", | ||||
"fullname": "Software Heritage", | "fullname": "Software Heritage", | ||||
"id": 18233048, | "id": 18233048, | ||||
"name": "Software Heritage" | "name": "Software Heritage" | ||||
}, | }, | ||||
"author_url": "/api/1/person/18233048/", | "author_url": "/api/1/person/18233048/", | ||||
"committer": { | "committer": { | ||||
"email": "robot@softwareheritage.org", | "email": "robot@softwareheritage.org", | ||||
"fullname": "Software Heritage", | "fullname": "Software Heritage", | ||||
"id": 18233048, | "id": 18233048, | ||||
"name": "Software Heritage" | "name": "Software Heritage" | ||||
}, | }, | ||||
"committer_date": "2019-05-27T16:28:33+02:00", | "committer_date": "2019-05-27T16:28:33+02:00", | ||||
"committer_url": "/api/1/person/18233048/", | "committer_url": "/api/1/person/18233048/", | ||||
"date": "2012-01-01T00:00:00+00:00", | "date": "2012-01-01T00:00:00+00:00", | ||||
"directory": "fb13b51abbcfd13de85d9ba8d070a23679576cd7", | "directory": "fb13b51abbcfd13de85d9ba8d070a23679576cd7", | ||||
"directory_url": "/api/1/directory/fb13b51abbcfd13de85d9ba8d070a23679576cd7/", | "directory_url": "/api/1/directory/fb13b51abbcfd13de85d9ba8d070a23679576cd7/", | ||||
"history_url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/log/", | "history_url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/log/", | ||||
"id": "396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52", | "id": "396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52", | ||||
"merge": false, | "merge": false, | ||||
"message": "hal: Deposit 282 in collection hal", | "message": "hal: Deposit 282 in collection hal", | ||||
"metadata": { | "metadata": { | ||||
"@xmlns": "http://www.w3.org/2005/Atom", | "@xmlns": "http://www.w3.org/2005/Atom", | ||||
"@xmlns:codemeta": "https://doi.org/10.5063/SCHEMA/CODEMETA-2.0", | "@xmlns:codemeta": "https://doi.org/10.5063/SCHEMA/CODEMETA-2.0", | ||||
"author": { | "author": { | ||||
"email": "hal@ccsd.cnrs.fr", | "email": "hal@ccsd.cnrs.fr", | ||||
"name": "HAL" | "name": "HAL" | ||||
}, | }, | ||||
"client": "hal", | "client": "hal", | ||||
"codemeta:applicationCategory": "info", | "codemeta:applicationCategory": "info", | ||||
"codemeta:author": { | "codemeta:author": { | ||||
"codemeta:name": "Morane Gruenpeter" | "codemeta:name": "Morane Gruenpeter" | ||||
}, | }, | ||||
"codemeta:codeRepository": "www.code-repository.com", | "codemeta:codeRepository": "www.code-repository.com", | ||||
"codemeta:contributor": "Morane Gruenpeter", | "codemeta:contributor": "Morane Gruenpeter", | ||||
"codemeta:dateCreated": "2012", | "codemeta:dateCreated": "2012", | ||||
"codemeta:datePublished": "2019-05-27T16:28:33+02:00", | "codemeta:datePublished": "2019-05-27T16:28:33+02:00", | ||||
"codemeta:description": "description\\_en test v2", | "codemeta:description": "description\\_en test v2", | ||||
"codemeta:developmentStatus": "Inactif", | "codemeta:developmentStatus": "Inactif", | ||||
"codemeta:keywords": "mot_cle_en,mot_cle_2_en,mot_cle_fr", | "codemeta:keywords": "mot_cle_en,mot_cle_2_en,mot_cle_fr", | ||||
"codemeta:license": [ | "codemeta:license": [ | ||||
{ | { | ||||
"codemeta:name": "MIT License" | "codemeta:name": "MIT License" | ||||
}, | }, | ||||
{ | { | ||||
"codemeta:name": "CeCILL Free Software License Agreement v1.1" | "codemeta:name": "CeCILL Free Software License Agreement v1.1" | ||||
} | } | ||||
], | ], | ||||
"codemeta:name": "Test\\_20190527\\_01", | "codemeta:name": "Test\\_20190527\\_01", | ||||
"codemeta:operatingSystem": "OS", | "codemeta:operatingSystem": "OS", | ||||
"codemeta:programmingLanguage": "Java", | "codemeta:programmingLanguage": "Java", | ||||
"codemeta:referencePublication": null, | "codemeta:referencePublication": null, | ||||
"codemeta:relatedLink": null, | "codemeta:relatedLink": null, | ||||
"codemeta:releaseNotes": "releaseNote", | "codemeta:releaseNotes": "releaseNote", | ||||
"codemeta:runtimePlatform": "outil", | "codemeta:runtimePlatform": "outil", | ||||
"codemeta:softwareVersion": "1.0.1", | "codemeta:softwareVersion": "1.0.1", | ||||
"codemeta:url": "https://hal.archives-ouvertes.fr/hal-02140606", | "codemeta:url": "https://hal.archives-ouvertes.fr/hal-02140606", | ||||
"codemeta:version": "2", | "codemeta:version": "2", | ||||
"external_identifier": "hal-02140606", | "external_identifier": "hal-02140606", | ||||
"id": "hal-02140606", | "id": "hal-02140606", | ||||
"original_artifact": [ | "original_artifact": [ | ||||
{ | { | ||||
"archive_type": "zip", | "archive_type": "zip", | ||||
"blake2s256": "96be3ddedfcee9669ad9c42b0bb3a706daf23824d04311c63505a4d8db02df00", | "blake2s256": "96be3ddedfcee9669ad9c42b0bb3a706daf23824d04311c63505a4d8db02df00", | ||||
"length": 193072, | "length": 193072, | ||||
"name": "archive.zip", | "name": "archive.zip", | ||||
"sha1": "5b6ecc9d5bb113ff69fc275dcc9b0d993a8194f1", | "sha1": "5b6ecc9d5bb113ff69fc275dcc9b0d993a8194f1", | ||||
"sha1_git": "bd10e4d3ede17162692d7e211e08e87e67994488", | "sha1_git": "bd10e4d3ede17162692d7e211e08e87e67994488", | ||||
"sha256": "3e2ce93384251ce6d6da7b8f2a061a8ebdaf8a28b8d8513223ca79ded8a10948" | "sha256": "3e2ce93384251ce6d6da7b8f2a061a8ebdaf8a28b8d8513223ca79ded8a10948" | ||||
} | } | ||||
] | ] | ||||
}, | }, | ||||
"parents": [ | "parents": [ | ||||
{ | { | ||||
"id": "a9fdc3937d2b704b915852a64de2ab1b4b481003", | "id": "a9fdc3937d2b704b915852a64de2ab1b4b481003", | ||||
"url": "/api/1/revision/a9fdc3937d2b704b915852a64de2ab1b4b481003/" | "url": "/api/1/revision/a9fdc3937d2b704b915852a64de2ab1b4b481003/" | ||||
} | } | ||||
], | ], | ||||
"synthetic": true, | "synthetic": true, | ||||
"type": "tar", | "type": "tar", | ||||
"url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/" | "url": "/api/1/revision/396b1ff29f7c75a0a3cc36f30e24ff7bae70bb52/" | ||||
} | } | ||||
} | |||||
Directory artifact | Directory artifact | ||||
~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~ | ||||
The directory artifact is the archive(s)' raw content deposited. | The directory artifact is the archive(s)' raw content deposited. | ||||
.. code-block:: json | .. code-block:: json | ||||
directory: [ | { | ||||
"directory": [ | |||||
{ | { | ||||
"dir_id": "fb13b51abbcfd13de85d9ba8d070a23679576cd7", | "dir_id": "fb13b51abbcfd13de85d9ba8d070a23679576cd7", | ||||
"length": null, | "length": null, | ||||
"name": "AffectationRO", | "name": "AffectationRO", | ||||
"perms": 16384, | "perms": 16384, | ||||
"target": "fbc418f9ac2c39e8566b04da5dc24b14e65b23b1", | "target": "fbc418f9ac2c39e8566b04da5dc24b14e65b23b1", | ||||
"target_url": "/api/1/directory/fbc418f9ac2c39e8566b04da5dc24b14e65b23b1/", | "target_url": "/api/1/directory/fbc418f9ac2c39e8566b04da5dc24b14e65b23b1/", | ||||
"type": "dir" | "type": "dir" | ||||
} | } | ||||
] | ] | ||||
} | |||||
Questions raised concerning loading | Questions raised concerning loading | ||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
- A deposit has one origin, yet an origin can have multiple deposits? | - A deposit has one origin, yet an origin can have multiple deposits? | ||||
No, an origin can have multiple requests for the same deposit. Which | No, an origin can have multiple requests for the same deposit. Which | ||||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |