-
Notifications
You must be signed in to change notification settings - Fork 3
merge esgvoc in main #286 #287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ltroussellier
wants to merge
54
commits into
main
Choose a base branch
from
esgvoc_main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
137f09f
first commit
alaupin-ipsl 57f8111
feat : Add activity_id
alaupin-ipsl a2b714a
feat : Add CMIP_brandedVariable collection
alaupin-ipsl 85820ef
feat : Add CMIP7_dataConventions collection
alaupin-ipsl 228d093
feat : Add CMIP7_dataRegion collection
alaupin-ipsl b120bcb
feat : Add CMIP7_datasetSpecs collection
alaupin-ipsl d84e8a8
feat : Add CMIP7_datasetVariant collection
alaupin-ipsl da3d5b6
feat : Add CMIP7_datasetVersion collection
alaupin-ipsl 7f79e14
feat : Add CMIP7_dateCreated collection
alaupin-ipsl 599e0ef
feat : Add CMIP7_experiment collection
alaupin-ipsl cc89e54
feat : Add CMIP7_forcing collection
alaupin-ipsl 035ddd2
feat : Add CMIP7_gridLabel collection
alaupin-ipsl 550bec2
feat : Add CMIP7_initialization collection
alaupin-ipsl 4cd6ae4
feat : Add CMIP7_license collection
alaupin-ipsl 5ae1b98
feat : Add CMIP7_nominalResolution collection
alaupin-ipsl 77fae06
feat : Add CMIP7_physics collection
alaupin-ipsl d66a4a5
feat : Add CMIP7_realization collection
alaupin-ipsl caca702
feat : Add CMIP7_realm collection
alaupin-ipsl ef48346
feat : Add CMIP7_reportingInterval collection
alaupin-ipsl 1ce0f90
feat : Add CMIP7_timeRange collection
alaupin-ipsl a752a60
feat : Add CMIP7_uniqueField collection
alaupin-ipsl 598e433
feat : Add project_specs.json
alaupin-ipsl 90977a5
feat : Add screation scripts
alaupin-ipsl 6f23b9e
fix : Remove all brandedVariables
alaupin-ipsl 7dbdf88
feat : Add CMIP7_brandedVariable
alaupin-ipsl 79f25be
feat : Add overriding fields on experiment CV terms for all fields up…
alaupin-ipsl 6eb9383
feat : Add script to create CV terms for known_branded_variable
alaupin-ipsl a9e8920
feat : Add gitignore
alaupin-ipsl 8352562
feat : Add experiment context jsonld
alaupin-ipsl 2d668e0
fix : Change resolution type name
alaupin-ipsl 37dbb5d
fix : change nominal_resolution into resolution
ltroussellier 3db6cbc
fix : add missing context
ltroussellier 2ce3f1c
fix : Update brandedVariables
alaupin-ipsl b71f63e
Merge branch 'main' of https://github.com/alaupin-ipsl/CMIP7_CVs
alaupin-ipsl d40a56b
fix : remove .json from id
ltroussellier 2d78c4f
feat : rework of experiment script
ltroussellier 084c5d6
fix : Fix project_specs source_collections names and add some missing…
alaupin-ipsl 83de658
fix : some things
alaupin-ipsl f5675d9
fix : rename realization in realisation
ltroussellier ec71eb2
feat : add collection and term CMIP7_archive
ltroussellier a3d7b29
feat : Add ...Labels
alaupin-ipsl 00bb254
Merge branch 'main' of https://github.com/alaupin-ipsl/CMIP7_CVs
alaupin-ipsl 13664ad
fix : Remove Prefix CMIP7_ from all directory + minor tweaks
ltroussellier fd96eaf
fix : remove obselete prefixes
ltroussellier 3f3f864
fix : z into s
ltroussellier e0fc718
Issue #276: Remove scenario experiments from esgvoc branch
matthew-mizielinski 2f4e7bb
Merge pull request #281 from WCRP-CMIP/276_ScenarioMIP-experiment-rem…
ltroussellier 1907fc3
feat : split json into 4 yaml files
ltroussellier f787775
feat : update for last release of esgvoc
ltroussellier a05787f
Merge branch 'esgvoc' into esgvoc_main
ltroussellier e990f9c
chore : rename docs to not be considered as a collection
ltroussellier c27937a
chore : delete unused file
ltroussellier eedc8da
feat : Better README
ltroussellier 279f3d2
fix : disable workflows for now
ltroussellier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ on: | |
|
|
||
| jobs: | ||
| check-graph: | ||
| if: false | ||
| runs-on: ubuntu-latest # Specify the machine type | ||
|
|
||
| steps: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ on: | |
|
|
||
| jobs: | ||
| deploy-docs: | ||
| if: false | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,7 @@ on: | |
|
|
||
| jobs: | ||
| update-jsonld: | ||
| if: false | ||
| runs-on: ubuntu-latest # Specify the machine type | ||
|
|
||
| steps: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| import json | ||
| import os | ||
| from pathlib import Path | ||
|
|
||
| import esgvoc.api as ev | ||
| import requests | ||
|
|
||
| # URLs of the JSON files on GitHub | ||
| json_url = "https://raw.githubusercontent.com/WCRP-CMIP/CMIP7-CVs/refs/heads/main/CMIP7-CVs_activity.json" | ||
|
|
||
| # Directory where the JSON files will be saved | ||
| save_dir = "CMIP7_activity" | ||
|
|
||
| # Create the directory if it doesn't exist | ||
| os.makedirs(save_dir, exist_ok=True) | ||
|
|
||
|
|
||
| # Function to fetch and load JSON data from a URL | ||
| def fetch_json(url): | ||
| response = requests.get(url) | ||
| response.raise_for_status() # Check for request errors | ||
| return response.json() | ||
|
|
||
|
|
||
| data = fetch_json(json_url)["activity"] | ||
|
|
||
| known_sources_in_universe = ev.get_all_terms_in_data_descriptor("activity") | ||
| print(known_sources_in_universe) | ||
| for item in data: | ||
| found_item = None | ||
| for activity in known_sources_in_universe: | ||
| if activity.drs_name == item: | ||
| found_item = activity | ||
| break | ||
|
|
||
| if found_item is None: | ||
| print(item, "not found in universe") | ||
| else: | ||
| # Create json file | ||
| dict_to_save = { | ||
| "@context": "000_context.jsonld", | ||
| "id": found_item.id, | ||
| "type": found_item.type, | ||
| } | ||
| # print(dict_to_save) | ||
| with open(Path(save_dir) / f"{found_item.id}.json", "w") as f: | ||
| json.dump(dict_to_save, f, indent=4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import esgvoc.api as ev | ||
| from icecream import IceCreamDebugger | ||
| import devtools | ||
|
|
||
| ic = IceCreamDebugger(argToStringFunction=devtools.pformat) | ||
|
|
||
|
|
||
| def main(): | ||
| known_bv_in_universe = ev.get_all_terms_in_data_descriptor("known_branded_variable") | ||
| i = 0 | ||
| for bv in known_bv_in_universe: | ||
| i = i + 1 | ||
| if i == 5: | ||
| break | ||
| ic(bv) | ||
| temporal_label = bv.temporal_label | ||
| vertical_label = bv.vertical_label | ||
| horizontal_label = bv.horizontal_label | ||
| area_label = bv.area_label | ||
| ic([temporal_label, vertical_label, horizontal_label, area_label]) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard coded disabling is bad practice. You can disable the actions directly, specify when to run (ie not on main). Or define a global variable / file to determine what the action does.