esgvoc 1.0.1__tar.gz → 1.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of esgvoc might be problematic. Click here for more details.

Files changed (188) hide show
  1. {esgvoc-1.0.1 → esgvoc-1.1.1}/PKG-INFO +2 -1
  2. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/miscellaneous.md +1 -1
  3. esgvoc-1.1.1/docs/source/how_to/configuration.rst +296 -0
  4. {esgvoc-1.0.1 → esgvoc-1.1.1}/pyproject.toml +3 -0
  5. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/__init__.py +1 -1
  6. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/__init__.py +0 -6
  7. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/__init__.py +6 -0
  8. esgvoc-1.1.1/src/esgvoc/api/data_descriptors/archive.py +5 -0
  9. esgvoc-1.1.1/src/esgvoc/api/data_descriptors/citation_url.py +5 -0
  10. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/experiment.py +2 -2
  11. esgvoc-1.1.1/src/esgvoc/api/data_descriptors/known_branded_variable.py +76 -0
  12. esgvoc-1.1.1/src/esgvoc/api/data_descriptors/regex.py +5 -0
  13. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/vertical_label.py +2 -2
  14. esgvoc-1.1.1/src/esgvoc/api/project_specs.py +116 -0
  15. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/projects.py +104 -63
  16. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/apps/drs/generator.py +47 -42
  17. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/apps/drs/validator.py +22 -38
  18. esgvoc-1.1.1/src/esgvoc/apps/jsg/json_schema_generator.py +310 -0
  19. esgvoc-1.1.1/src/esgvoc/apps/jsg/templates/template.jinja +249 -0
  20. esgvoc-1.1.1/src/esgvoc/apps/test_cv/README.md +214 -0
  21. esgvoc-1.1.1/src/esgvoc/apps/test_cv/cv_tester.py +1368 -0
  22. esgvoc-1.1.1/src/esgvoc/apps/test_cv/example_usage.py +216 -0
  23. esgvoc-1.1.1/src/esgvoc/apps/vr/__init__.py +12 -0
  24. esgvoc-1.1.1/src/esgvoc/apps/vr/build_variable_registry.py +71 -0
  25. esgvoc-1.1.1/src/esgvoc/apps/vr/example_usage.py +60 -0
  26. esgvoc-1.1.1/src/esgvoc/apps/vr/vr_app.py +333 -0
  27. esgvoc-1.1.1/src/esgvoc/cli/config.py +1085 -0
  28. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/drs.py +39 -21
  29. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/main.py +2 -0
  30. esgvoc-1.1.1/src/esgvoc/cli/test_cv.py +257 -0
  31. esgvoc-1.1.1/src/esgvoc/core/constants.py +16 -0
  32. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/data_handler.py +24 -22
  33. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/connection.py +7 -0
  34. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/project_ingestion.py +34 -9
  35. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/universe_ingestion.py +1 -2
  36. esgvoc-1.1.1/src/esgvoc/core/service/configuration/setting.py +259 -0
  37. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/service/data_merger.py +1 -1
  38. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/service/state.py +18 -2
  39. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_api_project.py +1 -1
  40. esgvoc-1.1.1/tests/test_cli_config.py +1389 -0
  41. esgvoc-1.1.1/tests/test_js_generator.py +172 -0
  42. esgvoc-1.1.1/useage_example/.ipynb_checkpoints/Basic-checkpoint.ipynb +473 -0
  43. esgvoc-1.1.1/useage_example/Basic.ipynb +473 -0
  44. esgvoc-1.0.1/src/esgvoc/api/data_descriptors/known_branded_variable.py +0 -23
  45. esgvoc-1.0.1/src/esgvoc/api/project_specs.py +0 -198
  46. esgvoc-1.0.1/src/esgvoc/apps/jsg/cmip6_template.json +0 -74
  47. esgvoc-1.0.1/src/esgvoc/apps/jsg/json_schema_generator.py +0 -194
  48. esgvoc-1.0.1/src/esgvoc/cli/config.py +0 -500
  49. esgvoc-1.0.1/src/esgvoc/core/constants.py +0 -13
  50. esgvoc-1.0.1/src/esgvoc/core/service/configuration/setting.py +0 -88
  51. esgvoc-1.0.1/tests/test_cli_config.py +0 -108
  52. esgvoc-1.0.1/tests/test_js_generator.py +0 -95
  53. {esgvoc-1.0.1 → esgvoc-1.1.1}/.flake8 +0 -0
  54. {esgvoc-1.0.1 → esgvoc-1.1.1}/.github/workflows/docs.yml +0 -0
  55. {esgvoc-1.0.1 → esgvoc-1.1.1}/.github/workflows/pypi-publish.yml +0 -0
  56. {esgvoc-1.0.1 → esgvoc-1.1.1}/.github/workflows/unit_tests.yml +0 -0
  57. {esgvoc-1.0.1 → esgvoc-1.1.1}/.gitignore +0 -0
  58. {esgvoc-1.0.1 → esgvoc-1.1.1}/.pre-commit-config.yaml +0 -0
  59. {esgvoc-1.0.1 → esgvoc-1.1.1}/LICENSE.txt +0 -0
  60. {esgvoc-1.0.1 → esgvoc-1.1.1}/README.md +0 -0
  61. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/Makefile +0 -0
  62. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/build.sh +0 -0
  63. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_Valid_Term.png +0 -0
  64. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_Valid_all_project.png +0 -0
  65. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_Valid_collection.png +0 -0
  66. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_Valid_project.png +0 -0
  67. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_drsgen_frombag.png +0 -0
  68. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_drsgen_map.png +0 -0
  69. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/API_drsvalid_one.png +0 -0
  70. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/CLI_Valid_all_project.png +0 -0
  71. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/CLI_Valid_collection.png +0 -0
  72. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/CLI_Valid_project.png +0 -0
  73. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/CLI_Valid_term.png +0 -0
  74. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/CLI_drsgen_frombag.png +0 -0
  75. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/CLI_drsvalid_one.png +0 -0
  76. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/Jup_one_term.png +0 -0
  77. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/Jup_one_term_from_one_CV.png +0 -0
  78. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/Jup_terms_from_one_collection.png +0 -0
  79. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/Jup_terms_from_one_dd.png +0 -0
  80. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/all_collection.png +0 -0
  81. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/all_term_from_one_collection.png +0 -0
  82. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/install.png +0 -0
  83. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/one_term.png +0 -0
  84. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/one_term_from_one_cv.png +0 -0
  85. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/status_after_install.png +0 -0
  86. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/_static/status_before_install.png +0 -0
  87. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/data_descriptors.md +0 -0
  88. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/drs.md +0 -0
  89. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/jsg.md +0 -0
  90. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/project_specs.md +0 -0
  91. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/projects.md +0 -0
  92. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/api_documentation/universe.md +0 -0
  93. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/conf.py +0 -0
  94. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/guides/basics_drs.ipynb +0 -0
  95. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/guides/basics_esgvoc.ipynb +0 -0
  96. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/guides/status_install.png +0 -0
  97. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/how_to/generate_drs.rst +0 -0
  98. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/how_to/get.rst +0 -0
  99. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/how_to/valid.rst +0 -0
  100. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/how_to/validate_drs.rst +0 -0
  101. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/index.md +0 -0
  102. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/user/api.md +0 -0
  103. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/user/cached_database.md +0 -0
  104. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/user/cli.md +0 -0
  105. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/user/introduction.md +0 -0
  106. {esgvoc-1.0.1 → esgvoc-1.1.1}/docs/source/user/terms.md +0 -0
  107. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/activity.py +0 -0
  108. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/area_label.py +0 -0
  109. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/branded_suffix.py +0 -0
  110. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/branded_variable.py +0 -0
  111. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/consortium.py +0 -0
  112. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/contact.py +0 -0
  113. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/conventions.py +0 -0
  114. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/creation_date.py +0 -0
  115. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/data_descriptor.py +0 -0
  116. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/data_specs_version.py +0 -0
  117. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/date.py +0 -0
  118. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/directory_date.py +0 -0
  119. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/forcing_index.py +0 -0
  120. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/frequency.py +0 -0
  121. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/further_info_url.py +0 -0
  122. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/grid_label.py +0 -0
  123. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/horizontal_label.py +0 -0
  124. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/initialisation_index.py +0 -0
  125. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/institution.py +0 -0
  126. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/license.py +0 -0
  127. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/member_id.py +0 -0
  128. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/mip_era.py +0 -0
  129. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/model_component.py +0 -0
  130. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/obs_type.py +0 -0
  131. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/organisation.py +0 -0
  132. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/physic_index.py +0 -0
  133. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/product.py +0 -0
  134. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/publication_status.py +0 -0
  135. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/realisation_index.py +0 -0
  136. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/realm.py +0 -0
  137. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/region.py +0 -0
  138. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/resolution.py +0 -0
  139. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/source.py +0 -0
  140. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/source_type.py +0 -0
  141. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/sub_experiment.py +0 -0
  142. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/table.py +0 -0
  143. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/temporal_label.py +0 -0
  144. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/time_range.py +0 -0
  145. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/title.py +0 -0
  146. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/tracking_id.py +0 -0
  147. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/variable.py +0 -0
  148. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/data_descriptors/variant_label.py +0 -0
  149. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/py.typed +0 -0
  150. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/report.py +0 -0
  151. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/search.py +0 -0
  152. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/api/universe.py +0 -0
  153. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/apps/__init__.py +0 -0
  154. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/apps/drs/__init__.py +0 -0
  155. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/apps/drs/constants.py +0 -0
  156. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/apps/drs/report.py +0 -0
  157. {esgvoc-1.0.1/tests → esgvoc-1.1.1/src/esgvoc/apps/test_cv}/__init__.py +0 -0
  158. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/find.py +0 -0
  159. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/get.py +0 -0
  160. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/install.py +0 -0
  161. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/status.py +0 -0
  162. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/cli/valid.py +0 -0
  163. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/convert.py +0 -0
  164. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/__init__.py +0 -0
  165. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/models/mixins.py +0 -0
  166. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/models/project.py +0 -0
  167. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/db/models/universe.py +0 -0
  168. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/exceptions.py +0 -0
  169. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/logging_handler.py +0 -0
  170. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/repo_fetcher.py +0 -0
  171. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/service/__init__.py +0 -0
  172. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/service/configuration/config_manager.py +0 -0
  173. {esgvoc-1.0.1 → esgvoc-1.1.1}/src/esgvoc/core/service/esg_voc.py +0 -0
  174. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/Dockerfile +0 -0
  175. /esgvoc-1.0.1/src/esgvoc/apps/py.typed → /esgvoc-1.1.1/tests/__init__.py +0 -0
  176. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/api_inputs.py +0 -0
  177. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/cli_input_drsgen.txt +0 -0
  178. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/cli_input_drsvalid.txt +0 -0
  179. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/conftest.py +0 -0
  180. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/integration/test_scenario_basic.py +0 -0
  181. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_api_universe.py +0 -0
  182. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_cli_drs.py +0 -0
  183. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_config.py +0 -0
  184. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_data_handler.py +0 -0
  185. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_data_merger.py +0 -0
  186. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_drs_generator.py +0 -0
  187. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_drs_validator.py +0 -0
  188. {esgvoc-1.0.1 → esgvoc-1.1.1}/tests/test_repo_fetcher.py +0 -0
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: esgvoc
3
- Version: 1.0.1
3
+ Version: 1.1.1
4
4
  Summary: python library and CLI to interact with WCRP CVs
