valuesets 0.4.2__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.
Files changed (515) hide show
  1. valuesets-0.4.2/.claude/agents/permissible-value-mapper.md +107 -0
  2. valuesets-0.4.2/.claude/hooks/README.md +40 -0
  3. valuesets-0.4.2/.claude/hooks/validate_schema_hook.py +124 -0
  4. valuesets-0.4.2/.claude/settings.json +15 -0
  5. valuesets-0.4.2/.claude/skills/pv-mapping/SKILL.md +84 -0
  6. valuesets-0.4.2/.claude/skills/pv-mapping/references/ontologies.md +58 -0
  7. valuesets-0.4.2/.claude/statsig/statsig.session_id.2656274335 +1 -0
  8. valuesets-0.4.2/.claude/statsig/statsig.stable_id.2656274335 +1 -0
  9. valuesets-0.4.2/.claude.json +20 -0
  10. valuesets-0.4.2/.copier-answers.yml +15 -0
  11. valuesets-0.4.2/.editorconfig +18 -0
  12. valuesets-0.4.2/.github/actions/claude-code-action/action.yml +167 -0
  13. valuesets-0.4.2/.github/actions/claude-issue-summarize-action/action.yml +74 -0
  14. valuesets-0.4.2/.github/actions/claude-issue-triage-action/action.yml +91 -0
  15. valuesets-0.4.2/.github/ai-controllers.json +1 -0
  16. valuesets-0.4.2/.github/copilot-instructions.md +1 -0
  17. valuesets-0.4.2/.github/copilot-setup-steps.yml +40 -0
  18. valuesets-0.4.2/.github/dependabot.yml +9 -0
  19. valuesets-0.4.2/.github/workflows/claude-code-review.yml +78 -0
  20. valuesets-0.4.2/.github/workflows/claude-issue-summarize.yml +25 -0
  21. valuesets-0.4.2/.github/workflows/claude-issue-triage.yml +24 -0
  22. valuesets-0.4.2/.github/workflows/claude.yml +95 -0
  23. valuesets-0.4.2/.github/workflows/deploy-docs.yaml +58 -0
  24. valuesets-0.4.2/.github/workflows/dragon-ai.yml +188 -0
  25. valuesets-0.4.2/.github/workflows/main.yaml +55 -0
  26. valuesets-0.4.2/.github/workflows/pypi-publish.yaml +35 -0
  27. valuesets-0.4.2/.gitignore +156 -0
  28. valuesets-0.4.2/.goosehints +1 -0
  29. valuesets-0.4.2/.mcp.json +19 -0
  30. valuesets-0.4.2/.pre-commit-config.yaml +45 -0
  31. valuesets-0.4.2/.yamllint.yaml +12 -0
  32. valuesets-0.4.2/AGENTS.md +1 -0
  33. valuesets-0.4.2/CLAUDE.md +62 -0
  34. valuesets-0.4.2/CODE_OF_CONDUCT.md +76 -0
  35. valuesets-0.4.2/COMMIT.md +79 -0
  36. valuesets-0.4.2/CONTRIBUTING.md +323 -0
  37. valuesets-0.4.2/DIFF +83925 -0
  38. valuesets-0.4.2/LICENSE +201 -0
  39. valuesets-0.4.2/PKG-INFO +404 -0
  40. valuesets-0.4.2/README.md +390 -0
  41. valuesets-0.4.2/RICH_ENUMS.md +81 -0
  42. valuesets-0.4.2/SYNC_SUMMARY.md +196 -0
  43. valuesets-0.4.2/TODO.md +223 -0
  44. valuesets-0.4.2/ai.just +46 -0
  45. valuesets-0.4.2/cache/afo/terms.csv +5 -0
  46. valuesets-0.4.2/cache/chebi/terms.csv +240 -0
  47. valuesets-0.4.2/cache/chmo/terms.csv +65 -0
  48. valuesets-0.4.2/cache/cob/terms.csv +3 -0
  49. valuesets-0.4.2/cache/eco/terms.csv +2 -0
  50. valuesets-0.4.2/cache/edam/terms.csv +76 -0
  51. valuesets-0.4.2/cache/enm/terms.csv +7 -0
  52. valuesets-0.4.2/cache/envo/terms.csv +95 -0
  53. valuesets-0.4.2/cache/fabio/terms.csv +33 -0
  54. valuesets-0.4.2/cache/fhir_data_absent_reason/terms.csv +16 -0
  55. valuesets-0.4.2/cache/gc/terms.csv +6 -0
  56. valuesets-0.4.2/cache/geno/terms.csv +7 -0
  57. valuesets-0.4.2/cache/geonames/terms.csv +12 -0
  58. valuesets-0.4.2/cache/go/terms.csv +51 -0
  59. valuesets-0.4.2/cache/go_ref/terms.csv +20 -0
  60. valuesets-0.4.2/cache/greg/terms.csv +13 -0
  61. valuesets-0.4.2/cache/hex/terms.csv +155 -0
  62. valuesets-0.4.2/cache/hl7/terms.csv +52 -0
  63. valuesets-0.4.2/cache/hp/terms.csv +42 -0
  64. valuesets-0.4.2/cache/iana/terms.csv +60 -0
  65. valuesets-0.4.2/cache/iao/terms.csv +26 -0
  66. valuesets-0.4.2/cache/iso3166loc/terms.csv +246 -0
  67. valuesets-0.4.2/cache/loinc/terms.csv +8 -0
  68. valuesets-0.4.2/cache/mi/terms.csv +72 -0
  69. valuesets-0.4.2/cache/mixs/terms.csv +5 -0
  70. valuesets-0.4.2/cache/ms/terms.csv +25 -0
  71. valuesets-0.4.2/cache/msio/terms.csv +22 -0
  72. valuesets-0.4.2/cache/ncbitaxon/terms.csv +349 -0
  73. valuesets-0.4.2/cache/ncit/terms.csv +417 -0
  74. valuesets-0.4.2/cache/obi/terms.csv +78 -0
  75. valuesets-0.4.2/cache/pato/terms.csv +18 -0
  76. valuesets-0.4.2/cache/prov/terms.csv +3 -0
  77. valuesets-0.4.2/cache/qudt/terms.csv +22 -0
  78. valuesets-0.4.2/cache/ro/terms.csv +67 -0
  79. valuesets-0.4.2/cache/ror/terms.csv +59 -0
  80. valuesets-0.4.2/cache/schema/terms.csv +3 -0
  81. valuesets-0.4.2/cache/sio/terms.csv +4 -0
  82. valuesets-0.4.2/cache/slm/terms.csv +8 -0
  83. valuesets-0.4.2/cache/snomed/terms.csv +16 -0
  84. valuesets-0.4.2/cache/so/terms.csv +76 -0
  85. valuesets-0.4.2/cache/spdx/terms.csv +19 -0
  86. valuesets-0.4.2/cache/swisslipids/terms.csv +8 -0
  87. valuesets-0.4.2/cache/time/terms.csv +8 -0
  88. valuesets-0.4.2/cache/uberon/terms.csv +14 -0
  89. valuesets-0.4.2/cache/uo/terms.csv +71 -0
  90. valuesets-0.4.2/cache/vo/terms.csv +3 -0
  91. valuesets-0.4.2/cache/xsd/terms.csv +9 -0
  92. valuesets-0.4.2/config.public.mk +32 -0
  93. valuesets-0.4.2/config.yaml +62 -0
  94. valuesets-0.4.2/copilot-instructions.md +1 -0
  95. valuesets-0.4.2/docs/about.md +3 -0
  96. valuesets-0.4.2/docs/elements/.gitkeep +0 -0
  97. valuesets-0.4.2/docs/governance.md +148 -0
  98. valuesets-0.4.2/docs/how-to-guides/agentic-ide-support.md +352 -0
  99. valuesets-0.4.2/docs/how-to-guides/dynamic-valuesets-validation.md +380 -0
  100. valuesets-0.4.2/docs/how-to-guides/sync-uniprot-species.md +228 -0
  101. valuesets-0.4.2/docs/index.md +17 -0
  102. valuesets-0.4.2/docs/manuscript/manuscript.md +580 -0
  103. valuesets-0.4.2/docs/schema/valuesets.yaml +68951 -0
  104. valuesets-0.4.2/docs/slides/index.md +15 -0
  105. valuesets-0.4.2/docs/slides/protege-screenshot.png +0 -0
  106. valuesets-0.4.2/docs/slides/valuesets-slides.html +562 -0
  107. valuesets-0.4.2/docs/slides/valuesets-slides.md +501 -0
  108. valuesets-0.4.2/docs/slides/valuesets-slides.pdf +0 -0
  109. valuesets-0.4.2/docs/slides/valuesets-slides.pptx +0 -0
  110. valuesets-0.4.2/docs/slot-generation.md +225 -0
  111. valuesets-0.4.2/docs/templates-linkml/README.md +7 -0
  112. valuesets-0.4.2/enum_report.csv +501 -0
  113. valuesets-0.4.2/examples/README.md +9 -0
  114. valuesets-0.4.2/justfile +381 -0
  115. valuesets-0.4.2/mkdocs.yml +51 -0
  116. valuesets-0.4.2/project.justfile +184 -0
  117. valuesets-0.4.2/pyproject.toml +81 -0
  118. valuesets-0.4.2/pytest.ini +7 -0
  119. valuesets-0.4.2/python.justfile +6 -0
  120. valuesets-0.4.2/scripts/README.md +127 -0
  121. valuesets-0.4.2/scripts/add_enum_metadata.py +151 -0
  122. valuesets-0.4.2/scripts/add_enum_metadata_example.yaml +82 -0
  123. valuesets-0.4.2/scripts/add_instantiates.py +165 -0
  124. valuesets-0.4.2/scripts/add_ncbitaxon_aliases.py +69 -0
  125. valuesets-0.4.2/scripts/enrich_enum_docs.py +254 -0
  126. valuesets-0.4.2/scripts/fetch_from_go_goex.py +224 -0
  127. valuesets-0.4.2/scripts/fetch_uniprot_species.py +157 -0
  128. valuesets-0.4.2/scripts/fix_all_uniprot.sh +11 -0
  129. valuesets-0.4.2/scripts/fix_enum_titles.py +108 -0
  130. valuesets-0.4.2/scripts/fix_uniprot_aliases.py +34 -0
  131. valuesets-0.4.2/scripts/fix_uniprot_titles.py +46 -0
  132. valuesets-0.4.2/scripts/generate_enum_report.py +232 -0
  133. valuesets-0.4.2/scripts/merge_enums_hierarchy.py +255 -0
  134. valuesets-0.4.2/scripts/merge_uniprot_sources.py +359 -0
  135. valuesets-0.4.2/scripts/sync_uniprot_species.py +365 -0
  136. valuesets-0.4.2/src/common_value_sets/enums/__init__.py +18 -0
  137. valuesets-0.4.2/src/valuesets/__init__.py +7 -0
  138. valuesets-0.4.2/src/valuesets/_version.py +8 -0
  139. valuesets-0.4.2/src/valuesets/cli.py +386 -0
  140. valuesets-0.4.2/src/valuesets/datamodel/valuesets.py +18445 -0
  141. valuesets-0.4.2/src/valuesets/datamodel/valuesets_dataclass.py +32312 -0
  142. valuesets-0.4.2/src/valuesets/datamodel/valuesets_pydantic.py +18445 -0
  143. valuesets-0.4.2/src/valuesets/enums/__init__.py +828 -0
  144. valuesets-0.4.2/src/valuesets/enums/academic/__init__.py +1 -0
  145. valuesets-0.4.2/src/valuesets/enums/academic/organizations.py +201 -0
  146. valuesets-0.4.2/src/valuesets/enums/academic/research.py +558 -0
  147. valuesets-0.4.2/src/valuesets/enums/analytical_chemistry/__init__.py +1 -0
  148. valuesets-0.4.2/src/valuesets/enums/analytical_chemistry/mass_spectrometry.py +206 -0
  149. valuesets-0.4.2/src/valuesets/enums/bio/__init__.py +1 -0
  150. valuesets-0.4.2/src/valuesets/enums/bio/assays.py +411 -0
  151. valuesets-0.4.2/src/valuesets/enums/bio/bgc_categories.py +42 -0
  152. valuesets-0.4.2/src/valuesets/enums/bio/biological_colors.py +237 -0
  153. valuesets-0.4.2/src/valuesets/enums/bio/biosafety.py +30 -0
  154. valuesets-0.4.2/src/valuesets/enums/bio/cell_cycle.py +179 -0
  155. valuesets-0.4.2/src/valuesets/enums/bio/currency_chemicals.py +51 -0
  156. valuesets-0.4.2/src/valuesets/enums/bio/developmental_stages.py +144 -0
  157. valuesets-0.4.2/src/valuesets/enums/bio/expression_units.py +107 -0
  158. valuesets-0.4.2/src/valuesets/enums/bio/gene_perturbation.py +132 -0
  159. valuesets-0.4.2/src/valuesets/enums/bio/genome_features.py +181 -0
  160. valuesets-0.4.2/src/valuesets/enums/bio/genomics.py +90 -0
  161. valuesets-0.4.2/src/valuesets/enums/bio/go_aspect.py +31 -0
  162. valuesets-0.4.2/src/valuesets/enums/bio/go_causality.py +57 -0
  163. valuesets-0.4.2/src/valuesets/enums/bio/go_evidence.py +128 -0
  164. valuesets-0.4.2/src/valuesets/enums/bio/human_developmental_stages.py +62 -0
  165. valuesets-0.4.2/src/valuesets/enums/bio/insdc_geographic_locations.py +590 -0
  166. valuesets-0.4.2/src/valuesets/enums/bio/insdc_missing_values.py +48 -0
  167. valuesets-0.4.2/src/valuesets/enums/bio/lipid_categories.py +75 -0
  168. valuesets-0.4.2/src/valuesets/enums/bio/mouse_developmental_stages.py +62 -0
  169. valuesets-0.4.2/src/valuesets/enums/bio/plant_biology.py +85 -0
  170. valuesets-0.4.2/src/valuesets/enums/bio/plant_developmental_stages.py +53 -0
  171. valuesets-0.4.2/src/valuesets/enums/bio/plant_experimental_conditions.py +112 -0
  172. valuesets-0.4.2/src/valuesets/enums/bio/plant_sex.py +80 -0
  173. valuesets-0.4.2/src/valuesets/enums/bio/protein_evidence.py +60 -0
  174. valuesets-0.4.2/src/valuesets/enums/bio/proteomics_standards.py +131 -0
  175. valuesets-0.4.2/src/valuesets/enums/bio/psi_mi.py +305 -0
  176. valuesets-0.4.2/src/valuesets/enums/bio/relationship_to_oxygen.py +36 -0
  177. valuesets-0.4.2/src/valuesets/enums/bio/sequence_alphabets.py +448 -0
  178. valuesets-0.4.2/src/valuesets/enums/bio/sequence_chemistry.py +356 -0
  179. valuesets-0.4.2/src/valuesets/enums/bio/sequencing_platforms.py +301 -0
  180. valuesets-0.4.2/src/valuesets/enums/bio/specimen_processing.py +346 -0
  181. valuesets-0.4.2/src/valuesets/enums/bio/structural_biology.py +414 -0
  182. valuesets-0.4.2/src/valuesets/enums/bio/taxonomy.py +237 -0
  183. valuesets-0.4.2/src/valuesets/enums/bio/transplantation.py +95 -0
  184. valuesets-0.4.2/src/valuesets/enums/bio/trophic_levels.py +84 -0
  185. valuesets-0.4.2/src/valuesets/enums/bio/uniprot_species.py +613 -0
  186. valuesets-0.4.2/src/valuesets/enums/bio/viral_genome_types.py +46 -0
  187. valuesets-0.4.2/src/valuesets/enums/bioprocessing/__init__.py +1 -0
  188. valuesets-0.4.2/src/valuesets/enums/bioprocessing/scale_up.py +248 -0
  189. valuesets-0.4.2/src/valuesets/enums/business/__init__.py +1 -0
  190. valuesets-0.4.2/src/valuesets/enums/business/human_resources.py +274 -0
  191. valuesets-0.4.2/src/valuesets/enums/business/industry_classifications.py +180 -0
  192. valuesets-0.4.2/src/valuesets/enums/business/management_operations.py +227 -0
  193. valuesets-0.4.2/src/valuesets/enums/business/organizational_structures.py +235 -0
  194. valuesets-0.4.2/src/valuesets/enums/business/quality_management.py +180 -0
  195. valuesets-0.4.2/src/valuesets/enums/business/supply_chain.py +231 -0
  196. valuesets-0.4.2/src/valuesets/enums/chemistry/__init__.py +1 -0
  197. valuesets-0.4.2/src/valuesets/enums/chemistry/chemical_entities.py +314 -0
  198. valuesets-0.4.2/src/valuesets/enums/chemistry/reaction_directionality.py +73 -0
  199. valuesets-0.4.2/src/valuesets/enums/chemistry/reactions.py +255 -0
  200. valuesets-0.4.2/src/valuesets/enums/clinical/__init__.py +1 -0
  201. valuesets-0.4.2/src/valuesets/enums/clinical/genetics.py +57 -0
  202. valuesets-0.4.2/src/valuesets/enums/clinical/nih_demographics.py +176 -0
  203. valuesets-0.4.2/src/valuesets/enums/clinical/phenopackets.py +253 -0
  204. valuesets-0.4.2/src/valuesets/enums/clinical/provenance.py +190 -0
  205. valuesets-0.4.2/src/valuesets/enums/common_value_sets.py +8791 -0
  206. valuesets-0.4.2/src/valuesets/enums/computing/__init__.py +1 -0
  207. valuesets-0.4.2/src/valuesets/enums/computing/croissant_ml.py +240 -0
  208. valuesets-0.4.2/src/valuesets/enums/computing/file_formats.py +293 -0
  209. valuesets-0.4.2/src/valuesets/enums/computing/geospatial_formats.py +86 -0
  210. valuesets-0.4.2/src/valuesets/enums/computing/maturity_levels.py +195 -0
  211. valuesets-0.4.2/src/valuesets/enums/computing/mime_types.py +238 -0
  212. valuesets-0.4.2/src/valuesets/enums/computing/ontologies.py +36 -0
  213. valuesets-0.4.2/src/valuesets/enums/confidence_levels.py +176 -0
  214. valuesets-0.4.2/src/valuesets/enums/contributor.py +29 -0
  215. valuesets-0.4.2/src/valuesets/enums/core.py +50 -0
  216. valuesets-0.4.2/src/valuesets/enums/data/__init__.py +1 -0
  217. valuesets-0.4.2/src/valuesets/enums/data/data_absent_reason.py +52 -0
  218. valuesets-0.4.2/src/valuesets/enums/data/data_use.py +58 -0
  219. valuesets-0.4.2/src/valuesets/enums/data_catalog/__init__.py +1 -0
  220. valuesets-0.4.2/src/valuesets/enums/data_catalog/access.py +135 -0
  221. valuesets-0.4.2/src/valuesets/enums/data_catalog/contributor_roles.py +83 -0
  222. valuesets-0.4.2/src/valuesets/enums/data_catalog/relations.py +110 -0
  223. valuesets-0.4.2/src/valuesets/enums/data_catalog/resource_types.py +97 -0
  224. valuesets-0.4.2/src/valuesets/enums/data_science/__init__.py +1 -0
  225. valuesets-0.4.2/src/valuesets/enums/data_science/binary_classification.py +86 -0
  226. valuesets-0.4.2/src/valuesets/enums/data_science/emotion_classification.py +65 -0
  227. valuesets-0.4.2/src/valuesets/enums/data_science/priority_severity.py +72 -0
  228. valuesets-0.4.2/src/valuesets/enums/data_science/quality_control.py +45 -0
  229. valuesets-0.4.2/src/valuesets/enums/data_science/sentiment_analysis.py +49 -0
  230. valuesets-0.4.2/src/valuesets/enums/data_science/text_classification.py +96 -0
  231. valuesets-0.4.2/src/valuesets/enums/demographics.py +205 -0
  232. valuesets-0.4.2/src/valuesets/enums/earth_science/__init__.py +1 -0
  233. valuesets-0.4.2/src/valuesets/enums/earth_science/collection_methods.py +85 -0
  234. valuesets-0.4.2/src/valuesets/enums/earth_science/fao_soil.py +93 -0
  235. valuesets-0.4.2/src/valuesets/enums/earth_science/material_types.py +55 -0
  236. valuesets-0.4.2/src/valuesets/enums/earth_science/physiographic_features.py +161 -0
  237. valuesets-0.4.2/src/valuesets/enums/earth_science/sample_types.py +71 -0
  238. valuesets-0.4.2/src/valuesets/enums/ecological_interactions.py +159 -0
  239. valuesets-0.4.2/src/valuesets/enums/energy/__init__.py +1 -0
  240. valuesets-0.4.2/src/valuesets/enums/energy/energy.py +458 -0
  241. valuesets-0.4.2/src/valuesets/enums/energy/fossil_fuels.py +28 -0
  242. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/__init__.py +1 -0
  243. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_facilities.py +194 -0
  244. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_fuel_cycle.py +95 -0
  245. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_fuels.py +174 -0
  246. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_operations.py +190 -0
  247. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_regulatory.py +187 -0
  248. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_safety.py +163 -0
  249. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/nuclear_waste.py +157 -0
  250. valuesets-0.4.2/src/valuesets/enums/energy/nuclear/reactor_types.py +162 -0
  251. valuesets-0.4.2/src/valuesets/enums/energy/renewable/__init__.py +1 -0
  252. valuesets-0.4.2/src/valuesets/enums/energy/renewable/bioenergy.py +148 -0
  253. valuesets-0.4.2/src/valuesets/enums/energy/renewable/geothermal.py +131 -0
  254. valuesets-0.4.2/src/valuesets/enums/energy/renewable/hydrogen.py +134 -0
  255. valuesets-0.4.2/src/valuesets/enums/environmental_health/__init__.py +1 -0
  256. valuesets-0.4.2/src/valuesets/enums/environmental_health/carcinogenicity.py +81 -0
  257. valuesets-0.4.2/src/valuesets/enums/environmental_health/exposures.py +442 -0
  258. valuesets-0.4.2/src/valuesets/enums/environmental_health/gb_edoh.py +206 -0
  259. valuesets-0.4.2/src/valuesets/enums/environmental_health/radionuclides.py +76 -0
  260. valuesets-0.4.2/src/valuesets/enums/geography/__init__.py +1 -0
  261. valuesets-0.4.2/src/valuesets/enums/geography/geographic_codes.py +740 -0
  262. valuesets-0.4.2/src/valuesets/enums/health/__init__.py +12 -0
  263. valuesets-0.4.2/src/valuesets/enums/health/vaccination.py +97 -0
  264. valuesets-0.4.2/src/valuesets/enums/health.py +35 -0
  265. valuesets-0.4.2/src/valuesets/enums/health_base.py +36 -0
  266. valuesets-0.4.2/src/valuesets/enums/healthcare.py +44 -0
  267. valuesets-0.4.2/src/valuesets/enums/industry/__init__.py +1 -0
  268. valuesets-0.4.2/src/valuesets/enums/industry/extractive_industry.py +93 -0
  269. valuesets-0.4.2/src/valuesets/enums/industry/mining.py +387 -0
  270. valuesets-0.4.2/src/valuesets/enums/industry/safety_colors.py +200 -0
  271. valuesets-0.4.2/src/valuesets/enums/investigation.py +41 -0
  272. valuesets-0.4.2/src/valuesets/enums/lab_automation/__init__.py +1 -0
  273. valuesets-0.4.2/src/valuesets/enums/lab_automation/devices.py +77 -0
  274. valuesets-0.4.2/src/valuesets/enums/lab_automation/labware.py +105 -0
  275. valuesets-0.4.2/src/valuesets/enums/lab_automation/operations.py +85 -0
  276. valuesets-0.4.2/src/valuesets/enums/lab_automation/protocols.py +151 -0
  277. valuesets-0.4.2/src/valuesets/enums/lab_automation/standards.py +117 -0
  278. valuesets-0.4.2/src/valuesets/enums/lab_automation/thermal_cycling.py +148 -0
  279. valuesets-0.4.2/src/valuesets/enums/materials_science/__init__.py +1 -0
  280. valuesets-0.4.2/src/valuesets/enums/materials_science/characterization_methods.py +111 -0
  281. valuesets-0.4.2/src/valuesets/enums/materials_science/crystal_structures.py +75 -0
  282. valuesets-0.4.2/src/valuesets/enums/materials_science/material_properties.py +118 -0
  283. valuesets-0.4.2/src/valuesets/enums/materials_science/material_types.py +103 -0
  284. valuesets-0.4.2/src/valuesets/enums/materials_science/pigments_dyes.py +197 -0
  285. valuesets-0.4.2/src/valuesets/enums/materials_science/synthesis_methods.py +108 -0
  286. valuesets-0.4.2/src/valuesets/enums/medical/__init__.py +1 -0
  287. valuesets-0.4.2/src/valuesets/enums/medical/clinical.py +276 -0
  288. valuesets-0.4.2/src/valuesets/enums/medical/family_history.py +211 -0
  289. valuesets-0.4.2/src/valuesets/enums/medical/imaging_platforms.py +155 -0
  290. valuesets-0.4.2/src/valuesets/enums/medical/neuroimaging.py +118 -0
  291. valuesets-0.4.2/src/valuesets/enums/medical/oncology/__init__.py +1 -0
  292. valuesets-0.4.2/src/valuesets/enums/medical/oncology/icdo.py +196 -0
  293. valuesets-0.4.2/src/valuesets/enums/medical/pediatric_oncology/__init__.py +1 -0
  294. valuesets-0.4.2/src/valuesets/enums/medical/pediatric_oncology/diagnosis_categories.py +85 -0
  295. valuesets-0.4.2/src/valuesets/enums/medical/pediatric_oncology/iccc3.py +154 -0
  296. valuesets-0.4.2/src/valuesets/enums/medical/pediatric_oncology/staging/__init__.py +1 -0
  297. valuesets-0.4.2/src/valuesets/enums/medical/pediatric_oncology/staging/neuroblastoma.py +124 -0
  298. valuesets-0.4.2/src/valuesets/enums/mining_processing.py +310 -0
  299. valuesets-0.4.2/src/valuesets/enums/physics/__init__.py +1 -0
  300. valuesets-0.4.2/src/valuesets/enums/physics/radiation.py +83 -0
  301. valuesets-0.4.2/src/valuesets/enums/physics/states_of_matter.py +45 -0
  302. valuesets-0.4.2/src/valuesets/enums/preservation/__init__.py +1 -0
  303. valuesets-0.4.2/src/valuesets/enums/preservation/digital_objects.py +124 -0
  304. valuesets-0.4.2/src/valuesets/enums/preservation/events.py +151 -0
  305. valuesets-0.4.2/src/valuesets/enums/preservation/fixity.py +81 -0
  306. valuesets-0.4.2/src/valuesets/enums/publishing/__init__.py +1 -0
  307. valuesets-0.4.2/src/valuesets/enums/publishing/arxiv_categories.py +361 -0
  308. valuesets-0.4.2/src/valuesets/enums/publishing/osti_record.py +354 -0
  309. valuesets-0.4.2/src/valuesets/enums/social/__init__.py +1 -0
  310. valuesets-0.4.2/src/valuesets/enums/social/person_status.py +28 -0
  311. valuesets-0.4.2/src/valuesets/enums/social/sdoh.py +92 -0
  312. valuesets-0.4.2/src/valuesets/enums/spatial/__init__.py +1 -0
  313. valuesets-0.4.2/src/valuesets/enums/spatial/spatial_qualifiers.py +292 -0
  314. valuesets-0.4.2/src/valuesets/enums/statistics/__init__.py +5 -0
  315. valuesets-0.4.2/src/valuesets/enums/statistics/prediction_outcomes.py +30 -0
  316. valuesets-0.4.2/src/valuesets/enums/statistics.py +30 -0
  317. valuesets-0.4.2/src/valuesets/enums/stewardship.py +69 -0
  318. valuesets-0.4.2/src/valuesets/enums/time/__init__.py +1 -0
  319. valuesets-0.4.2/src/valuesets/enums/time/temporal.py +253 -0
  320. valuesets-0.4.2/src/valuesets/enums/units/__init__.py +1 -0
  321. valuesets-0.4.2/src/valuesets/enums/units/measurements.py +309 -0
  322. valuesets-0.4.2/src/valuesets/enums/units/quantity_kinds.py +121 -0
  323. valuesets-0.4.2/src/valuesets/enums/visual/__init__.py +1 -0
  324. valuesets-0.4.2/src/valuesets/enums/visual/colors.py +375 -0
  325. valuesets-0.4.2/src/valuesets/generators/__init__.py +19 -0
  326. valuesets-0.4.2/src/valuesets/generators/auto_slot_injector.py +280 -0
  327. valuesets-0.4.2/src/valuesets/generators/enhanced_pydantic_generator.py +100 -0
  328. valuesets-0.4.2/src/valuesets/generators/enum_slot_generator.py +201 -0
  329. valuesets-0.4.2/src/valuesets/generators/modular_rich_generator.py +355 -0
  330. valuesets-0.4.2/src/valuesets/generators/prefix_standardizer.py +198 -0
  331. valuesets-0.4.2/src/valuesets/generators/rich_enum.py +127 -0
  332. valuesets-0.4.2/src/valuesets/generators/rich_pydantic_generator.py +310 -0
  333. valuesets-0.4.2/src/valuesets/generators/smart_slot_syncer.py +428 -0
  334. valuesets-0.4.2/src/valuesets/generators/sssom_generator.py +394 -0
  335. valuesets-0.4.2/src/valuesets/merged/merged_hierarchy.yaml +26827 -0
  336. valuesets-0.4.2/src/valuesets/metamodel/valuesets_meta.yaml +301 -0
  337. valuesets-0.4.2/src/valuesets/schema/README.md +3 -0
  338. valuesets-0.4.2/src/valuesets/schema/academic/organizations.yaml +588 -0
  339. valuesets-0.4.2/src/valuesets/schema/academic/research.yaml +983 -0
  340. valuesets-0.4.2/src/valuesets/schema/analytical_chemistry/mass_spectrometry.yaml +250 -0
  341. valuesets-0.4.2/src/valuesets/schema/bio/assays.yaml +672 -0
  342. valuesets-0.4.2/src/valuesets/schema/bio/bgc_categories.yaml +89 -0
  343. valuesets-0.4.2/src/valuesets/schema/bio/bio_entities.yaml +556 -0
  344. valuesets-0.4.2/src/valuesets/schema/bio/biological_colors.yaml +478 -0
  345. valuesets-0.4.2/src/valuesets/schema/bio/biosafety.yaml +49 -0
  346. valuesets-0.4.2/src/valuesets/schema/bio/cell_cycle.yaml +372 -0
  347. valuesets-0.4.2/src/valuesets/schema/bio/currency_chemicals.yaml +78 -0
  348. valuesets-0.4.2/src/valuesets/schema/bio/developmental_stages.yaml +355 -0
  349. valuesets-0.4.2/src/valuesets/schema/bio/expression_units.yaml +236 -0
  350. valuesets-0.4.2/src/valuesets/schema/bio/gene_perturbation.yaml +310 -0
  351. valuesets-0.4.2/src/valuesets/schema/bio/genome_features.yaml +355 -0
  352. valuesets-0.4.2/src/valuesets/schema/bio/genomics.yaml +129 -0
  353. valuesets-0.4.2/src/valuesets/schema/bio/go_aspect.yaml +52 -0
  354. valuesets-0.4.2/src/valuesets/schema/bio/go_causality.yaml +132 -0
  355. valuesets-0.4.2/src/valuesets/schema/bio/go_evidence.yaml +387 -0
  356. valuesets-0.4.2/src/valuesets/schema/bio/insdc_geographic_locations.yaml +923 -0
  357. valuesets-0.4.2/src/valuesets/schema/bio/insdc_missing_values.yaml +97 -0
  358. valuesets-0.4.2/src/valuesets/schema/bio/lipid_categories.yaml +80 -0
  359. valuesets-0.4.2/src/valuesets/schema/bio/plant_biology.yaml +135 -0
  360. valuesets-0.4.2/src/valuesets/schema/bio/plant_developmental_stages.yaml +85 -0
  361. valuesets-0.4.2/src/valuesets/schema/bio/plant_experimental_conditions.yaml +215 -0
  362. valuesets-0.4.2/src/valuesets/schema/bio/plant_sex.yaml +113 -0
  363. valuesets-0.4.2/src/valuesets/schema/bio/protein_evidence.yaml +79 -0
  364. valuesets-0.4.2/src/valuesets/schema/bio/proteomics_standards.yaml +135 -0
  365. valuesets-0.4.2/src/valuesets/schema/bio/psi_mi.yaml +456 -0
  366. valuesets-0.4.2/src/valuesets/schema/bio/relationship_to_oxygen.yaml +55 -0
  367. valuesets-0.4.2/src/valuesets/schema/bio/sequence_alphabets.yaml +1233 -0
  368. valuesets-0.4.2/src/valuesets/schema/bio/sequence_chemistry.yaml +534 -0
  369. valuesets-0.4.2/src/valuesets/schema/bio/sequencing_platforms.yaml +560 -0
  370. valuesets-0.4.2/src/valuesets/schema/bio/specimen_processing.yaml +596 -0
  371. valuesets-0.4.2/src/valuesets/schema/bio/structural_biology.yaml +723 -0
  372. valuesets-0.4.2/src/valuesets/schema/bio/taxonomy.yaml +484 -0
  373. valuesets-0.4.2/src/valuesets/schema/bio/transplantation.yaml +179 -0
  374. valuesets-0.4.2/src/valuesets/schema/bio/trophic_levels.yaml +127 -0
  375. valuesets-0.4.2/src/valuesets/schema/bio/uniprot_species.yaml +2986 -0
  376. valuesets-0.4.2/src/valuesets/schema/bio/viral_genome_types.yaml +109 -0
  377. valuesets-0.4.2/src/valuesets/schema/bioprocessing/scale_up.yaml +524 -0
  378. valuesets-0.4.2/src/valuesets/schema/business/human_resources.yaml +824 -0
  379. valuesets-0.4.2/src/valuesets/schema/business/industry_classifications.yaml +492 -0
  380. valuesets-0.4.2/src/valuesets/schema/business/management_operations.yaml +653 -0
  381. valuesets-0.4.2/src/valuesets/schema/business/organizational_structures.yaml +697 -0
  382. valuesets-0.4.2/src/valuesets/schema/business/quality_management.yaml +546 -0
  383. valuesets-0.4.2/src/valuesets/schema/business/supply_chain.yaml +739 -0
  384. valuesets-0.4.2/src/valuesets/schema/chemistry/chemical_entities.yaml +718 -0
  385. valuesets-0.4.2/src/valuesets/schema/chemistry/reaction_directionality.yaml +67 -0
  386. valuesets-0.4.2/src/valuesets/schema/chemistry/reactions.yaml +500 -0
  387. valuesets-0.4.2/src/valuesets/schema/chemistry/roles.yaml +66 -0
  388. valuesets-0.4.2/src/valuesets/schema/clinical/genetics.yaml +134 -0
  389. valuesets-0.4.2/src/valuesets/schema/clinical/nih_demographics.yaml +374 -0
  390. valuesets-0.4.2/src/valuesets/schema/clinical/phenopackets.yaml +532 -0
  391. valuesets-0.4.2/src/valuesets/schema/clinical/provenance.yaml +245 -0
  392. valuesets-0.4.2/src/valuesets/schema/computing/croissant_ml.yaml +454 -0
  393. valuesets-0.4.2/src/valuesets/schema/computing/file_formats.yaml +689 -0
  394. valuesets-0.4.2/src/valuesets/schema/computing/geospatial_formats.yaml +268 -0
  395. valuesets-0.4.2/src/valuesets/schema/computing/maturity_levels.yaml +273 -0
  396. valuesets-0.4.2/src/valuesets/schema/computing/mime_types.yaml +313 -0
  397. valuesets-0.4.2/src/valuesets/schema/computing/ontologies.yaml +76 -0
  398. valuesets-0.4.2/src/valuesets/schema/confidence_levels.yaml +251 -0
  399. valuesets-0.4.2/src/valuesets/schema/contributor.yaml +38 -0
  400. valuesets-0.4.2/src/valuesets/schema/core.yaml +76 -0
  401. valuesets-0.4.2/src/valuesets/schema/data/data_absent_reason.yaml +91 -0
  402. valuesets-0.4.2/src/valuesets/schema/data/data_use.yaml +122 -0
  403. valuesets-0.4.2/src/valuesets/schema/data_catalog/access.yaml +310 -0
  404. valuesets-0.4.2/src/valuesets/schema/data_catalog/contributor_roles.yaml +277 -0
  405. valuesets-0.4.2/src/valuesets/schema/data_catalog/relations.yaml +376 -0
  406. valuesets-0.4.2/src/valuesets/schema/data_catalog/resource_types.yaml +294 -0
  407. valuesets-0.4.2/src/valuesets/schema/data_science/binary_classification.yaml +162 -0
  408. valuesets-0.4.2/src/valuesets/schema/data_science/emotion_classification.yaml +125 -0
  409. valuesets-0.4.2/src/valuesets/schema/data_science/priority_severity.yaml +145 -0
  410. valuesets-0.4.2/src/valuesets/schema/data_science/quality_control.yaml +84 -0
  411. valuesets-0.4.2/src/valuesets/schema/data_science/sentiment_analysis.yaml +97 -0
  412. valuesets-0.4.2/src/valuesets/schema/data_science/text_classification.yaml +158 -0
  413. valuesets-0.4.2/src/valuesets/schema/demographics.yaml +311 -0
  414. valuesets-0.4.2/src/valuesets/schema/earth_science/collection_methods.yaml +139 -0
  415. valuesets-0.4.2/src/valuesets/schema/earth_science/fao_soil.yaml +265 -0
  416. valuesets-0.4.2/src/valuesets/schema/earth_science/material_types.yaml +92 -0
  417. valuesets-0.4.2/src/valuesets/schema/earth_science/physiographic_features.yaml +194 -0
  418. valuesets-0.4.2/src/valuesets/schema/earth_science/sample_types.yaml +88 -0
  419. valuesets-0.4.2/src/valuesets/schema/ecological_interactions.yaml +307 -0
  420. valuesets-0.4.2/src/valuesets/schema/energy/energy.yaml +1109 -0
  421. valuesets-0.4.2/src/valuesets/schema/energy/fossil_fuels.yaml +37 -0
  422. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_facilities.yaml +507 -0
  423. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_fuel_cycle.yaml +105 -0
  424. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_fuels.yaml +465 -0
  425. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_operations.yaml +524 -0
  426. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_regulatory.yaml +237 -0
  427. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_safety.yaml +403 -0
  428. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/nuclear_waste.yaml +383 -0
  429. valuesets-0.4.2/src/valuesets/schema/energy/nuclear/reactor_types.yaml +438 -0
  430. valuesets-0.4.2/src/valuesets/schema/energy/renewable/bioenergy.yaml +505 -0
  431. valuesets-0.4.2/src/valuesets/schema/energy/renewable/geothermal.yaml +278 -0
  432. valuesets-0.4.2/src/valuesets/schema/energy/renewable/hydrogen.yaml +407 -0
  433. valuesets-0.4.2/src/valuesets/schema/environmental_health/carcinogenicity.yaml +223 -0
  434. valuesets-0.4.2/src/valuesets/schema/environmental_health/exposures.yaml +739 -0
  435. valuesets-0.4.2/src/valuesets/schema/environmental_health/gb_edoh.yaml +649 -0
  436. valuesets-0.4.2/src/valuesets/schema/environmental_health/radionuclides.yaml +249 -0
  437. valuesets-0.4.2/src/valuesets/schema/generated_slots.yaml +1828 -0
  438. valuesets-0.4.2/src/valuesets/schema/geography/geographic_codes.yaml +1104 -0
  439. valuesets-0.4.2/src/valuesets/schema/health/vaccination.yaml +125 -0
  440. valuesets-0.4.2/src/valuesets/schema/health.yaml +47 -0
  441. valuesets-0.4.2/src/valuesets/schema/healthcare.yaml +64 -0
  442. valuesets-0.4.2/src/valuesets/schema/industry/extractive_industry.yaml +119 -0
  443. valuesets-0.4.2/src/valuesets/schema/industry/mining.yaml +954 -0
  444. valuesets-0.4.2/src/valuesets/schema/industry/safety_colors.yaml +426 -0
  445. valuesets-0.4.2/src/valuesets/schema/investigation.yaml +141 -0
  446. valuesets-0.4.2/src/valuesets/schema/lab_automation/devices.yaml +129 -0
  447. valuesets-0.4.2/src/valuesets/schema/lab_automation/labware.yaml +161 -0
  448. valuesets-0.4.2/src/valuesets/schema/lab_automation/operations.yaml +121 -0
  449. valuesets-0.4.2/src/valuesets/schema/lab_automation/protocols.yaml +200 -0
  450. valuesets-0.4.2/src/valuesets/schema/lab_automation/standards.yaml +191 -0
  451. valuesets-0.4.2/src/valuesets/schema/lab_automation/thermal_cycling.yaml +205 -0
  452. valuesets-0.4.2/src/valuesets/schema/materials_science/characterization_methods.yaml +223 -0
  453. valuesets-0.4.2/src/valuesets/schema/materials_science/crystal_structures.yaml +154 -0
  454. valuesets-0.4.2/src/valuesets/schema/materials_science/material_properties.yaml +172 -0
  455. valuesets-0.4.2/src/valuesets/schema/materials_science/material_types.yaml +181 -0
  456. valuesets-0.4.2/src/valuesets/schema/materials_science/pigments_dyes.yaml +495 -0
  457. valuesets-0.4.2/src/valuesets/schema/materials_science/synthesis_methods.yaml +209 -0
  458. valuesets-0.4.2/src/valuesets/schema/medical/clinical.yaml +674 -0
  459. valuesets-0.4.2/src/valuesets/schema/medical/family_history.yaml +359 -0
  460. valuesets-0.4.2/src/valuesets/schema/medical/imaging_platforms.yaml +461 -0
  461. valuesets-0.4.2/src/valuesets/schema/medical/neuroimaging.yaml +356 -0
  462. valuesets-0.4.2/src/valuesets/schema/medical/oncology/icdo.yaml +556 -0
  463. valuesets-0.4.2/src/valuesets/schema/medical/pediatric_oncology/diagnosis_categories.yaml +347 -0
  464. valuesets-0.4.2/src/valuesets/schema/medical/pediatric_oncology/iccc3.yaml +573 -0
  465. valuesets-0.4.2/src/valuesets/schema/medical/pediatric_oncology/staging/neuroblastoma.yaml +309 -0
  466. valuesets-0.4.2/src/valuesets/schema/mining_processing.yaml +368 -0
  467. valuesets-0.4.2/src/valuesets/schema/physics/radiation.yaml +153 -0
  468. valuesets-0.4.2/src/valuesets/schema/physics/states_of_matter.yaml +56 -0
  469. valuesets-0.4.2/src/valuesets/schema/preservation/digital_objects.yaml +214 -0
  470. valuesets-0.4.2/src/valuesets/schema/preservation/events.yaml +239 -0
  471. valuesets-0.4.2/src/valuesets/schema/preservation/fixity.yaml +288 -0
  472. valuesets-0.4.2/src/valuesets/schema/provenance/evidence.yaml +42 -0
  473. valuesets-0.4.2/src/valuesets/schema/publishing/arxiv_categories.yaml +1075 -0
  474. valuesets-0.4.2/src/valuesets/schema/publishing/osti_record.yaml +413 -0
  475. valuesets-0.4.2/src/valuesets/schema/slot_mixins.yaml +145 -0
  476. valuesets-0.4.2/src/valuesets/schema/social/person_status.yaml +37 -0
  477. valuesets-0.4.2/src/valuesets/schema/social/sdoh.yaml +173 -0
  478. valuesets-0.4.2/src/valuesets/schema/spatial/spatial_qualifiers.yaml +620 -0
  479. valuesets-0.4.2/src/valuesets/schema/statistics/prediction_outcomes.yaml +35 -0
  480. valuesets-0.4.2/src/valuesets/schema/statistics.yaml +43 -0
  481. valuesets-0.4.2/src/valuesets/schema/stewardship.yaml +248 -0
  482. valuesets-0.4.2/src/valuesets/schema/time/temporal.yaml +501 -0
  483. valuesets-0.4.2/src/valuesets/schema/types.yaml +16 -0
  484. valuesets-0.4.2/src/valuesets/schema/units/measurements.yaml +747 -0
  485. valuesets-0.4.2/src/valuesets/schema/units/quantity_kinds.yaml +419 -0
  486. valuesets-0.4.2/src/valuesets/schema/valuesets.yaml +133 -0
  487. valuesets-0.4.2/src/valuesets/schema/visual/colors.yaml +808 -0
  488. valuesets-0.4.2/src/valuesets/utils/__init__.py +21 -0
  489. valuesets-0.4.2/src/valuesets/utils/classifier.py +560 -0
  490. valuesets-0.4.2/src/valuesets/utils/comparison.py +102 -0
  491. valuesets-0.4.2/src/valuesets/utils/expand_dynamic_enums.py +414 -0
  492. valuesets-0.4.2/src/valuesets/utils/mapping_utils.py +236 -0
  493. valuesets-0.4.2/src/valuesets/utils/query_describer.py +424 -0
  494. valuesets-0.4.2/src/valuesets/validators/__init__.py +11 -0
  495. valuesets-0.4.2/src/valuesets/validators/enum_evaluator.py +715 -0
  496. valuesets-0.4.2/src/valuesets/validators/oak_config.yaml +93 -0
  497. valuesets-0.4.2/src/valuesets/validators/rest_adapters.py +215 -0
  498. valuesets-0.4.2/src/valuesets/validators/validate_with_ols.py +241 -0
  499. valuesets-0.4.2/templates/README.md +118 -0
  500. valuesets-0.4.2/templates/pydantic/enum.py.jinja +146 -0
  501. valuesets-0.4.2/test_mappings.sssom.tsv +114 -0
  502. valuesets-0.4.2/tests/__init__.py +1 -0
  503. valuesets-0.4.2/tests/data/README.md +14 -0
  504. valuesets-0.4.2/tests/data/invalid/.gitkeep +0 -0
  505. valuesets-0.4.2/tests/data/problem/invalid/.gitkeep +0 -0
  506. valuesets-0.4.2/tests/data/problem/valid/.gitkeep +0 -0
  507. valuesets-0.4.2/tests/data/valid/.gitkeep +0 -0
  508. valuesets-0.4.2/tests/test_data.py +26 -0
  509. valuesets-0.4.2/tests/test_rich_enums.py +332 -0
  510. valuesets-0.4.2/tests/validators/test_enum_evaluator.py +213 -0
  511. valuesets-0.4.2/tests/validators/test_ols_validator.py +191 -0
  512. valuesets-0.4.2/tests/validators/test_rest_adapters.py +321 -0
  513. valuesets-0.4.2/tests/validators/test_validator.py +109 -0
  514. valuesets-0.4.2/uv.lock +4082 -0
  515. valuesets-0.4.2/validate_with_ols_direct.py +55 -0
