Contribute to Open Science Catalogue via the OSC editor#
This notebook is an example of how to add a new entry - i.e. product, project, workflow - to the Open Science Catalogue (OSC) via a combination of the earthcode library and the Open Science Catalog Editor.
The process to do this is three-fold:
Create the OSC entries using the library
Generate links and send the data to the OSC Editor
Open Pull Request via the OSC for your project entry
Open Pull Request via the OSC for your product entry
Before starting, please checkout the introduction to the Open Science Catalog Editor if you are not familiar with it already.
1. Create the OSC entries using the library#
In this notebook we use a dummy project/product pair for demonstration purposes. You can reuse the code below using real OSC entries.
from earthcode.static import generate_OSC_dummy_entries
project_collection, product_collection, _, _ = generate_OSC_dummy_entries()
project_collection
product_collection
2. Generate links and send the data to the OSC Editor#
from earthcode.gitclerk_add import generate_osc_editor_link
# NOTE: Always save the project first
project_url = generate_osc_editor_link(project_collection, 'project', session_title=project_collection.title)
print('Copy the the below link in a webbrowser to setup the project information: ')
print(project_url)
Copy the the below link in a webbrowser to setup the project information:
https://workspace.earthcode-staging.earthcode.eox.at/osc-editor?session=4DAtlantic-OHC&automation=add-file&&type=project&file=eyJ0eXBlIjogIkNvbGxlY3Rpb24iLCAiaWQiOiAiNGRhdGxhbnRpYy1vaGMrMTIzIiwgInN0YWNfdmVyc2lvbiI6ICIxLjAuMCIsICJkZXNjcmlwdGlvbiI6ICJHaXZlbiB0aGUgbWFqb3Igcm9sZSBvZiB0aGUgb2NlYW4gaW4gdGhlIGNsaW1hdGUgc3lzdGVtLCBpdCBpcyBlc3NlbnRpYWwgdG8gY2hhcmFjdGVyaXplIHRoZSB0ZW1wb3JhbCBhbmQgc3BhdGlhbCB2YXJpYXRpb25zIG9mIGl0cyBoZWF0IGNvbnRlbnQuIFRoZSBPSEMgcHJvZHVjdCByZXN1bHRzIGZyb20gdGhlIHNwYWNlIGdlb2RldGljIGFwcHJvYWNoIGFsc28gY2FsbGVkIGFsdGltZXRyeS1ncmF2aW1ldHJ5IGFwcHJvYWNoLiIsICJsaW5rcyI6IFt7InJlbCI6ICJyb290IiwgImhyZWYiOiAiLi4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dpdGh1Yi5jb20vc3RhYy1leHRlbnNpb25zL29zYyN0aGVtZSIsICJjb25jZXB0cyI6IFt7ImlkIjogIm9jZWFucyJ9XX1dLCAiY29udGFjdHMiOiBbeyJuYW1lIjogIlJvYmVydG8gU2FiaWEiLCAicm9sZXMiOiBbInRlY2huaWNhbF9vZmZpY2VyIl0sICJlbWFpbHMiOiBbeyJ2YWx1ZSI6ICJyb2JlcnRvLnNhYmlhQGVzYS5pbnQifV19LCB7Im5hbWUiOiAiTWFnZWxsaXVtIiwgInJvbGVzIjogWyJjb25zb3JpdHVtX21lbWJlciJdLCAiZW1haWxzIjogW3sidmFsdWUiOiAibWFnZWxsaXVtLmZyIn1dfV0sICJ0aXRsZSI6ICI0REF0bGFudGljLU9IQyIsICJleHRlbnQiOiB7InNwYXRpYWwiOiB7ImJib3giOiBbWy0xODAuMCwgLTkwLjAsIDE4MC4wLCA5MC4wXV19LCAidGVtcG9yYWwiOiB7ImludGVydmFsIjogW1siMjAyMS0wNy0wNlQwMDowMDowMFoiLCAiMjAyNS0wNi0xMlQwMDowMDowMFoiXV19fSwgImxpY2Vuc2UiOiAidmFyaW91cyJ9
3. Open a PR via the OSC Editor#
Now you can use the OSC Editor and GUI to preview your data and open a pull request.
After creation of Pull Request you should see it on the list: ESA-EarthCODE/open-science-catalog-metadata
Check the status of your PR under: ESA-EarthCODE/open-science-catalog-metadata
Changes to the OSC content will be reviewed by the OSC Data Steward team. In case of any chenges needed to your inputs, you will be contacted by the team.
4. Repeat for product or workflow.#
Once the project is added to the OSC, you can repeat the same process for your product.
# Now save the product data
# NOTE: Always use the same sesion title for project,product or project, workflow pairs, etc
product_url = generate_osc_editor_link(product_collection, 'product', session_title=project_collection.title)
print('Click on the below link to setup the product information: ')
print(product_url)