Project

General

Profile

1
@author: Alessia Bardi
2
@date: 28/9/2018
3
@description: read me file to update schemas and schema documentation for OpenAIRE
4

    
5
This folder contains the files that are publicly available.
6
There is one folder per schema version, plus one folder for sygma schema.
7
Each schema folder contains:
8
- doc: folder with html documentation. The documentation must be automatically generated via Oxygen. Please find instructions below.
9
- a set of xsd files
10

    
11
The latest schema version must be available in 'latest', which is a symbolic link.
12
Currently for example: 
13
lrwxr-xr-x   1 alessia  staff    3 Sep 28 10:47 latest -> 1.0
14

    
15
A schema that has already been published must never be updated. A new version must instead be released, i.e. you must create a new folder under 'schema' whose name is the new version.
16

    
17
Current published version is 1.0.
18

    
19
Next schema version should be:
20
- 1.2 if there are no major, breaking changes (i.e. only additions or vocabulary changes)
21
- 2.0 if there are major breaking changes (i.e. deletion of fields, breaking type changes)
22

    
23
---- DEPLOYMENT INFO ----
24
Never ever change the files directly in the folder of the OpenAIRE server!. 
25
Work on your local machine, follow the instructions https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-openaire-schema/trunk and then type the following on the OpenAIRE server:
26

    
27
> sudo su - www-data -s /bin/bash
28
> cd /var/www/schema
29
> svn up
30

    
31
Current deployment info:
32
- machine: new.openaire.eu
33
- location: /var/www/schema
34
- user: www-data
35

    
36
---- HOW TO GENERATE THE DOC FOLDER WITH OXYGEN ---
37
Let's suppose we want to publish version X.Y. This means that we have a folder `schema/X.Y`. 
38
1. Commit `schema/X.Y` on svn.
39
2. Go to the OpenAIRE server via ssh (new.openaire.eu) and update the schema folder:
40
    > sudo su - www-data -s /bin/bash
41
    > cd /var/www/schema
42
    > svn up
43
    Now you should see folder `/var/www/schema/X.Y` and https://www.openaire.eu/schema/X.Y/oaf-X.Y.xsd should be accessible. Check it.
44
3. Now we can generate the documentation via Oxygen.
45
3.1 Open Oxygen in your local machine and select: Tools --> Generate Documentation --> XML Schema Documentation 
46
3.2 Click on Import Settings and select the file `schema/docGenerationSettings.xml`. Settings are:
47
    - output format: splitted by location
48
    - all settings option checked
49
    - images in jpeg
50
3.3 Set the schema URL to https://www.openaire.eu/schema/X.Y/oaf-X.Y.xsd (if we select the file on the local file system, then the documentation will contain references to the local file system, while we want documentation to refer to www.openaire.eu)
51
3.4 Modify the output file by changing X.Y to the actual version you are working with
52
3.5 Click on `Generate`.
53
3.6 Check the documentation is currently stored under `schema/X.Y/doc` and images under `schema/X.Y/doc/img`
54
4. Commit the `schema/X.Y/doc` folder
55
5. Go to the OpenAIRE server via ssh (new.openaire.eu) and update the schema folder:
56
    > sudo su - www-data -s /bin/bash
57
    > cd /var/www/schema
58
    > svn up
59
    Now https://www.openaire.eu/schema/X.Y/oaf-X.Y.html should be accessible. Check it.
60
6. Update the `latest` link   
61
6.1 Update the `latest` linkon your local copy of https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-openaire-schema/trunk
62
    > cd schema
63
    > rm latest
64
    > ln -s X.Y latest
65
    > svn commit latest -m "updated latest link to version X.Y"
66
6.2 Update again on the OpenAIRE server folder
67
    > sudo su - www-data -s /bin/bash
68
    > cd /var/www/schema
69
    > svn up
70

    
(1-1/3)