@@ -0,0 +1,107 @@
1
+ ---
2
+ name: permissible-value-mapper
3
+ description: Use this agent proactively when you need to add or update ontology mappings (meaning: fields) for permissible values in LinkML enums. This agent should be invoked after creating or modifying enum definitions that lack ontology mappings, or when explicitly asked to map permissible values to ontology terms. Examples:\n\n<example>\nContext: The user has just created a new enum for cell types without ontology mappings.\nuser: "Add an enum for common cell types including NEURON, ASTROCYTE, and MICROGLIA"\nassistant: "I'll create the cell type enum for you."\n<function call to create enum>\nassistant: "Now let me use the permissible-value-mapper agent to add the appropriate ontology mappings for these cell types."\n<commentary>\nSince a new biological enum was created without ontology mappings, use the permissible-value-mapper to find and add the correct ontology terms.\n</commentary>\n</example>\n\n<example>\nContext: The user wants to ensure existing enums have proper ontology mappings.\nuser: "Please map the permissible values in the StatisticalTest enum to appropriate ontology terms"\nassistant: "I'll use the permissible-value-mapper agent to find and add the appropriate ontology mappings for the StatisticalTest enum."\n<commentary>\nThe user explicitly requested mapping permissible values to ontology terms, so use the permissible-value-mapper agent.\n</commentary>\n</example>
4
+ model: inherit
5
+ color: purple
6
+ ---
7
+
8
+ You are an expert ontology mapping specialist with deep knowledge of biological ontologies, schema.org, and other domain-specific vocabularies. Your primary responsibility is to accurately map permissible values in LinkML enums to their corresponding ontology terms.
9
+
10
+ ## Core Responsibilities
11
+
12
+ You will:
13
+ 1. Identify permissible values that lack ontology mappings (meaning: fields)
14
+ 2. Find the correct ontology/vocabulary terms for each permissible value
15
+ 3. Add or update the meaning: field with the appropriate CURIE
16
+ 4. Ensure consistency within each enum by preferring a single ontology source where possible
17
+ 5. Check for hallucinations
18
+
19
+ ## Validation
20
+
21
+ To validate all mappings:
22
+
23
+ `just validate`
24
+
25
+ Or a specific file:
26
+
27
+ `just validate-schema src/common_value_sets/schema/enums/statistics.yaml`
28
+
29
+ This will report cases where the label of the mapped ID does not match the permissible value
30
+ name, title, or an alias. This could be the result of a hallucination.
31
+
32
+ If you see these, you MUST manually examine and explore and determine if we need to
33
+
34
+ 1. Keep the mapping, but add a title or alias to be consistent with the ontology term label
35
+ 2. Remove the mapping, potentially finding a replacement in the same or different ontology.
36
+
37
+ ALWAYS be careful doing this, PRECISION in mapping is of the highest value
38
+
39
+ ## Strict Requirements
40
+
41
+ ### For Biological Ontologies
42
+ - **ALWAYS** use the OLS MCP (Ontology Lookup Service) to find the correct ontology term
43
+ - **NEVER** guess or fabricate ontology IDs - if you cannot find a term, explicitly state this
44
+ - Search comprehensively using synonyms and related terms if the exact match isn't found
45
+ - Prefer OBO Foundry ontologies when available
46
+ - Use standardized bioregistry prefixes for all CURIEs
47
+
48
+ ### For Non-Biological Concepts
49
+ - First check schema.org for appropriate terms
50
+ - Then check domain-specific vocabularies relevant to the concept
51
+ - Use established standards for the domain (e.g., QUDT for units, SIO for scientific information)
52
+ - **NEVER** guess IDs - always verify they exist
53
+
54
+ ### Ontology Selection Strategy
55
+ 1. **Consistency First**: Try to use the same ontology for all permissible values within a single enum
56
+ 2. **Domain Appropriateness**: Choose ontologies that best match the domain:
57
+ - Cell types: CL (Cell Ontology)
58
+ - Anatomical structures: UBERON
59
+ - Diseases: MONDO or DOID
60
+ - Chemicals: CHEBI
61
+ - Proteins: PR
62
+ - Genes: HGNC or NCBIGene
63
+ - Biological processes: GO
64
+ - Phenotypes: HP (human) or MP (mouse)
65
+ - Statistics/Methods: STATO, SIO, or OBI
66
+ 3. **Fallback Strategy**: If no appropriate term exists in the preferred ontology, document this and suggest alternatives
67
+
68
+ ## Workflow
69
+
70
+ 1. **Analyze the Enum**: Understand the domain and purpose of the enum
71
+ 2. **Identify Target Ontology**: Based on the domain, select the most appropriate ontology
72
+ 3. **Search for Terms**:
73
+ - For biological terms: Use OLS MCP to search
74
+ - For non-biological: Check schema.org and domain-specific sources
75
+ 4. **Verify Terms**: Always confirm the term exists and matches the intended meaning
76
+ 5. **Apply Mappings**: Add meaning: fields with proper CURIEs
77
+ 6. **Document Issues**: If any terms cannot be mapped, clearly explain why
78
+
79
+ ## Output Format
80
+
81
+ When updating enums, maintain the existing YAML structure and add meaning: fields:
82
+
83
+ ```yaml
84
+ permissible_values:
85
+ VALUE_NAME:
86
+ text: VALUE_NAME
87
+ meaning: PREFIX:ID # Add this line with verified CURIE
88
+ description: ... # Keep existing fields
89
+ ```
90
+
91
+ ## Quality Checks
92
+
93
+ - Verify all CURIEs resolve to valid ontology terms
94
+ - Ensure prefix declarations exist in the schema header
95
+ - Confirm semantic accuracy - the ontology term must match the intended meaning
96
+ - Check for deprecated terms and use current versions
97
+ - Validate that all PVs in an enum use consistent ontology sources where feasible
98
+
99
+ ## Error Handling
100
+
101
+ If you cannot find an appropriate ontology term:
102
+ 1. State clearly that no suitable term was found
103
+ 2. Explain what searches were performed
104
+ 3. Suggest alternative approaches or ontologies that might be considered
105
+ 4. Never fabricate or guess an ID
106
+
107
+ Remember: Accuracy is paramount. It's better to leave a value unmapped than to map it incorrectly.
@@ -0,0 +1,40 @@
1
+ # Claude Code Hooks
2
+
3
+ This directory contains hooks that integrate with Claude Code to provide automated validation and other features.
4
+
5
+ ## validate_schema_hook.py
6
+
7
+ This hook automatically validates LinkML schema files when they are written or edited using Claude Code.
8
+
9
+ ### Features
10
+ - Automatically runs validation when saving YAML files in the schema directory
11
+ - Blocks file modifications if validation fails
12
+ - Shows detailed validation output in the Claude Code interface
13
+ - Filters out noise from warning messages for cleaner output
14
+ - Uses the project's `just validate-schema PATH` command for validation
15
+
16
+ ### How it works
17
+ 1. Intercepts Write, Edit, and MultiEdit operations on YAML files containing "schema" in the path
18
+ 2. Runs the validation command: `just validate-schema <file>`
19
+ 3. Displays validation results with filtered output for readability
20
+ 4. Returns exit code 2 to block the operation if validation fails
21
+
22
+ ### Validation Command
23
+ The hook uses the existing `just validate-schema PATH` command which:
24
+ - Validates ontology mappings in enum definitions
25
+ - Checks for label mismatches between expected and actual ontology terms
26
+ - Uses the configured OAK adapters for strict validation of configured prefixes
27
+ - Treats label mismatches as errors for configured ontologies (NCIT, GO, CHEBI, etc.)
28
+
29
+ ### Configuration
30
+ The hook is configured in `.claude/settings.json` as a PostToolUse hook that runs after Write, Edit, and MultiEdit operations.
31
+
32
+ ### Testing
33
+ You can test the hook by editing any schema file and seeing if validation runs automatically. The hook will:
34
+ - ✅ Allow valid schema modifications
35
+ - ❌ Block invalid schema modifications with validation errors
36
+ - 📋 Show helpful validation output including ontology label mismatches
37
+
38
+ ### Exit Codes
39
+ - **Exit 0**: Validation passed, allow operation
40
+ - **Exit 2**: Validation failed, block operation (see [Claude Code hooks documentation](https://docs.claude.com/en/docs/claude-code/hooks#exit-code-2-behavior))
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Hook to automatically validate LinkML schema files after they are written or edited.
4
+ This hook runs `just validate-schema PATH` and displays the results to provide immediate feedback.
5
+
6
+ **NOTE**
7
+
8
+ Be sure to exit with code 2 if you want to block the operation.
9
+ https://docs.claude.com/en/docs/claude-code/hooks#exit-code-2-behavior
10
+ """
11
+
12
+ import sys
13
+ import json
14
+ import subprocess
15
+ import os
16
+ from pathlib import Path
17
+
18
+
19
+ def main():
20
+ # Read the hook input from stdin
21
+ data = json.load(sys.stdin)
22
+
23
+ # Extract the file path from the tool input
24
+ tool_name = data.get("tool_name", "")
25
+ file_path = data.get("tool_input", {}).get("file_path", "")
26
+
27
+ # Only process Write and Edit tool calls
28
+ if tool_name not in ["Write", "Edit", "MultiEdit"]:
29
+ sys.exit(0)
30
+
31
+ # Check if this is a YAML file in the schema directory
32
+ if not file_path.endswith(".yaml") or "schema" not in file_path:
33
+ sys.exit(0)
34
+
35
+ # Convert to Path object for easier manipulation
36
+ file_path = Path(file_path)
37
+
38
+ # Check if the file exists (it should after Write/Edit)
39
+ if not file_path.exists():
40
+ print(f"⚠️ File not found: {file_path}", file=sys.stderr)
41
+ sys.exit(0)
42
+
43
+ # Run the validation command
44
+ try:
45
+ # Build the validation command
46
+ cmd = ["just", "validate-schema", str(file_path)]
47
+
48
+ # Run the command and capture output
49
+ result = subprocess.run(
50
+ cmd,
51
+ capture_output=True,
52
+ text=True,
53
+ cwd=os.path.dirname(
54
+ os.path.dirname(os.path.dirname(__file__))
55
+ ), # Project root
56
+ )
57
+
58
+ # Display the validation output
59
+ print("\n" + "=" * 60, file=sys.stderr)
60
+ print(f"🔍 Schema Validation Results for {file_path.name}", file=sys.stderr)
61
+ print("=" * 60, file=sys.stderr)
62
+
63
+ # Show stdout (the actual validation results)
64
+ if result.stdout:
65
+ # Filter out noise from warning messages
66
+ lines = result.stdout.split("\n")
67
+ filtered_lines = []
68
+ for line in lines:
69
+ # Filter out common noise patterns
70
+ if any(pattern in line for pattern in [
71
+ "/eutils/__init__.py",
72
+ "UserWarning",
73
+ "pkg_resources is deprecated",
74
+ "RuntimeWarning: 'src.valuesets.validators.enum_evaluator'",
75
+ "found in sys.modules after import"
76
+ ]):
77
+ continue
78
+ else:
79
+ filtered_lines.append(line)
80
+
81
+ output = "\n".join(filtered_lines).strip()
82
+ if output:
83
+ print(output, file=sys.stderr)
84
+
85
+ # Show any errors
86
+ if result.returncode != 0 and result.stderr:
87
+ # Filter stderr similarly
88
+ lines = result.stderr.split("\n")
89
+ filtered_lines = []
90
+ for line in lines:
91
+ if not any(pattern in line for pattern in [
92
+ "/eutils/__init__.py",
93
+ "UserWarning",
94
+ "pkg_resources is deprecated"
95
+ ]):
96
+ filtered_lines.append(line)
97
+
98
+ error_output = "\n".join(filtered_lines).strip()
99
+ if error_output:
100
+ print("\n⚠️ Schema validation errors:", file=sys.stderr)
101
+ print(error_output, file=sys.stderr)
102
+
103
+ print("=" * 60 + "\n", file=sys.stderr)
104
+
105
+ # Return non-zero exit code if validation failed
106
+ if result.returncode != 0:
107
+ print("❌ Schema validation failed - blocking file modification", file=sys.stderr)
108
+ print("Fix validation errors before saving the file.", file=sys.stderr)
109
+ sys.exit(2) # Block the operation
110
+
111
+ except subprocess.CalledProcessError as e:
112
+ print(f"❌ Failed to run schema validation: {e}", file=sys.stderr)
113
+ sys.exit(2) # Block on validation errors
114
+ except Exception as e:
115
+ print(f"❌ Unexpected error during schema validation: {e}", file=sys.stderr)
116
+ # Block on hook failures to ensure schema integrity
117
+ sys.exit(2)
118
+
119
+ # Exit 0 if validation passed
120
+ sys.exit(0)
121
+
122
+
123
+ if __name__ == "__main__":
124
+ main()
@@ -0,0 +1,15 @@
1
+ {
2
+ "hooks": {
3
+ "PostToolUse": [
4
+ {
5
+ "matcher": "Edit|MultiEdit|Write",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/validate_schema_hook.py"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ }
15
+ }
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: pv-mapping
3
+ description: >
4
+ Map permissible values in LinkML enums to ontology terms. Use this skill when:
5
+ (1) Adding or updating ontology mappings (meaning: field) for enum permissible values,
6
+ (2) Fixing validation errors from linkml-term-validator,
7
+ (3) User asks to map enums to ontology terms or fix CURIE mappings.
8
+ This skill covers OAK/runoak lookup, CURIE verification, and validation workflows.
9
+ ---
10
+
11
+ # Permissible Value Ontology Mapping
12
+
13
+ ## Core Rules
14
+
15
+ 1. **Never change PERMISSIBLE_VALUE names** - Keep uppercase names like `NUCLEIC_ACID`
16
+ 2. **Use `title:` for ontology label** - Match the ontology term's label
17
+ 3. **Use `meaning:` for CURIE** - Always verify via runoak before adding
18
+ 4. **Never guess CURIEs** - Wrong mappings are worse than no mappings
19
+
20
+ ## Workflow
21
+
22
+ ### 1. Look up term via runoak
23
+
24
+ ```bash
25
+ # Search for terms
26
+ runoak -i sqlite:obo:ncit search "nucleic acid"
27
+
28
+ # Verify a CURIE exists and get its label
29
+ runoak -i sqlite:obo:ncit info NCIT:C706
30
+ ```
31
+
32
+ ### 2. Add mapping
33
+
34
+ ```yaml
35
+ NUCLEIC_ACID:
36
+ title: Nucleic Acids # matches ontology term label
37
+ description: DNA or RNA sample
38
+ meaning: NCIT:C706 # verified CURIE
39
+ ```
40
+
41
+ Note that either the permissible value key, the title, or one of the aliases
42
+ should be a (case insensitive) match to the ontology term.
43
+
44
+ If there is already a canonical `meaning` field, OR the concept is not a close map, then linkml close/narrow/broad/exact mappings can be used:
45
+
46
+ ```yaml
47
+ NUCLEIC_ACID:
48
+ title: Nucleic Acids # matches ontology term label
49
+ description: DNA or RNA sample
50
+ meaning: NCIT:C706 # verified CURIE
51
+ close_mappings:
52
+ - SO:0000348. # label is nucleic_acid
53
+ aliases:
54
+ - nucleic_acid # to match SO
55
+ ```
56
+
57
+ ### 3. Validate
58
+
59
+ ```bash
60
+ just validate
61
+ ```
62
+
63
+ ## Interpreting Validation Errors
64
+
65
+ | Error Type | Action |
66
+ |------------|--------|
67
+ | "resolves to [wrong concept]" | **Fix immediately** - CURIE points to wrong term |
68
+ | "label mismatch" | Usually OK - add `title:` to match label if needed, or use an aliases |
69
+ | "Could not retrieve" | Check CURIE format or remove if term doesn't exist |
70
+
71
+ ## Ontology Selection
72
+
73
+ See [references/ontologies.md](references/ontologies.md) for:
74
+ - Domain-to-ontology mapping (which ontology for which concept type)
75
+ - CURIE format patterns for each ontology
76
+ - Additional runoak commands
77
+
78
+ ## When to Remove Mappings
79
+
80
+ Remove `meaning:` when:
81
+ - No appropriate ontology term exists
82
+ - CURIE consistently fails validation
83
+ - Mapped term is semantically incorrect or not the same concept
84
+
@@ -0,0 +1,58 @@
1
+ # Ontology Reference
2
+
3
+ ## Domain to Ontology Mapping
4
+
5
+ | Domain | Ontology | Prefix |
6
+ |--------|----------|--------|
7
+ | Biological processes/functions | Gene Ontology | GO |
8
+ | Chemical entities | ChEBI | CHEBI |
9
+ | Biomedical concepts | NCI Thesaurus | NCIT |
10
+ | Experimental methods | OBI, CHMO | OBI, CHMO |
11
+ | Protein modifications | PSI-MOD | MOD |
12
+ | Imaging/microscopy | FBbi | FBbi |
13
+ | File formats | EDAM | EDAM |
14
+ | Diseases | MONDO, Disease Ontology | MONDO, DOID |
15
+ | Anatomy | Uberon | UBERON |
16
+ | Cell types | Cell Ontology | CL |
17
+ | Phenotypes | PATO | PATO |
18
+ | Environment/exposures | ECTO, ENVO | ECTO, ENVO |
19
+ | Units | UO, QUDT | UO, qudt |
20
+
21
+ ## CURIE Format Patterns
22
+
23
+ | Ontology | Pattern | Example |
24
+ |----------|---------|---------|
25
+ | GO | `GO:NNNNNNN` | GO:0032991 |
26
+ | CHEBI | `CHEBI:NNNNN` | CHEBI:18154 |
27
+ | NCIT | `NCIT:CNNNNN` | NCIT:C706 |
28
+ | CHMO | `CHMO:NNNNNNN` | CHMO:0000698 |
29
+ | MOD | `MOD:NNNNN` | MOD:00033 |
30
+ | EDAM (formats) | `EDAM:format_NNNN` | EDAM:format_1476 |
31
+ | EDAM (data) | `EDAM:data_NNNN` | EDAM:data_2968 |
32
+ | FBbi | `FBbi:NNNNNNNN` | FBbi:00000399 |
33
+ | OBI | `OBI:NNNNNNN` | OBI:0001138 |
34
+ | UBERON | `UBERON:NNNNNNN` | UBERON:0000955 |
35
+ | CL | `CL:NNNNNNN` | CL:0000540 |
36
+ | PATO | `PATO:NNNNNNN` | PATO:0001340 |
37
+ | MONDO | `MONDO:NNNNNNN` | MONDO:0005015 |
38
+ | MESH | `MESH:DNNNNNN` | MESH:D056804 |
39
+
40
+ ## OAK Commands
41
+
42
+ For complex ontology operations beyond OLS:
43
+
44
+ ```bash
45
+ # Search
46
+ runoak -i sqlite:obo:go search "protein complex"
47
+
48
+ # Get term info
49
+ runoak -i sqlite:obo:go info GO:0032991
50
+
51
+ # Get ancestors
52
+ runoak -i sqlite:obo:go ancestors GO:0032991
53
+
54
+ # Get label
55
+ runoak -i sqlite:obo:go labels GO:0032991
56
+ ```
57
+
58
+ Available OAK adapters: `sqlite:obo:<ontology>` for any OBO ontology (go, chebi, uberon, cl, etc.)
@@ -0,0 +1 @@
1
+ {"sessionID":"3917e2d8-a563-4940-b0ff-1048ba95dfc9","startTime":1757435867551,"lastUpdate":1757435867579}
@@ -0,0 +1 @@
1
+ "9781b7cc-4923-467e-9213-71fe5b6ad405"
@@ -0,0 +1,20 @@
1
+ {
2
+ "installMethod": "unknown",
3
+ "autoUpdates": true,
4
+ "firstStartTime": "2025-09-09T16:37:47.492Z",
5
+ "userID": "a547dc2bc8e48257fe208265a98b220c0f08cf5d9d06e5037919dd4156eb64dd",
6
+ "projects": {
7
+ "/Users/cjm/repos/common-value-sets": {
8
+ "allowedTools": [],
9
+ "history": [],
10
+ "mcpContextUris": [],
11
+ "mcpServers": {},
12
+ "enabledMcpjsonServers": [],
13
+ "disabledMcpjsonServers": [],
14
+ "hasTrustDialogAccepted": false,
15
+ "projectOnboardingSeenCount": 0,
16
+ "hasClaudeMdExternalIncludesApproved": false,
17
+ "hasClaudeMdExternalIncludesWarningShown": false
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,15 @@
1
+ # Changes here will be overwritten by Copier
2
+ _commit: v0.4.1
3
+ _src_path: https://github.com/linkml/linkml-project-copier
4
+ add_example: true
5
+ copyright_year: '2025'
6
+ email: cjmungall@lbl.gov
7
+ full_name: Chris Mungall
8
+ gh_action_docs_preview: false
9
+ gh_action_pypi: true
10
+ github_org: linkml
11
+ license: Apache-2.0
12
+ project_description: A collection of commonly used value sets
13
+ project_name: common-value-sets
14
+ project_slug: valuesets
15
+
@@ -0,0 +1,18 @@
1
+ # Check http://editorconfig.org for more information
2
+ # This is the main config file for this project:
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ indent_style = space
10
+ indent_size = 2
11
+ trim_trailing_whitespace = true
12
+
13
+ [*.py]
14
+ indent_style = space
15
+ indent_size = 4
16
+
17
+ [*.md]
18
+ trim_trailing_whitespace = false
@@ -0,0 +1,167 @@
1
+ name: "Claude Code Action"
2
+ description: "Run Claude Code in GitHub Actions workflows"
3
+
4
+ inputs:
5
+ github_token:
6
+ description: "GitHub token with repo and issues permissions"
7
+ required: true
8
+ anthropic_api_key:
9
+ description: "Anthropic API key"
10
+ required: true
11
+ cborg_api_key:
12
+ description: "CBORG API key"
13
+ required: true
14
+ prompt:
15
+ description: "The prompt to send to Claude Code"
16
+ required: false
17
+ default: ""
18
+ prompt_file:
19
+ description: "Path to a file containing the prompt to send to Claude Code"
20
+ required: false
21
+ default: ""
22
+ allowed_tools:
23
+ description: "Comma-separated list of allowed tools for Claude Code to use"
24
+ required: false
25
+ default: ""
26
+ output_file:
27
+ description: "File to save Claude Code output to (optional)"
28
+ required: false
29
+ default: ""
30
+ timeout_minutes:
31
+ description: "Timeout in minutes for Claude Code execution"
32
+ required: false
33
+ default: "10"
34
+ install_github_mcp:
35
+ description: "Whether to install the GitHub MCP server"
36
+ required: false
37
+ default: "false"
38
+ install_artl_mcp:
39
+ description: "Whether to install the ARTL MCP server"
40
+ required: false
41
+ default: "false"
42
+
43
+
44
+ runs:
45
+ using: "composite"
46
+ steps:
47
+ - name: Install uvx
48
+ shell: bash
49
+ run: |
50
+ curl -LsSf https://astral.sh/uv/install.sh | sh
51
+ source $HOME/.cargo/env
52
+ which uvx || echo "uvx not found in PATH, installing via pip"
53
+ pip install uv || true
54
+
55
+ - name: Install Claude Code
56
+ shell: bash
57
+ run: npm install -g @anthropic-ai/claude-code
58
+
59
+ - name: Install GitHub MCP Server
60
+ if: inputs.install_github_mcp == 'true'
61
+ shell: bash
62
+ run: |
63
+ claude mcp add-json github '{
64
+ "command": "docker",
65
+ "args": [
66
+ "run",
67
+ "-i",
68
+ "--rm",
69
+ "-e",
70
+ "GITHUB_PERSONAL_ACCESS_TOKEN",
71
+ "ghcr.io/github/github-mcp-server:sha-ff3036d"
72
+ ],
73
+ "env": {
74
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ inputs.GITHUB_TOKEN }}"
75
+ }
76
+ }'
77
+
78
+ - name: Install ARTL MCP Server
79
+ if: inputs.install_artl_mcp == 'true'
80
+ shell: bash
81
+ run: |
82
+ claude mcp add-json artl '{
83
+ "command": "uvx",
84
+ "args": [
85
+ "artl-mcp"
86
+ ]
87
+ }'
88
+
89
+ - name: Prepare Prompt File
90
+ shell: bash
91
+ id: prepare_prompt
92
+ run: |
93
+ # Check if either prompt or prompt_file is provided
94
+ if [ -z "${{ inputs.prompt }}" ] && [ -z "${{ inputs.prompt_file }}" ]; then
95
+ echo "::error::Neither 'prompt' nor 'prompt_file' was provided. At least one is required."
96
+ exit 1
97
+ fi
98
+
99
+ # Determine which prompt source to use
100
+ if [ ! -z "${{ inputs.prompt_file }}" ]; then
101
+ # Check if the prompt file exists
102
+ if [ ! -f "${{ inputs.prompt_file }}" ]; then
103
+ echo "::error::Prompt file '${{ inputs.prompt_file }}' does not exist."
104
+ exit 1
105
+ fi
106
+
107
+ # Use the provided prompt file
108
+ PROMPT_PATH="${{ inputs.prompt_file }}"
109
+ else
110
+ mkdir -p /tmp/claude-action
111
+ PROMPT_PATH="/tmp/claude-action/prompt.txt"
112
+ echo "${{ inputs.prompt }}" > "$PROMPT_PATH"
113
+ fi
114
+
115
+ # Verify the prompt file is not empty
116
+ if [ ! -s "$PROMPT_PATH" ]; then
117
+ echo "::error::Prompt is empty. Please provide a non-empty prompt."
118
+ exit 1
119
+ fi
120
+
121
+ # Save the prompt path for the next step
122
+ echo "PROMPT_PATH=$PROMPT_PATH" >> $GITHUB_ENV
123
+
124
+ - name: Run Claude Code
125
+ shell: bash
126
+ id: run_claude
127
+ run: |
128
+ ALLOWED_TOOLS_ARG=""
129
+ if [ ! -z "${{ inputs.allowed_tools }}" ]; then
130
+ ALLOWED_TOOLS_ARG="--allowedTools ${{ inputs.allowed_tools }}"
131
+ fi
132
+
133
+ # Set a timeout to ensure the command doesn't run indefinitely
134
+ timeout_seconds=$((${{ inputs.timeout_minutes }} * 60))
135
+
136
+ if [ -z "${{ inputs.output_file }}" ]; then
137
+ # Run Claude Code and output to console
138
+ timeout $timeout_seconds claude \
139
+ -p \
140
+ --verbose \
141
+ --output-format stream-json \
142
+ "$(cat ${{ env.PROMPT_PATH }})" \
143
+ ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }}
144
+ else
145
+ # Run Claude Code and tee output to console and file
146
+ timeout $timeout_seconds claude \
147
+ -p \
148
+ --verbose \
149
+ --output-format stream-json \
150
+ "$(cat ${{ env.PROMPT_PATH }})" \
151
+ ${{ inputs.allowed_tools != '' && format('--allowedTools "{0}"', inputs.allowed_tools) || '' }} | tee output.txt
152
+
153
+ # Process output.txt into JSON in a separate step
154
+ jq -s '.' output.txt > output.json
155
+
156
+ # Extract the result from the last item in the array (system message)
157
+ jq -r '.[-1].result' output.json > "${{ inputs.output_file }}"
158
+
159
+ echo "Complete output saved to output.json, final response saved to ${{ inputs.output_file }}"
160
+ fi
161
+
162
+ env:
163
+ ANTHROPIC_API_KEY: "."
164
+ ANTHROPIC_AUTH_TOKEN: ${{ inputs.cborg_api_key }}
165
+ GITHUB_TOKEN: ${{ inputs.github_token }}
166
+ ANTHROPIC_BASE_URL: "https://api.cborg.lbl.gov"
167
+ DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1"