valuesets 0.3.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 valuesets might be problematic. Click here for more details.

Files changed (368) hide show
  1. valuesets-0.3.1/.claude/agents/permissible-value-mapper.md +107 -0
  2. valuesets-0.3.1/.claude/hooks/README.md +40 -0
  3. valuesets-0.3.1/.claude/hooks/validate_schema_hook.py +124 -0
  4. valuesets-0.3.1/.claude/settings.json +27 -0
  5. valuesets-0.3.1/.claude/statsig/statsig.session_id.2656274335 +1 -0
  6. valuesets-0.3.1/.claude/statsig/statsig.stable_id.2656274335 +1 -0
  7. valuesets-0.3.1/.claude.json +20 -0
  8. valuesets-0.3.1/.copier-answers.yml +15 -0
  9. valuesets-0.3.1/.editorconfig +18 -0
  10. valuesets-0.3.1/.github/actions/claude-code-action/action.yml +167 -0
  11. valuesets-0.3.1/.github/actions/claude-issue-summarize-action/action.yml +74 -0
  12. valuesets-0.3.1/.github/actions/claude-issue-triage-action/action.yml +91 -0
  13. valuesets-0.3.1/.github/ai-controllers.json +1 -0
  14. valuesets-0.3.1/.github/copilot-instructions.md +1 -0
  15. valuesets-0.3.1/.github/copilot-setup-steps.yml +40 -0
  16. valuesets-0.3.1/.github/dependabot.yml +9 -0
  17. valuesets-0.3.1/.github/workflows/claude-code-review.yml +78 -0
  18. valuesets-0.3.1/.github/workflows/claude-issue-summarize.yml +25 -0
  19. valuesets-0.3.1/.github/workflows/claude-issue-triage.yml +24 -0
  20. valuesets-0.3.1/.github/workflows/claude.yml +95 -0
  21. valuesets-0.3.1/.github/workflows/deploy-docs.yaml +58 -0
  22. valuesets-0.3.1/.github/workflows/dragon-ai.yml +188 -0
  23. valuesets-0.3.1/.github/workflows/main.yaml +55 -0
  24. valuesets-0.3.1/.github/workflows/pypi-publish.yaml +35 -0
  25. valuesets-0.3.1/.gitignore +156 -0
  26. valuesets-0.3.1/.goosehints +1 -0
  27. valuesets-0.3.1/.mcp.json +19 -0
  28. valuesets-0.3.1/.pre-commit-config.yaml +45 -0
  29. valuesets-0.3.1/.yamllint.yaml +12 -0
  30. valuesets-0.3.1/AGENTS.md +62 -0
  31. valuesets-0.3.1/CLAUDE.md +62 -0
  32. valuesets-0.3.1/CODE_OF_CONDUCT.md +76 -0
  33. valuesets-0.3.1/CONTRIBUTING.md +138 -0
  34. valuesets-0.3.1/LICENSE +201 -0
  35. valuesets-0.3.1/PKG-INFO +395 -0
  36. valuesets-0.3.1/README.md +382 -0
  37. valuesets-0.3.1/RICH_ENUMS.md +81 -0
  38. valuesets-0.3.1/TODO.md +223 -0
  39. valuesets-0.3.1/ai.just +46 -0
  40. valuesets-0.3.1/cache/afo/terms.csv +5 -0
  41. valuesets-0.3.1/cache/chebi/terms.csv +225 -0
  42. valuesets-0.3.1/cache/chmo/terms.csv +42 -0
  43. valuesets-0.3.1/cache/edam/terms.csv +46 -0
  44. valuesets-0.3.1/cache/enm/terms.csv +7 -0
  45. valuesets-0.3.1/cache/envo/terms.csv +28 -0
  46. valuesets-0.3.1/cache/fabio/terms.csv +33 -0
  47. valuesets-0.3.1/cache/fhir_data_absent_reason/terms.csv +16 -0
  48. valuesets-0.3.1/cache/gc/terms.csv +6 -0
  49. valuesets-0.3.1/cache/geno/terms.csv +7 -0
  50. valuesets-0.3.1/cache/geonames/terms.csv +12 -0
  51. valuesets-0.3.1/cache/go/terms.csv +48 -0
  52. valuesets-0.3.1/cache/go_ref/terms.csv +20 -0
  53. valuesets-0.3.1/cache/greg/terms.csv +13 -0
  54. valuesets-0.3.1/cache/hex/terms.csv +155 -0
  55. valuesets-0.3.1/cache/hl7/terms.csv +52 -0
  56. valuesets-0.3.1/cache/hp/terms.csv +26 -0
  57. valuesets-0.3.1/cache/iana/terms.csv +60 -0
  58. valuesets-0.3.1/cache/iao/terms.csv +26 -0
  59. valuesets-0.3.1/cache/iso3166loc/terms.csv +246 -0
  60. valuesets-0.3.1/cache/loinc/terms.csv +8 -0
  61. valuesets-0.3.1/cache/mi/terms.csv +71 -0
  62. valuesets-0.3.1/cache/mixs/terms.csv +5 -0
  63. valuesets-0.3.1/cache/ms/terms.csv +25 -0
  64. valuesets-0.3.1/cache/msio/terms.csv +19 -0
  65. valuesets-0.3.1/cache/ncbitaxon/terms.csv +219 -0
  66. valuesets-0.3.1/cache/ncit/terms.csv +214 -0
  67. valuesets-0.3.1/cache/obi/terms.csv +22 -0
  68. valuesets-0.3.1/cache/pato/terms.csv +18 -0
  69. valuesets-0.3.1/cache/prov/terms.csv +3 -0
  70. valuesets-0.3.1/cache/qudt/terms.csv +22 -0
  71. valuesets-0.3.1/cache/ro/terms.csv +67 -0
  72. valuesets-0.3.1/cache/schema/terms.csv +3 -0
  73. valuesets-0.3.1/cache/sio/terms.csv +4 -0
  74. valuesets-0.3.1/cache/slm/terms.csv +8 -0
  75. valuesets-0.3.1/cache/snomed/terms.csv +16 -0
  76. valuesets-0.3.1/cache/so/terms.csv +76 -0
  77. valuesets-0.3.1/cache/spdx/terms.csv +19 -0
  78. valuesets-0.3.1/cache/swisslipids/terms.csv +8 -0
  79. valuesets-0.3.1/cache/time/terms.csv +8 -0
  80. valuesets-0.3.1/cache/uberon/terms.csv +14 -0
  81. valuesets-0.3.1/cache/uo/terms.csv +69 -0
  82. valuesets-0.3.1/cache/vo/terms.csv +3 -0
  83. valuesets-0.3.1/config.public.mk +32 -0
  84. valuesets-0.3.1/config.yaml +62 -0
  85. valuesets-0.3.1/docs/about.md +3 -0
  86. valuesets-0.3.1/docs/elements/.gitkeep +0 -0
  87. valuesets-0.3.1/docs/index.md +11 -0
  88. valuesets-0.3.1/docs/manuscript/manuscript.md +580 -0
  89. valuesets-0.3.1/docs/schema/common_value_sets.yaml +25483 -0
  90. valuesets-0.3.1/docs/schema/valuesets.yaml +47881 -0
  91. valuesets-0.3.1/docs/slot-generation.md +225 -0
  92. valuesets-0.3.1/docs/templates-linkml/README.md +7 -0
  93. valuesets-0.3.1/examples/README.md +9 -0
  94. valuesets-0.3.1/justfile +309 -0
  95. valuesets-0.3.1/mkdocs.yml +43 -0
  96. valuesets-0.3.1/project.justfile +164 -0
  97. valuesets-0.3.1/pyproject.toml +77 -0
  98. valuesets-0.3.1/pytest.ini +7 -0
  99. valuesets-0.3.1/python.justfile +6 -0
  100. valuesets-0.3.1/scripts/add_enum_metadata_example.yaml +82 -0
  101. valuesets-0.3.1/scripts/add_ncbitaxon_aliases.py +69 -0
  102. valuesets-0.3.1/scripts/fetch_uniprot_species.py +157 -0
  103. valuesets-0.3.1/scripts/fix_all_uniprot.sh +11 -0
  104. valuesets-0.3.1/scripts/fix_uniprot_aliases.py +34 -0
  105. valuesets-0.3.1/scripts/fix_uniprot_titles.py +46 -0
  106. valuesets-0.3.1/scripts/merge_enums_hierarchy.py +255 -0
  107. valuesets-0.3.1/scripts/sync_uniprot_species.py +347 -0
  108. valuesets-0.3.1/src/common_value_sets/enums/__init__.py +18 -0
  109. valuesets-0.3.1/src/valuesets/__init__.py +7 -0
  110. valuesets-0.3.1/src/valuesets/_version.py +8 -0
  111. valuesets-0.3.1/src/valuesets/datamodel/valuesets.py +13796 -0
  112. valuesets-0.3.1/src/valuesets/datamodel/valuesets_dataclass.py +24503 -0
  113. valuesets-0.3.1/src/valuesets/datamodel/valuesets_pydantic.py +13796 -0
  114. valuesets-0.3.1/src/valuesets/enums/__init__.py +590 -0
  115. valuesets-0.3.1/src/valuesets/enums/academic/__init__.py +1 -0
  116. valuesets-0.3.1/src/valuesets/enums/academic/research.py +559 -0
  117. valuesets-0.3.1/src/valuesets/enums/analytical_chemistry/__init__.py +1 -0
  118. valuesets-0.3.1/src/valuesets/enums/analytical_chemistry/mass_spectrometry.py +198 -0
  119. valuesets-0.3.1/src/valuesets/enums/bio/__init__.py +1 -0
  120. valuesets-0.3.1/src/valuesets/enums/bio/biological_colors.py +238 -0
  121. valuesets-0.3.1/src/valuesets/enums/bio/cell_cycle.py +180 -0
  122. valuesets-0.3.1/src/valuesets/enums/bio/currency_chemicals.py +52 -0
  123. valuesets-0.3.1/src/valuesets/enums/bio/developmental_stages.py +103 -0
  124. valuesets-0.3.1/src/valuesets/enums/bio/genome_features.py +182 -0
  125. valuesets-0.3.1/src/valuesets/enums/bio/genomics.py +91 -0
  126. valuesets-0.3.1/src/valuesets/enums/bio/go_aspect.py +32 -0
  127. valuesets-0.3.1/src/valuesets/enums/bio/go_causality.py +58 -0
  128. valuesets-0.3.1/src/valuesets/enums/bio/go_evidence.py +129 -0
  129. valuesets-0.3.1/src/valuesets/enums/bio/human_developmental_stages.py +62 -0
  130. valuesets-0.3.1/src/valuesets/enums/bio/insdc_geographic_locations.py +591 -0
  131. valuesets-0.3.1/src/valuesets/enums/bio/insdc_missing_values.py +49 -0
  132. valuesets-0.3.1/src/valuesets/enums/bio/lipid_categories.py +67 -0
  133. valuesets-0.3.1/src/valuesets/enums/bio/mouse_developmental_stages.py +62 -0
  134. valuesets-0.3.1/src/valuesets/enums/bio/plant_biology.py +86 -0
  135. valuesets-0.3.1/src/valuesets/enums/bio/plant_developmental_stages.py +54 -0
  136. valuesets-0.3.1/src/valuesets/enums/bio/plant_sex.py +81 -0
  137. valuesets-0.3.1/src/valuesets/enums/bio/protein_evidence.py +61 -0
  138. valuesets-0.3.1/src/valuesets/enums/bio/proteomics_standards.py +123 -0
  139. valuesets-0.3.1/src/valuesets/enums/bio/psi_mi.py +306 -0
  140. valuesets-0.3.1/src/valuesets/enums/bio/relationship_to_oxygen.py +37 -0
  141. valuesets-0.3.1/src/valuesets/enums/bio/sequence_alphabets.py +449 -0
  142. valuesets-0.3.1/src/valuesets/enums/bio/sequence_chemistry.py +357 -0
  143. valuesets-0.3.1/src/valuesets/enums/bio/sequencing_platforms.py +302 -0
  144. valuesets-0.3.1/src/valuesets/enums/bio/structural_biology.py +320 -0
  145. valuesets-0.3.1/src/valuesets/enums/bio/taxonomy.py +238 -0
  146. valuesets-0.3.1/src/valuesets/enums/bio/trophic_levels.py +85 -0
  147. valuesets-0.3.1/src/valuesets/enums/bio/uniprot_species.py +344 -0
  148. valuesets-0.3.1/src/valuesets/enums/bio/viral_genome_types.py +47 -0
  149. valuesets-0.3.1/src/valuesets/enums/bioprocessing/__init__.py +1 -0
  150. valuesets-0.3.1/src/valuesets/enums/bioprocessing/scale_up.py +249 -0
  151. valuesets-0.3.1/src/valuesets/enums/business/__init__.py +1 -0
  152. valuesets-0.3.1/src/valuesets/enums/business/human_resources.py +275 -0
  153. valuesets-0.3.1/src/valuesets/enums/business/industry_classifications.py +181 -0
  154. valuesets-0.3.1/src/valuesets/enums/business/management_operations.py +228 -0
  155. valuesets-0.3.1/src/valuesets/enums/business/organizational_structures.py +236 -0
  156. valuesets-0.3.1/src/valuesets/enums/business/quality_management.py +181 -0
  157. valuesets-0.3.1/src/valuesets/enums/business/supply_chain.py +232 -0
  158. valuesets-0.3.1/src/valuesets/enums/chemistry/__init__.py +1 -0
  159. valuesets-0.3.1/src/valuesets/enums/chemistry/chemical_entities.py +315 -0
  160. valuesets-0.3.1/src/valuesets/enums/chemistry/reaction_directionality.py +65 -0
  161. valuesets-0.3.1/src/valuesets/enums/chemistry/reactions.py +256 -0
  162. valuesets-0.3.1/src/valuesets/enums/clinical/__init__.py +1 -0
  163. valuesets-0.3.1/src/valuesets/enums/clinical/nih_demographics.py +177 -0
  164. valuesets-0.3.1/src/valuesets/enums/clinical/phenopackets.py +254 -0
  165. valuesets-0.3.1/src/valuesets/enums/common_value_sets.py +8791 -0
  166. valuesets-0.3.1/src/valuesets/enums/computing/__init__.py +1 -0
  167. valuesets-0.3.1/src/valuesets/enums/computing/file_formats.py +294 -0
  168. valuesets-0.3.1/src/valuesets/enums/computing/maturity_levels.py +196 -0
  169. valuesets-0.3.1/src/valuesets/enums/computing/mime_types.py +227 -0
  170. valuesets-0.3.1/src/valuesets/enums/confidence_levels.py +168 -0
  171. valuesets-0.3.1/src/valuesets/enums/contributor.py +30 -0
  172. valuesets-0.3.1/src/valuesets/enums/core.py +42 -0
  173. valuesets-0.3.1/src/valuesets/enums/data/__init__.py +1 -0
  174. valuesets-0.3.1/src/valuesets/enums/data/data_absent_reason.py +53 -0
  175. valuesets-0.3.1/src/valuesets/enums/data_science/__init__.py +1 -0
  176. valuesets-0.3.1/src/valuesets/enums/data_science/binary_classification.py +87 -0
  177. valuesets-0.3.1/src/valuesets/enums/data_science/emotion_classification.py +66 -0
  178. valuesets-0.3.1/src/valuesets/enums/data_science/priority_severity.py +73 -0
  179. valuesets-0.3.1/src/valuesets/enums/data_science/quality_control.py +46 -0
  180. valuesets-0.3.1/src/valuesets/enums/data_science/sentiment_analysis.py +50 -0
  181. valuesets-0.3.1/src/valuesets/enums/data_science/text_classification.py +97 -0
  182. valuesets-0.3.1/src/valuesets/enums/demographics.py +206 -0
  183. valuesets-0.3.1/src/valuesets/enums/ecological_interactions.py +151 -0
  184. valuesets-0.3.1/src/valuesets/enums/energy/__init__.py +1 -0
  185. valuesets-0.3.1/src/valuesets/enums/energy/energy.py +343 -0
  186. valuesets-0.3.1/src/valuesets/enums/energy/fossil_fuels.py +29 -0
  187. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/__init__.py +1 -0
  188. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_facilities.py +195 -0
  189. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_fuel_cycle.py +96 -0
  190. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_fuels.py +175 -0
  191. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_operations.py +191 -0
  192. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_regulatory.py +188 -0
  193. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_safety.py +164 -0
  194. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/nuclear_waste.py +158 -0
  195. valuesets-0.3.1/src/valuesets/enums/energy/nuclear/reactor_types.py +163 -0
  196. valuesets-0.3.1/src/valuesets/enums/environmental_health/__init__.py +1 -0
  197. valuesets-0.3.1/src/valuesets/enums/environmental_health/exposures.py +265 -0
  198. valuesets-0.3.1/src/valuesets/enums/geography/__init__.py +1 -0
  199. valuesets-0.3.1/src/valuesets/enums/geography/geographic_codes.py +741 -0
  200. valuesets-0.3.1/src/valuesets/enums/health/__init__.py +12 -0
  201. valuesets-0.3.1/src/valuesets/enums/health/vaccination.py +98 -0
  202. valuesets-0.3.1/src/valuesets/enums/health.py +36 -0
  203. valuesets-0.3.1/src/valuesets/enums/health_base.py +36 -0
  204. valuesets-0.3.1/src/valuesets/enums/healthcare.py +45 -0
  205. valuesets-0.3.1/src/valuesets/enums/industry/__init__.py +1 -0
  206. valuesets-0.3.1/src/valuesets/enums/industry/extractive_industry.py +94 -0
  207. valuesets-0.3.1/src/valuesets/enums/industry/mining.py +388 -0
  208. valuesets-0.3.1/src/valuesets/enums/industry/safety_colors.py +201 -0
  209. valuesets-0.3.1/src/valuesets/enums/investigation.py +27 -0
  210. valuesets-0.3.1/src/valuesets/enums/materials_science/__init__.py +1 -0
  211. valuesets-0.3.1/src/valuesets/enums/materials_science/characterization_methods.py +112 -0
  212. valuesets-0.3.1/src/valuesets/enums/materials_science/crystal_structures.py +76 -0
  213. valuesets-0.3.1/src/valuesets/enums/materials_science/material_properties.py +119 -0
  214. valuesets-0.3.1/src/valuesets/enums/materials_science/material_types.py +104 -0
  215. valuesets-0.3.1/src/valuesets/enums/materials_science/pigments_dyes.py +198 -0
  216. valuesets-0.3.1/src/valuesets/enums/materials_science/synthesis_methods.py +109 -0
  217. valuesets-0.3.1/src/valuesets/enums/medical/__init__.py +1 -0
  218. valuesets-0.3.1/src/valuesets/enums/medical/clinical.py +277 -0
  219. valuesets-0.3.1/src/valuesets/enums/medical/neuroimaging.py +119 -0
  220. valuesets-0.3.1/src/valuesets/enums/mining_processing.py +302 -0
  221. valuesets-0.3.1/src/valuesets/enums/physics/__init__.py +1 -0
  222. valuesets-0.3.1/src/valuesets/enums/physics/states_of_matter.py +46 -0
  223. valuesets-0.3.1/src/valuesets/enums/social/__init__.py +1 -0
  224. valuesets-0.3.1/src/valuesets/enums/social/person_status.py +29 -0
  225. valuesets-0.3.1/src/valuesets/enums/spatial/__init__.py +1 -0
  226. valuesets-0.3.1/src/valuesets/enums/spatial/spatial_qualifiers.py +246 -0
  227. valuesets-0.3.1/src/valuesets/enums/statistics/__init__.py +5 -0
  228. valuesets-0.3.1/src/valuesets/enums/statistics/prediction_outcomes.py +31 -0
  229. valuesets-0.3.1/src/valuesets/enums/statistics.py +31 -0
  230. valuesets-0.3.1/src/valuesets/enums/time/__init__.py +1 -0
  231. valuesets-0.3.1/src/valuesets/enums/time/temporal.py +254 -0
  232. valuesets-0.3.1/src/valuesets/enums/units/__init__.py +1 -0
  233. valuesets-0.3.1/src/valuesets/enums/units/measurements.py +310 -0
  234. valuesets-0.3.1/src/valuesets/enums/visual/__init__.py +1 -0
  235. valuesets-0.3.1/src/valuesets/enums/visual/colors.py +376 -0
  236. valuesets-0.3.1/src/valuesets/generators/__init__.py +19 -0
  237. valuesets-0.3.1/src/valuesets/generators/auto_slot_injector.py +280 -0
  238. valuesets-0.3.1/src/valuesets/generators/enhanced_pydantic_generator.py +100 -0
  239. valuesets-0.3.1/src/valuesets/generators/enum_slot_generator.py +201 -0
  240. valuesets-0.3.1/src/valuesets/generators/modular_rich_generator.py +353 -0
  241. valuesets-0.3.1/src/valuesets/generators/prefix_standardizer.py +198 -0
  242. valuesets-0.3.1/src/valuesets/generators/rich_enum.py +127 -0
  243. valuesets-0.3.1/src/valuesets/generators/rich_pydantic_generator.py +310 -0
  244. valuesets-0.3.1/src/valuesets/generators/smart_slot_syncer.py +428 -0
  245. valuesets-0.3.1/src/valuesets/generators/sssom_generator.py +394 -0
  246. valuesets-0.3.1/src/valuesets/merged/merged_hierarchy.yaml +21649 -0
  247. valuesets-0.3.1/src/valuesets/schema/README.md +3 -0
  248. valuesets-0.3.1/src/valuesets/schema/academic/research.yaml +911 -0
  249. valuesets-0.3.1/src/valuesets/schema/analytical_chemistry/mass_spectrometry.yaml +206 -0
  250. valuesets-0.3.1/src/valuesets/schema/bio/bio_entities.yaml +364 -0
  251. valuesets-0.3.1/src/valuesets/schema/bio/biological_colors.yaml +434 -0
  252. valuesets-0.3.1/src/valuesets/schema/bio/cell_cycle.yaml +309 -0
  253. valuesets-0.3.1/src/valuesets/schema/bio/currency_chemicals.yaml +70 -0
  254. valuesets-0.3.1/src/valuesets/schema/bio/developmental_stages.yaml +226 -0
  255. valuesets-0.3.1/src/valuesets/schema/bio/genome_features.yaml +342 -0
  256. valuesets-0.3.1/src/valuesets/schema/bio/genomics.yaml +101 -0
  257. valuesets-0.3.1/src/valuesets/schema/bio/go_aspect.yaml +39 -0
  258. valuesets-0.3.1/src/valuesets/schema/bio/go_causality.yaml +119 -0
  259. valuesets-0.3.1/src/valuesets/schema/bio/go_evidence.yaml +215 -0
  260. valuesets-0.3.1/src/valuesets/schema/bio/insdc_geographic_locations.yaml +911 -0
  261. valuesets-0.3.1/src/valuesets/schema/bio/insdc_missing_values.yaml +85 -0
  262. valuesets-0.3.1/src/valuesets/schema/bio/lipid_categories.yaml +72 -0
  263. valuesets-0.3.1/src/valuesets/schema/bio/plant_biology.yaml +125 -0
  264. valuesets-0.3.1/src/valuesets/schema/bio/plant_developmental_stages.yaml +77 -0
  265. valuesets-0.3.1/src/valuesets/schema/bio/plant_sex.yaml +108 -0
  266. valuesets-0.3.1/src/valuesets/schema/bio/protein_evidence.yaml +63 -0
  267. valuesets-0.3.1/src/valuesets/schema/bio/proteomics_standards.yaml +116 -0
  268. valuesets-0.3.1/src/valuesets/schema/bio/psi_mi.yaml +400 -0
  269. valuesets-0.3.1/src/valuesets/schema/bio/relationship_to_oxygen.yaml +46 -0
  270. valuesets-0.3.1/src/valuesets/schema/bio/sequence_alphabets.yaml +1168 -0
  271. valuesets-0.3.1/src/valuesets/schema/bio/sequence_chemistry.yaml +477 -0
  272. valuesets-0.3.1/src/valuesets/schema/bio/sequencing_platforms.yaml +515 -0
  273. valuesets-0.3.1/src/valuesets/schema/bio/structural_biology.yaml +428 -0
  274. valuesets-0.3.1/src/valuesets/schema/bio/taxonomy.yaml +453 -0
  275. valuesets-0.3.1/src/valuesets/schema/bio/trophic_levels.yaml +118 -0
  276. valuesets-0.3.1/src/valuesets/schema/bio/uniprot_species.yaml +1209 -0
  277. valuesets-0.3.1/src/valuesets/schema/bio/viral_genome_types.yaml +99 -0
  278. valuesets-0.3.1/src/valuesets/schema/bioprocessing/scale_up.yaml +458 -0
  279. valuesets-0.3.1/src/valuesets/schema/business/human_resources.yaml +752 -0
  280. valuesets-0.3.1/src/valuesets/schema/business/industry_classifications.yaml +448 -0
  281. valuesets-0.3.1/src/valuesets/schema/business/management_operations.yaml +602 -0
  282. valuesets-0.3.1/src/valuesets/schema/business/organizational_structures.yaml +645 -0
  283. valuesets-0.3.1/src/valuesets/schema/business/quality_management.yaml +502 -0
  284. valuesets-0.3.1/src/valuesets/schema/business/supply_chain.yaml +688 -0
  285. valuesets-0.3.1/src/valuesets/schema/chemistry/chemical_entities.yaml +639 -0
  286. valuesets-0.3.1/src/valuesets/schema/chemistry/reaction_directionality.yaml +60 -0
  287. valuesets-0.3.1/src/valuesets/schema/chemistry/reactions.yaml +442 -0
  288. valuesets-0.3.1/src/valuesets/schema/clinical/nih_demographics.yaml +285 -0
  289. valuesets-0.3.1/src/valuesets/schema/clinical/phenopackets.yaml +429 -0
  290. valuesets-0.3.1/src/valuesets/schema/computing/file_formats.yaml +631 -0
  291. valuesets-0.3.1/src/valuesets/schema/computing/maturity_levels.yaml +229 -0
  292. valuesets-0.3.1/src/valuesets/schema/computing/mime_types.yaml +266 -0
  293. valuesets-0.3.1/src/valuesets/schema/confidence_levels.yaml +206 -0
  294. valuesets-0.3.1/src/valuesets/schema/contributor.yaml +30 -0
  295. valuesets-0.3.1/src/valuesets/schema/core.yaml +55 -0
  296. valuesets-0.3.1/src/valuesets/schema/data/data_absent_reason.yaml +82 -0
  297. valuesets-0.3.1/src/valuesets/schema/data_science/binary_classification.yaml +125 -0
  298. valuesets-0.3.1/src/valuesets/schema/data_science/emotion_classification.yaml +109 -0
  299. valuesets-0.3.1/src/valuesets/schema/data_science/priority_severity.yaml +122 -0
  300. valuesets-0.3.1/src/valuesets/schema/data_science/quality_control.yaml +68 -0
  301. valuesets-0.3.1/src/valuesets/schema/data_science/sentiment_analysis.yaml +81 -0
  302. valuesets-0.3.1/src/valuesets/schema/data_science/text_classification.yaml +135 -0
  303. valuesets-0.3.1/src/valuesets/schema/demographics.yaml +238 -0
  304. valuesets-0.3.1/src/valuesets/schema/ecological_interactions.yaml +298 -0
  305. valuesets-0.3.1/src/valuesets/schema/energy/energy.yaml +595 -0
  306. valuesets-0.3.1/src/valuesets/schema/energy/fossil_fuels.yaml +28 -0
  307. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_facilities.yaml +463 -0
  308. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_fuel_cycle.yaml +82 -0
  309. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_fuels.yaml +421 -0
  310. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_operations.yaml +480 -0
  311. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_regulatory.yaml +200 -0
  312. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_safety.yaml +352 -0
  313. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/nuclear_waste.yaml +332 -0
  314. valuesets-0.3.1/src/valuesets/schema/energy/nuclear/reactor_types.yaml +394 -0
  315. valuesets-0.3.1/src/valuesets/schema/environmental_health/exposures.yaml +355 -0
  316. valuesets-0.3.1/src/valuesets/schema/generated_slots.yaml +1828 -0
  317. valuesets-0.3.1/src/valuesets/schema/geography/geographic_codes.yaml +1018 -0
  318. valuesets-0.3.1/src/valuesets/schema/health/vaccination.yaml +102 -0
  319. valuesets-0.3.1/src/valuesets/schema/health.yaml +38 -0
  320. valuesets-0.3.1/src/valuesets/schema/healthcare.yaml +53 -0
  321. valuesets-0.3.1/src/valuesets/schema/industry/extractive_industry.yaml +89 -0
  322. valuesets-0.3.1/src/valuesets/schema/industry/mining.yaml +888 -0
  323. valuesets-0.3.1/src/valuesets/schema/industry/safety_colors.yaml +375 -0
  324. valuesets-0.3.1/src/valuesets/schema/investigation.yaml +64 -0
  325. valuesets-0.3.1/src/valuesets/schema/materials_science/characterization_methods.yaml +193 -0
  326. valuesets-0.3.1/src/valuesets/schema/materials_science/crystal_structures.yaml +138 -0
  327. valuesets-0.3.1/src/valuesets/schema/materials_science/material_properties.yaml +135 -0
  328. valuesets-0.3.1/src/valuesets/schema/materials_science/material_types.yaml +151 -0
  329. valuesets-0.3.1/src/valuesets/schema/materials_science/pigments_dyes.yaml +465 -0
  330. valuesets-0.3.1/src/valuesets/schema/materials_science/synthesis_methods.yaml +186 -0
  331. valuesets-0.3.1/src/valuesets/schema/medical/clinical.yaml +610 -0
  332. valuesets-0.3.1/src/valuesets/schema/medical/neuroimaging.yaml +325 -0
  333. valuesets-0.3.1/src/valuesets/schema/mining_processing.yaml +295 -0
  334. valuesets-0.3.1/src/valuesets/schema/physics/states_of_matter.yaml +46 -0
  335. valuesets-0.3.1/src/valuesets/schema/slot_mixins.yaml +143 -0
  336. valuesets-0.3.1/src/valuesets/schema/social/person_status.yaml +28 -0
  337. valuesets-0.3.1/src/valuesets/schema/spatial/spatial_qualifiers.yaml +466 -0
  338. valuesets-0.3.1/src/valuesets/schema/statistics/prediction_outcomes.yaml +26 -0
  339. valuesets-0.3.1/src/valuesets/schema/statistics.yaml +34 -0
  340. valuesets-0.3.1/src/valuesets/schema/time/temporal.yaml +435 -0
  341. valuesets-0.3.1/src/valuesets/schema/types.yaml +15 -0
  342. valuesets-0.3.1/src/valuesets/schema/units/measurements.yaml +675 -0
  343. valuesets-0.3.1/src/valuesets/schema/valuesets.yaml +100 -0
  344. valuesets-0.3.1/src/valuesets/schema/visual/colors.yaml +778 -0
  345. valuesets-0.3.1/src/valuesets/utils/__init__.py +6 -0
  346. valuesets-0.3.1/src/valuesets/utils/comparison.py +102 -0
  347. valuesets-0.3.1/src/valuesets/utils/expand_dynamic_enums.py +414 -0
  348. valuesets-0.3.1/src/valuesets/utils/mapping_utils.py +236 -0
  349. valuesets-0.3.1/src/valuesets/validators/__init__.py +11 -0
  350. valuesets-0.3.1/src/valuesets/validators/enum_evaluator.py +669 -0
  351. valuesets-0.3.1/src/valuesets/validators/oak_config.yaml +70 -0
  352. valuesets-0.3.1/src/valuesets/validators/validate_with_ols.py +241 -0
  353. valuesets-0.3.1/templates/README.md +118 -0
  354. valuesets-0.3.1/templates/pydantic/enum.py.jinja +146 -0
  355. valuesets-0.3.1/test_mappings.sssom.tsv +114 -0
  356. valuesets-0.3.1/tests/__init__.py +1 -0
  357. valuesets-0.3.1/tests/data/README.md +14 -0
  358. valuesets-0.3.1/tests/data/invalid/.gitkeep +0 -0
  359. valuesets-0.3.1/tests/data/problem/invalid/.gitkeep +0 -0
  360. valuesets-0.3.1/tests/data/problem/valid/.gitkeep +0 -0
  361. valuesets-0.3.1/tests/data/valid/.gitkeep +0 -0
  362. valuesets-0.3.1/tests/test_data.py +26 -0
  363. valuesets-0.3.1/tests/test_rich_enums.py +332 -0
  364. valuesets-0.3.1/tests/validators/test_enum_evaluator.py +213 -0
  365. valuesets-0.3.1/tests/validators/test_ols_validator.py +191 -0
  366. valuesets-0.3.1/tests/validators/test_validator.py +109 -0
  367. valuesets-0.3.1/uv.lock +4559 -0
  368. valuesets-0.3.1/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,27 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(*)",
5
+ "Edit",
6
+ "MultiEdit",
7
+ "NotebookEdit",
8
+ "FileEdit",
9
+ "WebFetch",
10
+ "WebSearch",
11
+ "Write"
12
+ ]
13
+ },
14
+ "hooks": {
15
+ "PostToolUse": [
16
+ {
17
+ "matcher": "Edit|MultiEdit|Write",
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/validate_schema_hook.py"
22
+ }
23
+ ]
24
+ }
25
+ ]
26
+ }
27
+ }
@@ -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"
@@ -0,0 +1,74 @@
1
+ name: "Claude Issue summarize Action"
2
+ description: "Automatically Summarize GitHub issues using Claude Code"
3
+
4
+ inputs:
5
+ timeout_minutes:
6
+ description: "Timeout in minutes for execution"
7
+ required: false
8
+ default: "5"
9
+ anthropic_api_key:
10
+ description: "Anthropic API key"
11
+ required: true
12
+ cborg_api_key:
13
+ description: "CBORG API key"
14
+ required: true
15
+ github_token:
16
+ description: "GitHub token with repo and issues permissions"
17
+ required: true
18
+
19
+ runs:
20
+ using: "composite"
21
+ steps:
22
+ - name: Checkout repository code
23
+ uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Create prompt file
28
+ shell: bash
29
+ run: |
30
+ mkdir -p /tmp/claude-prompts
31
+ cat > /tmp/claude-prompts/claude-issue-summarize-prompt.txt << 'EOF'
32
+ You're an Summarization assistant for GitHub issues. Your task is to analyze the issue, look up related issues, and summarize the issue.
33
+
34
+ Remember that this repo is primarily a note-taking and memory device for Chris Mungall, so anything you can do to enhance and enrich that would be helpful.
35
+
36
+ IMPORTANT: Don't make any PRs. You should ONLY post a response, IN THE SAME ISSUE.
37
+
38
+ Issue Information:
39
+ - REPO: ${{ github.repository }}
40
+ - ISSUE_NUMBER: ${{ github.event.issue.number }}
41
+
42
+ TASK OVERVIEW:
43
+
44
+ 1. First, use your judgement to determine the course of action.
45
+ - If the issue is an epic or has links to other issues, read those issues, and summarize them. Summarize their status etc. Given an overall summary.
46
+ - If the issue is an idea or a vague high level description, run with the idea, do deep research, give heloful suggestions with links to relevant papers etc.
47
+ - If there are links in the issue to websites, database entities, etc, then look these up.
48
+ - If there are links or references to papers, then looks these up and summarize (don't guess content - if you can't access the paper, then say "I can't access the paper")
49
+ - Try using artl-mcp to get paper fulltext.
50
+ - If you want a more powerful AI agent to take on this one and make a PR, use this magic phrase: `@dragon-ai-agent please <INSTRUCTIONS>`
51
+
52
+ 2. Next, use the GitHub tools to get context about the issue:
53
+ - You have access to these github tools:
54
+ - mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
55
+ - mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
56
+ - mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
57
+ - mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
58
+ - mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
59
+ - You can also use web searching and fetching.
60
+
61
+ - It's okay to not add any information if the issue is not clear.
62
+ EOF
63
+
64
+ - name: Run Claude Code
65
+ uses: ./.github/actions/claude-code-action
66
+ with:
67
+ prompt_file: /tmp/claude-prompts/claude-issue-summarize-prompt.txt
68
+ allowed_tools: "Bash(gh label list),WebFetch,Fetch,LS,mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__add_issue_comment,mcp__github__search_issues,mcp__github__list_issues"
69
+ install_github_mcp: "true"
70
+ install_artl_mcp: "true"
71
+ timeout_minutes: ${{ inputs.timeout_minutes }}
72
+ anthropic_api_key: ${{ inputs.anthropic_api_key }}
73
+ cborg_api_key: ${{ inputs.cborg_api_key }}
74
+ github_token: ${{ inputs.github_token }}