Commit b71b7ed1 authored by Enrique's avatar Enrique
Browse files

update readmes

parent 91b26b02
Pipeline #92437 passed with stage
in 2 minutes and 28 seconds
......@@ -4,6 +4,8 @@
## Continuous Deployment to Zenodo
Library to manage an upload to Zenodo through its REST API.
The source code contained in this folder is based on the [ZenodoCI](https://gitlab.in2p3.fr/escape2020/wp3/zenodoci)
project. The library was developed specifically to perform a deploy stage (to the Zenodo repository) in a GitLab CI
pipeline that **could be implemented in any external project**.
......@@ -18,12 +20,28 @@ The `deploy` stage in the CI pipeline (see the `.gitlab-ci.yml` file) will make
- Either upload the desired file(s) to the ESCAPE community in Zenodo.
- Either upload a new version of an existing entry to Zenodo.
The `repository_information.json` file must be filled up before pushing to the GitLab repository. This file will be
used to fill up the compulsory information that a Zenodo entry must contain. Also, depending on the case, the
corresponding python script (`upload_new_deposit.py` or `upload_new_version_of_deposit.py`) must be adapted and
included into the `.gitlab-ci.yml` file with its corresponding arguments (examples are shown in the yml file).
A `codemeta.json` metadata file (see below) **MUST BE ADDED** before uploading an entry to Zenodo or triggering the GitLabCI pipeline.
Also, depending on the case, the corresponding python script (`upload_new_deposit.py` or `upload_new_version_of_deposit.py`)
must be adapted and included into the `.gitlab-ci.yml` file with its corresponding arguments (examples are shown in the yml file).
#### **Use of new metadata context ! Please check the news !**
We are no longer supporting the use of a `repository_information.json` file to provide metadata to Zenodo.
We are currently moving to a [CodeMeta metadata context](https://codemeta.github.io/).
This metadata standard provides a complete metadata schema context supported by many other services and search engines.
Adding a single `codemeta.json` file to the root directory of your project will be enough ! Please check out the
[ESCAPE metadata template](https://gitlab.in2p3.fr/escape2020/wp3/escape_metadata_template) project for a _quickstart_ on
how to easily create a `codemeta.json` file.
Last but not least ! Please note that during the CI pipeline the `.zenodoci` module will search for a `codemeta.json` file
and will automatically create the equivalent file to provide metadata to the Zenodo repository. The `.zenodo.json` file
will contain the exactly same information that in the `codemeta.json` file but using the Zenodo syntax.
### Zenodo token & GitLab CI environment variable
## Zenodo token & GitLab CI environment variable
To connect the GitLab repository with Zenodo in an autonomous way, a personal access token must be created. This token
is assigned to a **single** Zenodo account, and it will allow the interaction with
......@@ -40,7 +58,7 @@ your personal token, you should create an environment variable in your GitLab re
The environment variable will look like this:
```sh
$ python .zenodoci/upload_new_deposit.py -i build -t $ZENODO_TOKEN -s False
$ python .zenodoci/upload_new_deposit.py --input-directory build --token $ZENODO_TOKEN --sandbox_zenodo False
```
## License of the `template_project_repository`:
......
The source code contained in this folder is based on the [ESCAPE metadata template](
https://gitlab.in2p3.fr/escape2020/wp3/escape_metadata_template) project.
# ESCAPE metadata template
In the ESCAPE project we will be following the ***CodeMeta*** project and schema to describe metadata.
ESCAPE will be following the **CodeMeta** schema context to describe metadata.
Create and incorporate a `codemeta.json` file to your project before uploading it to the ESCAPE repository.
Comments are welcome. Open an issue here or [contact](mailto:vuillaume@lapp.in2p3.fr;garcia@lapp.in2p3.fr) the authors.
## Quickstart
1. Go to the [CodeMeta generator](https://codemeta.github.io/codemeta-generator/). Create a `codemeta.json` file based on your library/repository.
- Check in the same web application that the generate / your own file is valid !
- Please for the moment restrict the list of keywords to the the ones that we propose (see below).
2. Include the `codemeta.json` file in the root directory of your project.
3. To automate the upload to the [ESCAPE repository](https://zenodo.org/communities/escape2020) through the GitLab-CI pipelines
- Include the `.zenodoci` library in the root directory of your project.
......@@ -25,7 +34,7 @@ to create a native Zenodo metadata file (`.zenodo.json`) from a `codemeta.json`
````bash
$ python codemeta_utils/codemeta_to_zenodo_json.py
````
3. In case of doubts or problems, please [contact us](mailto:garcia@lapp.in2p3.fr).
3. In case of doubts or problems, please [contact us](mailto:vuillaume@lapp.in2p3.fr;garcia@lapp.in2p3.fr).
## Metadata schema templates
......@@ -62,4 +71,28 @@ The `ZenodoCI` project contains a copy of the code in this library !
This means that if you have already configured the GitLabCI pipeline together with the Zenodo repository, the CI
pipeline will take care of creating a `.zenodo.json` file automatically and incorporate it to the new upload/new
version to Zenodo.
\ No newline at end of file
version to Zenodo.
## Keywords list
Please restrict the list of keywords within the `codemeta.json` file to the following.
- CTA
- LSST
- LOFAR
- SKA
- EGO-Virgo
- KM3NeT
- ELT
- EST
- HL-LHC
- FAIR
- CERN
- ESO
- JIVE
- VO
- EOSC
- ESO
- Astronomy
- Astroparticle physics
- Particle physics
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment