diff --git a/common/modules/deposit.org b/common/modules/deposit.org index 0103e60..1b44e2c 100644 --- a/common/modules/deposit.org +++ b/common/modules/deposit.org @@ -1,201 +1,184 @@ #+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %10BEAMER_act(Act) %4BEAMER_col(Col) %10BEAMER_extra(Extra) %8BEAMER_opt(Opt) #+INCLUDE: "prelude.org" :minlevel 1 # Requirements: # #+LATEX_HEADER_EXTRA: \usepackage{tikz} #+LATEX_HEADER_EXTRA: \usetikzlibrary{arrows,shapes} #+LATEX_HEADER_EXTRA: \definecolor{swh-orange}{RGB}{254,205,27} #+LATEX_HEADER_EXTRA: \definecolor{swh-red}{RGB}{226,0,38} #+LATEX_HEADER_EXTRA: \definecolor{swh-green}{RGB}{77,181,174} * Deposit :PROPERTIES: :CUSTOM_ID: main :END: -** Push-style deposit -**** - First version of our software deposit prototype \\ - *\url{https://deposit.softwareheritage.org/}* -**** Features - - pushing *deposits* to the Software Heritage archive - - software source code + metadata - - full *transparency* of the loading and downloading processes - - download the deposit by cooking the bundle in the *vault* -**** SWORD-compliant - - *SWORD v2* protocol for single and multipart deposits - - deposit /MUST/, /SHOULD/ and /MAY/ contain certain metadata attributes -** Deposit walkthrough -*** Prepare source code for deposit -#+BEAMER: \tiny +** Pushing source code to Software Heritage + :PROPERTIES: + :CUSTOM_ID: overview + :END: +**** Deposit service + - complement regular (pull) crawling of forges and distributions + - restricted access (i.e., not a warez dumpster!) + - early prototype at: *\url{https://deposit.softwareheritage.org/}* +**** Tech bits + - *SWORD* 2.0 compliant server, for digital repositories interoperability + - RESTful API for deposit and monitoring, with CLI wrapper +** Prepare a deposit + :PROPERTIES: + :CUSTOM_ID: prepare + :END: +*** Prepare source code tarball #+BEGIN_SRC -$ tar cvf +$ tar cvf je-suis-gpl.tgz /path/to/je-suis-gpl/ #+END_SRC #+BEAMER: \pause -*** Create metadata file with /MUST/ metadata -#+BEAMER: \tiny -- *the url* representing the location of the source /MUST/ be provided -- *the external-identifier* /MUST/ be provided -- *the name/title* of the software deposit /MUST/ be provided -- *the author/s*- one or more authors /MUST/ be provided -#+BEAMER: \pause - -*** -#+BEAMER: \tiny +*** Associate metadata +#+BEAMER: \scriptsize #+BEGIN_SRC +$ cat > je-suis-gpl.tgz.metadata.xml - Je suis GPL - ext-id - forge.softwareheritage.org/source/jesuisgpl/ - Yes, this is another implementation of - "Hello, world!” when you run it. - - GPL - https://www.gnu.org/licenses/gpl.html - - - Reuben Thomas and Sami Kerola - Maintainers - + Je suis GPL + ext-id + https://forge.softwareheritage.org/source/jesuisgpl/ + + Stefano Zacchiroli + Maintainer + - +^D #+END_SRC -** Deposit walkthrough -*** Pushing a single deposit with metadata -#+BEAMER: \tiny +** Send a deposit + :PROPERTIES: + :CUSTOM_ID: send + :END: +*** #+BEGIN_SRC -$ swh-deposit --username 'name' --password 'pass' --archive je-suis-gpl.tgz - +$ swh-deposit --username 'name' --password 'pass' \ + --archive je-suis-gpl.tgz #+END_SRC #+BEAMER: \pause -*** Response -#+BEAMER: \tiny #+BEGIN_SRC { 'deposit_id': '11', 'deposit_status': 'deposited', 'deposit_date': 'Jan. 30, 2018, 9:37 a.m.' } #+END_SRC -** Deposit walkthrough +** Multipart deposit + :PROPERTIES: + :CUSTOM_ID: multipart + :END: *** -#+BEAMER: \footnotesize - A multistep deposit with *partial* status can be: - - updated with new content and metadata - -#+BEAMER: \pause -*** Create an incomplete deposit -#+BEAMER: \tiny +#+BEAMER: \scriptsize #+BEGIN_SRC - - $ swh-deposit --username 'name' --password 'secret' --partial \ - --archive foo.tar.gz + $ swh-deposit --username 'name' --password 'secret' \ + --partial \ + --archive the-bulk-of-it.tar.gz #+END_SRC #+BEAMER: \pause -*** Response -#+BEAMER: \tiny #+BEGIN_SRC { 'deposit_id': '11', 'deposit_status': 'partial', 'deposit_date': 'Jan. 30, 2018, 9:37 a.m.' } #+END_SRC #+BEAMER: \pause -*** Add content or metadata to the deposit -#+BEAMER: \tiny +*** +#+BEAMER: \scriptsize #+BEGIN_SRC - $ swh-deposit --username 'name' --password 'secret' --partial \ - --deposit-id 11 \ - --archive add-foo.tar.gz + $ swh-deposit --username 'name' --password 'secret' \ + --partial \ # omit this to finalize + --deposit-id 11 --archive addendum.tar.gz #+END_SRC #+BEAMER: \pause *** -#+BEAMER: \footnotesize - Finalize deposit by omitting *- -partial* flag -** Deposit walkthrough +#+BEAMER: \scriptsize +#+BEGIN_SRC + $ swh-deposit --username 'name' --password 'secret' \ + --deposit-id 11 --archive last-touch.tar.gz +#+END_SRC +** Replace previous archive and/or metadata + :PROPERTIES: + :CUSTOM_ID: override + :END: *** -#+BEAMER: \footnotesize - A multistep deposit with *partial* status can be: - - completely replaced -*** Update by replacing archive and metadata -#+BEAMER: \tiny +#+BEAMER: \scriptsize #+BEGIN_SRC - $ swh-deposit --username 'name' --password 'secret' \ --deposit-id 11 \ --archive updated-je-suis-gpl.tar.gz \ --replace #+END_SRC #+BEAMER: \pause -*** Response -#+BEAMER: \tiny +#+BEAMER: \scriptsize #+BEGIN_SRC { 'deposit_id': '11', 'deposit_status': 'deposited', 'deposit_date': 'Jan. 30, 2018, 9:37 a.m.' } #+END_SRC -** Deposit walkthrough -*** What's your status? -#+BEAMER: \footnotesize +** Ingestion status + :PROPERTIES: + :CUSTOM_ID: status + :END: \tikzstyle{fail} = [draw, thin, fill=swh-red!80!swh-orange, minimum height=1.5em] \tikzstyle{processing} = [draw, thin, fill=swh-orange!100, minimum height=1.5em] \tikzstyle{success} = [draw, thin, fill=swh-green!80!swh-orange, minimum height=1.5em] \begin{figure} \begin{tikzpicture}[node distance=1.8cm, auto,>=latex', thick] % We need to set at bounding box first. Otherwise the diagram % will change position for each frame. %\path[use as bounding box] (-1,0) rectangle (10,-2); \path[->]<1-> node[processing] (partial) {partial} node[success, right of=partial] (deposited) {deposited} (partial) edge node {} (deposited) node[processing, right of=deposited] (checking) {} (deposited) edge node {} (checking) node[success, right of=checking] (verified) {verified} node[fail, below of=checking] (rejected) {rejected} (checking) edge node {} (verified) edge node[swap] {} (rejected) node[processing, right of=verified] (loading) {} node[success, right of=loading] (done) {done} node[fail, below of=loading] (failed) {failed} (verified) edge node {} (loading) (loading) edge node {} (failed) (loading) edge node {} (done); \end{tikzpicture} \end{figure} #+BEAMER: \pause -*** Checking the deposit's state -#+BEAMER: \tiny +*** +#+BEAMER: \footnotesize #+BEGIN_SRC $ swh-deposit --username 'name' --pass 'secret' \ - --deposit-id '11' \ - --status + --deposit-id '11' --status #+END_SRC #+BEAMER: \pause - -*** -#+BEAMER: \tiny #+BEGIN_SRC { 'deposit_id': 11, 'deposit_status': 'done', 'deposit_status_detail': The deposit has been successfully loaded into the Software Heritage archive', 'deposit_swh_id': 'swh:1:rev:608757ea9bd8494d729732cc9a414948c160bd3c' } #+END_SRC -** Deposit walkthrough +** Retrieve a deposit + :PROPERTIES: + :CUSTOM_ID: download + :END: *** Deposit completed and loaded The deposit was succesfully pushed and integrated into the archive.\\ You can browse it using the deposit's /swh-id/: - *archive.softwareheritage.org/browse/* #+BEAMER: \pause *** Download Now we want to download the content with the #+BEAMER: \huge *Vault*