README.md 4.38 KB
Newer Older
vuillaut's avatar
vuillaut committed
1
# ESCAPE metadata template
Vuillaume's avatar
Vuillaume committed
2

Enrique Garcia's avatar
Enrique Garcia committed
3
The OSSR environment will be using soon the **CodeMeta** schema context to describe metadata.
vuillaut's avatar
vuillaut committed
4

Enrique Garcia's avatar
Enrique Garcia committed
5
Comments are welcome. Open an issue or [contact](mailto:vuillaume@lapp.in2p3.fr;garcia@lapp.in2p3.fr) the authors.
vuillaut's avatar
vuillaut committed
6

Enrique Garcia's avatar
Enrique Garcia committed
7
## Quickstart
vuillaut's avatar
vuillaut committed
8

Enrique Garcia's avatar
Enrique Garcia committed
9 10
Create and incorporate a `codemeta.json` file to your project before uploading it to the ESCAPE repository.

Enrique Garcia's avatar
Enrique Garcia committed
11 12
 1. Go to the [CodeMeta generator](https://codemeta.github.io/codemeta-generator/). Create a `codemeta.json` file based on your library/project.
    - Check - in the same web application - that the generated file is valid !  
Enrique Garcia's avatar
Enrique Garcia committed
13
    - Please for the moment restrict the list of keywords to the the ones that we propose (see below).
Enrique Garcia's avatar
Enrique Garcia committed
14
 2. Include the `codemeta.json` file in the **root directory** of your project.
Enrique Garcia's avatar
Enrique Garcia committed
15 16 17 18 19 20 21 22 23 24

**\[COMING SOON\]**
 - Add the `deploy` stage to your `.gitlab-ci.yml` file and let the pipeline work !

<!--- COMMENT
3. To automate the upload to the [ESCAPE repository](https://zenodo.org/communities/escape2020) through the GitLab-CI pipelines
   - Add the `ZenodoCI` library in the **root directory** of your project.
   - Generate a `.zenodo.json` file (see below).
   - Configure the pipeline (Quikstart and tutorials [here](https://escape2020.pages.in2p3.fr/wp3/ossr-pages/page/repository/publish_in_repository/)).
-->
Enrique Garcia's avatar
Enrique Garcia committed
25
    
Enrique Garcia's avatar
Enrique Garcia committed
26

Enrique Garcia's avatar
Enrique Garcia committed
27 28 29 30
-----------------
-----------------
 
 
Enrique Garcia's avatar
Enrique Garcia committed
31
## Create a Zenodo metadata file from the a CodeMeta schema file
vuillaut's avatar
vuillaut committed
32

Enrique Garcia's avatar
Enrique Garcia committed
33 34 35 36
The zenodo repository does not accept codemeta metadata files yet. In the meanwhile, the [codemeta2zenodo library](https://gitlab.in2p3.fr/escape2020/wp3/codemeta2zenodo) 
provides a simple tool to create a native Zenodo metadata file (`.zenodo.json`) from a `codemeta.json` file. To do so;

**PLEASE NOTE THAT THIS STAGE IT IS NOT COMPULSORY (it is done automatically when uploading an entry to Zenodo using the ZenodCI package)**
vuillaut's avatar
vuillaut committed
37

Enrique Garcia's avatar
Enrique Garcia committed
38
 1. Include a `codemeta.json` file to the root directory of your project.
Enrique Garcia's avatar
Enrique Garcia committed
39 40 41 42 43 44 45 46 47 48 49 50
 2. Install the `codemeta2zenodo` package;
```bash
 $ git clone https://gitlab.in2p3.fr/escape2020/wp3/codemeta2zenodo.git
 $ cd codemeta2zenodo
 $ pip install .
```
 3. And then just run
 ```bash
 $ codemeta2zenodo --codemeta_file codemeta.json
```

In case of doubts or problems, please [contact us](mailto:vuillaume@lapp.in2p3.fr;garcia@lapp.in2p3.fr).
vuillaut's avatar
vuillaut committed
51 52


Enrique Garcia's avatar
Enrique Garcia committed
53
## Metadata schema templates
vuillaut's avatar
vuillaut committed
54

Enrique Garcia's avatar
Enrique Garcia committed
55
Inside the `codemeta_utils` directory you will find two template files with **the all the properties (terms) of the corresponding metadata schema context** 
Enrique Garcia's avatar
Enrique Garcia committed
56 57 58
 for both the CodeMeta metadata file and the Zenodo metadata file.
 
Feel free to create and incorporate the metadata files starting from these templates. However, please note that  
Enrique Garcia's avatar
Enrique Garcia committed
59 60
the final filenames **MUST** be either `codemeta.json` or `.zenodo.json` (note the `.` !). In case you do not fill or 
write nothing on any dictionary key field, take it out of the file.
vuillaut's avatar
vuillaut committed
61

Enrique Garcia's avatar
Enrique Garcia committed
62
In case of doubts please also check;
Enrique Garcia's avatar
Enrique Garcia committed
63
  - The [CodeMeta properties/terms description](https://codemeta.github.io/terms/) or,
Enrique Garcia's avatar
Enrique Garcia committed
64 65 66 67
  - the [`metadata representation`](https://developers.zenodo.org/#representation) allowed for the `.zenodo.json` metadata file.
  
  
### Extending the CodeMeta Context schema
vuillaut's avatar
vuillaut committed
68

Enrique Garcia's avatar
Enrique Garcia committed
69 70
In case you find that CodeMeta context does not describe deep enough your digital resource, you can extend the metadata 
context and combine it with all the terms available at [https://schema.org](https://schema.org/docs/full.html).
Enrique Garcia's avatar
Enrique Garcia committed
71 72 73 74 75 76 77
For this purpose, and following the [CodeMeta's developer guide](https://codemeta.github.io/developer-guide/);

   1. Modify the `"@Context"` key of the `codemeta.json` as; 
    
    "@context": ["https://raw.githubusercontent.com/codemeta/codemeta/2.0-rc/codemeta.jsonld", "http://schema.org/"]
     
   2. Include the desired terms / properties following the `schema.org` context.
Enrique Garcia's avatar
Enrique Garcia committed
78
   3. Contact us for a likely implementation into the OSSR environment ;-)
Enrique Garcia's avatar
Enrique Garcia committed
79 80 81 82 83 84 85 86 87 88


## Automate the metadata schema in the OSSR environment.

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.
vuillaut's avatar
vuillaut committed
89

vuillaut's avatar
vuillaut committed
90
## Keywords list
Enrique Garcia's avatar
Enrique Garcia committed
91 92 93

Please restrict the list of keywords within the `codemeta.json` file to the following.

vuillaut's avatar
vuillaut committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- CTA
- LSST
- LOFAR
- SKA
- EGO-Virgo
- KM3NeT
- ELT
- EST
- HL-LHC
- FAIR
- CERN
- ESO
- JIVE
- VO
- EOSC
- ESO
- Astronomy
- Astroparticle physics
Enrique Garcia's avatar
Enrique Garcia committed
112
- Particle physics