5
5
  Project-URL: Repository, https://github.com/ESGF/esgf-vocab
6
6
  Author-email: Sébastien Gardoll <sebastien@gardoll.fr>, Guillaume Levavasseur <guillaume.levavasseur@ipsl.fr>, Laurent Troussellier <laurent.troussellier@ipsl.fr>
7
7
  License: CECILL-2.1
8
8
  Requires-Python: >=3.10
9
9
  Requires-Dist: idna>=3.10
10
+ Requires-Dist: jinja2>=3.1.6
10
11
  Requires-Dist: platformdirs>=4.3.6
11
12
  Requires-Dist: pydantic>=2.9.2
12
13
  Requires-Dist: pyld>=2.0.4
@@ -2,7 +2,7 @@
2
2
 
3
3
  ```{eval-rst}
4
4
  .. automodule:: esgvoc.api.search
5
- :members: Item
5
+ :members: Item, MatchingTerm
6
6
  :imported-members:
7
7
  :member-order: groupwise
8
8
  .. autoclass:: esgvoc.api.search.ItemKind
@@ -0,0 +1,296 @@
1
+ Configuration
2
+ #############
3
+
4
+ The configuration system allows you to manage different project setups and easily switch between them. Each configuration defines which projects are active and where their repositories and databases are stored.
5
+
6
+ Understanding Configurations
7
+ ============================
8
+
9
+ A configuration contains:
10
+
11
+ - **Universe settings**: Global WCRP vocabulary repository settings
12
+ - **Project settings**: Individual project repositories (CMIP6, Input4MIPs, etc.)
13
+
14
+ Default Projects Available
15
+ ==========================
16
+
17
+ ESGVoc comes with several pre-configured projects that can be easily added:
18
+
19
+ - **cmip6**: CMIP6 Controlled Vocabularies
20
+ - **cmip6plus**: CMIP6Plus Controlled Vocabularies
21
+ - **input4mip**: Input4MIPs Controlled Vocabularies
22
+ - **obs4mip**: Obs4MIPs Controlled Vocabularies
23
+ - **cordex-cmip6**: CORDEX-CMIP6 Controlled Vocabularies
24
+
25
+ Basic Configuration Commands
26
+ ============================
27
+
28
+ Viewing Available Projects
29
+ --------------------------
30
+
31
+ .. code-block:: bash
32
+
33
+ # Show all available projects and their status in current config
34
+ esgvoc config avail
35
+
36
+ # Check projects in a specific configuration
37
+ esgvoc config avail --config my_config
38
+
39
+ This displays a table showing which projects are active (✓) and which are available to add (○).
40
+
41
+ Creating Empty Configurations
42
+ -----------------------------
43
+
44
+ .. code-block:: bash
45
+
46
+ # Create empty configuration and switch to it
47
+ esgvoc config init minimal_setup
48
+
49
+ # Create empty configuration but stay on current one
50
+ esgvoc config init test_config --no-switch
51
+
52
+ An empty configuration contains only universe settings with no projects, allowing you to add projects selectively.
53
+
54
+ Adding Projects
55
+ ---------------
56
+
57
+ .. code-block:: bash
58
+
59
+ # Add single project to current configuration
60
+ esgvoc config add input4mip
61
+
62
+ # Add multiple projects at once
63
+ esgvoc config add input4mip obs4mip cordex-cmip6
64
+
65
+ # Add projects to specific configuration
66
+ esgvoc config add cmip6 --config production
67
+
68
+ When you add projects:
69
+
70
+ 1. The project is added to the configuration using default settings
71
+ 2. The project's controlled vocabularies are automatically downloaded
72
+ 3. Local repositories and databases are set up
73
+
74
+ .. note::
75
+ Projects that already exist in the configuration will be skipped with a warning.
76
+
77
+ Removing Projects
78
+ -----------------
79
+
80
+ .. code-block:: bash
81
+
82
+ # Remove single project (with confirmation)
83
+ esgvoc config rm input4mip
84
+
85
+ # Remove multiple projects at once
86
+ esgvoc config rm input4mip obs4mip cordex-cmip6
87
+
88
+ # Remove without confirmation prompt
89
+ esgvoc config rm input4mip --force
90
+
91
+ # Remove from configuration but keep local files
92
+ esgvoc config rm input4mip --keep-files
93
+
94
+ When you remove projects:
95
+
96
+ 1. The project is removed from the configuration
97
+ 2. Local repository directory is deleted (unless ``--keep-files``)
98
+ 3. Database file is deleted (unless ``--keep-files``)
99
+
100
+ .. warning::
101
+ By default, removing a project deletes all its local files. Use ``--keep-files`` if you want to preserve the downloaded data.
102
+
103
+ Advanced Configuration Management
104
+ =================================
105
+
106
+ Listing Configurations
107
+ ----------------------
108
+
109
+ .. code-block:: bash
110
+
111
+ # List all available configurations
112
+ esgvoc config list
113
+
114
+ # Show current configuration content
115
+ esgvoc config show
116
+
117
+ # Show specific configuration content
118
+ esgvoc config show my_config
119
+
120
+ Creating New Configurations
121
+ ---------------------------
122
+
123
+ .. code-block:: bash
124
+
125
+ # Create configuration based on default settings
126
+ esgvoc config create production
127
+
128
+ # Create configuration based on existing one
129
+ esgvoc config create test --base production
130
+
131
+ # Create and immediately switch to it
132
+ esgvoc config create development --switch
133
+
134
+ Switching Configurations
135
+ ------------------------
136
+
137
+ .. code-block:: bash
138
+
139
+ # Switch to different configuration
140
+ esgvoc config switch production
141
+
142
+ # Check which configuration is currently active
143
+ esgvoc config list
144
+
145
+ Managing Project Settings
146
+ -------------------------
147
+
148
+ .. code-block:: bash
149
+
150
+ # List projects in current configuration
151
+ esgvoc config list-projects
152
+
153
+ # List projects in specific configuration
154
+ esgvoc config list-projects --config production
155
+
156
+ # Update project repository URL
157
+ esgvoc config update-project cmip6 --repo https://github.com/new/repo
158
+
159
+ # Update project branch
160
+ esgvoc config update-project cmip6 --branch new_branch
161
+
162
+ # Update multiple settings at once
163
+ esgvoc config update-project cmip6 --repo https://github.com/new/repo --branch main
164
+
165
+ Manual Configuration Editing
166
+ -----------------------------
167
+
168
+ .. code-block:: bash
169
+
170
+ # Edit current configuration in default editor
171
+ esgvoc config edit
172
+
173
+ # Edit specific configuration
174
+ esgvoc config edit production
175
+
176
+ # Use specific editor
177
+ esgvoc config edit --editor nano
178
+
179
+ # Modify settings via command line
180
+ esgvoc config set 'universe:branch=esgvoc_dev'
181
+ esgvoc config set 'cmip6:github_repo=https://github.com/new/cmip6'
182
+
183
+ Removing Configurations
184
+ -----------------------
185
+
186
+ .. code-block:: bash
187
+
188
+ # Remove configuration (with confirmation)
189
+ esgvoc config remove test_config
190
+
191
+ .. note::
192
+ You cannot remove the "default" configuration, and removing the active configuration will automatically switch you to the default one.
193
+
194
+ Configuration Workflows
195
+ ========================
196
+
197
+ Setting Up a Development Environment
198
+ ------------------------------------
199
+
200
+ .. code-block:: bash
201
+
202
+ # Create empty development configuration
203
+ esgvoc config init dev
204
+
205
+ # Add only the projects you need
206
+ esgvoc config add cmip6 input4mip
207
+
208
+ # Check what's active
209
+ esgvoc config avail
210
+
211
+ Setting Up Multiple Project Environments
212
+ ----------------------------------------
213
+
214
+ .. code-block:: bash
215
+
216
+ # Create minimal configuration for CMIP6 only
217
+ esgvoc config init cmip6_only
218
+ esgvoc config add cmip6
219
+
220
+ # Create full configuration with all projects
221
+ esgvoc config init full_setup
222
+ esgvoc config add cmip6 cmip6plus input4mip obs4mip cordex-cmip6
223
+
224
+ # Switch between them as needed
225
+ esgvoc config switch cmip6_only
226
+ esgvoc config switch full_setup
227
+
228
+ Cleaning Up Old Projects
229
+ ------------------------
230
+
231
+ .. code-block:: bash
232
+
233
+ # Check what projects are currently active
234
+ esgvoc config avail
235
+
236
+ # Remove projects no longer needed (keeps files)
237
+ esgvoc config rm obs4mip cordex-cmip6 --keep-files
238
+
239
+ # Or remove completely including files
240
+ esgvoc config rm obs4mip cordex-cmip6
241
+
242
+ Configuration File Location
243
+ ===========================
244
+
245
+ Configuration files are stored in platform-specific directories:
246
+
247
+ - **Linux**: ``~/.config/esgvoc/``
248
+ - **macOS**: ``~/Library/Application Support/esgvoc/``
249
+ - **Windows**: ``%APPDATA%\\esgvoc\\``
250
+
251
+ The main registry file (``config_registry.toml``) tracks all configurations and which one is active.
252
+
253
+ Troubleshooting
254
+ ===============
255
+
256
+ Configuration Not Found
257
+ -----------------------
258
+
259
+ If you get "Configuration not found" errors:
260
+
261
+ .. code-block:: bash
262
+
263
+ # List available configurations
264
+ esgvoc config list
265
+
266
+ # Switch to default if needed
267
+ esgvoc config switch default
268
+
269
+ Project Already Exists
270
+ ----------------------
271
+
272
+ When adding projects that already exist:
273
+
274
+ .. code-block:: bash
275
+
276
+ # Check current projects
277
+ esgvoc config list-projects
278
+
279
+ # Check all available projects and their status
280
+ esgvoc config avail
281
+
282
+ Reset to Clean State
283
+ --------------------
284
+
285
+ To start fresh:
286
+
287
+ .. code-block:: bash
288
+
289
+ # Create new empty configuration
290
+ esgvoc config init fresh --no-switch
291
+
292
+ # Remove old configuration
293
+ esgvoc config remove old_config
294
+
295
+ # Switch to clean setup
296
+ esgvoc config switch fresh
@@ -21,6 +21,7 @@ dependencies = [
21
21
  "toml>=0.10.2",
22
22
  "typer>=0.15.0",
23
23
  "platformdirs>=4.3.6",
24
+ "jinja2>=3.1.6",
24
25
  ]
25
26
  readme = "README.md"
26
27
  requires-python = ">= 3.10"
@@ -59,6 +60,8 @@ dev = [
59
60
  "pytest>=8.3.5",
60
61
  "pytest-mock>=3.14.0",
61
62
  "pytest-cov>=6.0.0",
63
+ "jsonschema>=4.24.0",
64
+ "pip>=25.2",
62
65
  ]
63
66
 
64
67
  [tool.hatch.metadata]
@@ -1,3 +1,3 @@
1
1
  import esgvoc.core.logging_handler # noqa
2
2
 
3
- __version__ = "1.0.1"
3
+ __version__ = "1.1.1"
@@ -1,8 +1,5 @@
1
1
  from esgvoc.api.project_specs import (
2
- DrsCollection,
3
- DrsConstant,
4
2
  DrsPart,
5
- DrsPartKind,
6
3
  DrsSpecification,
7
4
  DrsType,
8
5
  ProjectSpecs,
@@ -51,10 +48,7 @@ from esgvoc.api.universe import (
51
48
  )
52
49
 
53
50
  __all__ = [
54
- "DrsCollection",
55
- "DrsConstant",
56
51
  "DrsPart",
57
- "DrsPartKind",
58
52
  "DrsSpecification",
59
53
  "DrsType",
60
54
  "find_collections_in_project",
@@ -1,7 +1,9 @@
1
1
  from esgvoc.api.data_descriptors.activity import Activity
2
+ from esgvoc.api.data_descriptors.archive import Archive
2
3
  from esgvoc.api.data_descriptors.area_label import AreaLabel
3
4
  from esgvoc.api.data_descriptors.branded_suffix import BrandedSuffix
4
5
  from esgvoc.api.data_descriptors.branded_variable import BrandedVariable
6
+ from esgvoc.api.data_descriptors.citation_url import CitationUrl
5
7
  from esgvoc.api.data_descriptors.consortium import Consortium
6
8
  from esgvoc.api.data_descriptors.contact import Contact
7
9
  from esgvoc.api.data_descriptors.conventions import Convention
@@ -30,6 +32,7 @@ from esgvoc.api.data_descriptors.product import Product
30
32
  from esgvoc.api.data_descriptors.publication_status import PublicationStatus
31
33
  from esgvoc.api.data_descriptors.realisation_index import RealisationIndex
32
34
  from esgvoc.api.data_descriptors.realm import Realm
35
+ from esgvoc.api.data_descriptors.regex import Regex
33
36
  from esgvoc.api.data_descriptors.region import Region
34
37
  from esgvoc.api.data_descriptors.resolution import Resolution
35
38
  from esgvoc.api.data_descriptors.source import Source
@@ -90,4 +93,7 @@ DATA_DESCRIPTOR_CLASS_MAPPING: dict[str, type[DataDescriptor]] = {
90
93
  "region": Region,
91
94
  "member_id": MemberId,
92
95
  "obs_type": ObsType, # obs4Mips
96
+ "regex": Regex,
97
+ "citation_url": CitationUrl,
98
+ "archive": Archive,
93
99
  }
@@ -0,0 +1,5 @@
1
+ from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
2
+
3
+
4
+ class Archive(PlainTermDataDescriptor):
5
+ pass
@@ -0,0 +1,5 @@
1
+ from esgvoc.api.data_descriptors.data_descriptor import PatternTermDataDescriptor
2
+
3
+
4
+ class CitationUrl(PatternTermDataDescriptor):
5
+ pass
@@ -20,8 +20,8 @@ class Experiment(PlainTermDataDescriptor):
20
20
  experiment: str
21
21
  required_model_components: list[str] | None
22
22
  additional_allowed_model_components: list[str] = Field(default_factory=list)
23
- start_year: int | None
24
- end_year: int | None
23
+ start_year: str | int | None
24
+ end_year: str | int | None
25
25
  min_number_yrs_per_sim: int | None
26
26
  parent_activity_id: list[str] | None
27
27
  parent_experiment_id: list[str] | None
@@ -0,0 +1,76 @@
1
+ from typing import Any, Dict, List, Optional
2
+
3
+ from pydantic import Field
4
+
5
+ from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
6
+
7
+ #
8
+ # class KnownBrandedVariable(PlainTermDataDescriptor):
9
+ # """
10
+ # A climate-related quantity or measurement, including information about sampling.
11
+ #
12
+ # The concept of a branded variable was introduced in CMIP7.
13
+ # A branded variable is composed of two parts.
14
+ # The first part is the root variable (see :py:class:`Variable`).
15
+ # The second is the suffix (see :py:class:`BrandedSuffix`).
16
+ #
17
+ # For further details on the development of branded variables,
18
+ # see [this paper draft](https://docs.google.com/document/d/19jzecgymgiiEsTDzaaqeLP6pTvLT-NzCMaq-wu-QoOc/edit?pli=1&tab=t.0).
19
+ # """
20
+ #
21
+ # description: str
22
+ # dimensions: list[str] = Field(default_factory=list)
23
+ # cell_methods: str
24
+ # variable: str
25
+ # label: str
26
+ #
27
+
28
+
29
+ class KnownBrandedVariable(PlainTermDataDescriptor):
30
+ """
31
+ A climate-related quantity or measurement, including information about sampling.
32
+
33
+ The concept of a branded variable was introduced in CMIP7.
34
+ A branded variable is composed of two parts.
35
+ The first part is the root variable (see :py:class:`Variable`).
36
+ The second is the suffix (see :py:class:`BrandedSuffix`).
37
+
38
+ For further details on the development of branded variables,
39
+ see [this paper draft](https://docs.google.com/document/d/19jzecgymgiiEsTDzaaqeLP6pTvLT-NzCMaq-wu-QoOc/edit?pli=1&tab=t.0).
40
+ """
41
+
42
+ # # ESGVoc required fields
43
+ # id: str = Field(description="Unique identifier, e.g., 'ta_tavg-p19-hxy-air'")
44
+ # type: str = Field(default="branded_variable", description="ESGVoc type identifier")
45
+ # drs_name: str = Field(description="DRS name, same as id")
46
+ # => already in PlainTermDataDescriptor
47
+
48
+ # CF Standard Name context (flattened from hierarchy)
49
+ cf_standard_name: str = Field(description="CF standard name, e.g., 'air_temperature'")
50
+ cf_units: str = Field(description="CF standard units, e.g., 'K'")
51
+ cf_sn_status: str = Field(description="CF standard name status, e.g., 'approved'")
52
+
53
+ # Variable Root context (flattened from hierarchy)
54
+ variable_root_name: str = Field(description="Variable root name, e.g., 'ta'")
55
+ var_def_qualifier: str = Field(default="", description="Variable definition qualifier")
56
+ branding_suffix_name: str = Field(description="Branding suffix, e.g., 'tavg-p19-hxy-air'")
57
+
58
+ # Variable metadata
59
+ description: str = Field(description="Human-readable description")
60
+ dimensions: List[str] = Field(description="NetCDF dimensions")
61
+ cell_methods: str = Field(default="", description="CF cell_methods attribute")
62
+ cell_measures: str = Field(default="", description="CF cell_measures attribute")
63
+ history: str = Field(default="", description="Processing history")
64
+ realm: str = Field(description="Earth system realm, e.g., 'atmos'")
65
+
66
+ # Label components (embedded, not references)
67
+ temporal_label: str = Field(description="Temporal label, e.g., 'tavg'")
68
+ vertical_label: str = Field(description="Vertical label, e.g., 'p19'")
69
+ horizontal_label: str = Field(description="Horizontal label, e.g., 'hxy'")
70
+ area_label: str = Field(description="Area label, e.g., 'air'")
71
+
72
+ # Status
73
+ bn_status: str = Field(description="Branded variable status, e.g., 'accepted'")
74
+
75
+ # Additional required fields from specifications
76
+ positive_direction: str = Field(default="", description="Positive direction for the variable")
@@ -0,0 +1,5 @@
1
+ from esgvoc.api.data_descriptors.data_descriptor import PatternTermDataDescriptor
2
+
3
+
4
+ class Regex(PatternTermDataDescriptor):
5
+ pass
@@ -1,7 +1,7 @@
1
- from esgvoc.api.data_descriptors.data_descriptor import PatternTermDataDescriptor
1
+ from esgvoc.api.data_descriptors.data_descriptor import PlainTermDataDescriptor
2
2
 
3
3
 
4
- class VerticalLabel(PatternTermDataDescriptor):
4
+ class VerticalLabel(PlainTermDataDescriptor):
5
5
  """
6
6
  Vertical label.
7
7
 
@@ -0,0 +1,116 @@
1
+ from enum import Enum
2
+
3
+ from pydantic import BaseModel, ConfigDict
4
+
5
+
6
+ class DrsType(str, Enum):
7
+ """
8
+ The types of DRS specification (directory, file name and dataset id).
9
+ """
10
+
11
+ DIRECTORY = "directory"
12
+ """The DRS directory specification type."""
13
+ FILE_NAME = "file_name"
14
+ """The DRS file name specification type."""
15
+ DATASET_ID = "dataset_id"
16
+ """The DRS dataset id specification type."""
17
+
18
+
19
+ class DrsPart(BaseModel):
20
+ """A fragment of a DRS specification"""
21
+
22
+ source_collection: str
23
+ """The collection id."""
24
+ source_collection_term: str | None = None
25
+ "Specifies a specific term in the collection."
26
+ is_required: bool
27
+ """Whether the collection is required for the DRS specification or not."""
28
+
29
+ def __str__(self) -> str:
30
+ return self.source_collection
31
+
32
+
33
+ class DrsSpecification(BaseModel):
34
+ """
35
+ A DRS specification.
36
+ """
37
+
38
+ type: DrsType
39
+ """The type of the specification."""
40
+ regex: str
41
+ """General pattern for simples checks"""
42
+ separator: str
43
+ """The textual separator string or character."""
44
+ properties: dict | None = None
45
+ """The other specifications (e.g., file name extension for file name DRS specification)."""
46
+ parts: list[DrsPart]
47
+ """The parts of the DRS specification."""
48
+
49
+
50
+ class CatalogProperty(BaseModel):
51
+ """
52
+ A dataset property described in a catalog.
53
+ """
54
+
55
+ source_collection: str
56
+ "The project collection that originated the property."
57
+ catalog_field_value_type: str
58
+ "The type of the field value."
59
+ is_required: bool
60
+ "Specifies if the property must be present in the dataset properties."
61
+ source_collection_term: str | None = None
62
+ "Specifies a specific term in the collection."
63
+ catalog_field_name: str | None = None
64
+ "The name of the collection referenced in the catalog."
65
+ source_collection_key: str | None = None
66
+ "Specifies a key other than drs_name in the collection."
67
+
68
+
69
+ class CatalogExtension(BaseModel):
70
+ name: str
71
+ """The name of the extension"""
72
+ version: str
73
+ """The version of the extension"""
74
+
75
+
76
+ class CatalogProperties(BaseModel):
77
+ name: str
78
+ """The name of the catalog system."""
79
+ url_template: str
80
+ """The URI template of the catalog system."""
81
+ extensions: list[CatalogExtension]
82
+ """The extensions of the catalog."""
83
+
84
+
85
+ class CatalogSpecification(BaseModel):
86
+ """
87
+ A catalog specifications.
88
+ """
89
+
90
+ version: str
91
+ """The version of the catalog."""
92
+
93
+ catalog_properties: CatalogProperties
94
+ """The properties of the catalog."""
95
+
96
+ dataset_properties: list[CatalogProperty]
97
+ "The properties of the dataset described in a catalog."
98
+ file_properties: list[CatalogProperty]
99
+ "The properties of the files described in a catalog."
100
+
101
+
102
+ class ProjectSpecs(BaseModel):
103
+ """
104
+ A project specifications.
105
+ """
106
+
107
+ project_id: str
108
+ """The project id."""
109
+ description: str
110
+ """The description of the project."""
111
+ drs_specs: dict[DrsType, DrsSpecification]
112
+ """The DRS specifications of the project (directory, file name and dataset id)."""
113
+ # TODO: release = None when all projects have catalog_specs.yaml.
114
+ catalog_specs: CatalogSpecification | None = None
115
+ """The catalog specifications of the project."""
116
+ model_config = ConfigDict(extra="allow")