pyobo 0.11.2__tar.gz → 0.12.0__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 (275) hide show
  1. {pyobo-0.11.2/src/pyobo.egg-info → pyobo-0.12.0}/PKG-INFO +228 -229
  2. {pyobo-0.11.2 → pyobo-0.12.0}/README.md +182 -176
  3. {pyobo-0.11.2 → pyobo-0.12.0}/pyproject.toml +39 -49
  4. pyobo-0.12.0/src/pyobo/.DS_Store +0 -0
  5. pyobo-0.12.0/src/pyobo/__init__.py +143 -0
  6. pyobo-0.12.0/src/pyobo/api/__init__.py +126 -0
  7. pyobo-0.12.0/src/pyobo/api/alts.py +102 -0
  8. pyobo-0.12.0/src/pyobo/api/combine.py +39 -0
  9. pyobo-0.12.0/src/pyobo/api/edges.py +68 -0
  10. pyobo-0.12.0/src/pyobo/api/hierarchy.py +319 -0
  11. pyobo-0.12.0/src/pyobo/api/metadata.py +35 -0
  12. pyobo-0.12.0/src/pyobo/api/names.py +335 -0
  13. pyobo-0.12.0/src/pyobo/api/properties.py +210 -0
  14. pyobo-0.12.0/src/pyobo/api/relations.py +181 -0
  15. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/api/species.py +24 -21
  16. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/api/typedefs.py +11 -11
  17. pyobo-0.12.0/src/pyobo/api/utils.py +157 -0
  18. pyobo-0.12.0/src/pyobo/api/xrefs.py +181 -0
  19. pyobo-0.12.0/src/pyobo/cli/cli.py +105 -0
  20. pyobo-0.12.0/src/pyobo/cli/database.py +360 -0
  21. pyobo-0.11.2/src/pyobo/xrefdb/xrefs_pipeline.py → pyobo-0.12.0/src/pyobo/cli/database_utils.py +54 -73
  22. pyobo-0.12.0/src/pyobo/cli/lookup.py +302 -0
  23. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/cli/utils.py +19 -6
  24. pyobo-0.12.0/src/pyobo/constants.py +198 -0
  25. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/getters.py +196 -118
  26. pyobo-0.12.0/src/pyobo/gilda_utils.py +151 -0
  27. pyobo-0.12.0/src/pyobo/identifier_utils/__init__.py +41 -0
  28. pyobo-0.12.0/src/pyobo/identifier_utils/api.py +296 -0
  29. pyobo-0.12.0/src/pyobo/identifier_utils/model.py +130 -0
  30. pyobo-0.12.0/src/pyobo/identifier_utils/preprocessing.json +812 -0
  31. pyobo-0.12.0/src/pyobo/identifier_utils/preprocessing.py +61 -0
  32. pyobo-0.12.0/src/pyobo/identifier_utils/relations/__init__.py +8 -0
  33. pyobo-0.12.0/src/pyobo/identifier_utils/relations/api.py +162 -0
  34. pyobo-0.12.0/src/pyobo/identifier_utils/relations/data.json +5824 -0
  35. pyobo-0.12.0/src/pyobo/identifier_utils/relations/data_owl.json +57 -0
  36. pyobo-0.12.0/src/pyobo/identifier_utils/relations/data_rdf.json +1 -0
  37. pyobo-0.12.0/src/pyobo/identifier_utils/relations/data_rdfs.json +7 -0
  38. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/mocks.py +9 -6
  39. pyobo-0.12.0/src/pyobo/ner/__init__.py +9 -0
  40. pyobo-0.12.0/src/pyobo/ner/api.py +72 -0
  41. pyobo-0.12.0/src/pyobo/ner/normalizer.py +33 -0
  42. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/obographs.py +43 -39
  43. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/plugins.py +5 -4
  44. pyobo-0.12.0/src/pyobo/reader.py +1583 -0
  45. pyobo-0.12.0/src/pyobo/reader_utils.py +155 -0
  46. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resource_utils.py +42 -22
  47. pyobo-0.12.0/src/pyobo/resources/goc.py +75 -0
  48. pyobo-0.12.0/src/pyobo/resources/goc.tsv +188 -0
  49. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/ncbitaxon.py +4 -5
  50. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/ro.py +3 -2
  51. pyobo-0.12.0/src/pyobo/sources/README.md +19 -0
  52. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/__init__.py +52 -29
  53. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/antibodyregistry.py +11 -12
  54. pyobo-0.12.0/src/pyobo/sources/bigg/__init__.py +13 -0
  55. pyobo-0.12.0/src/pyobo/sources/bigg/bigg_compartment.py +81 -0
  56. pyobo-0.12.0/src/pyobo/sources/bigg/bigg_metabolite.py +229 -0
  57. pyobo-0.12.0/src/pyobo/sources/bigg/bigg_model.py +46 -0
  58. pyobo-0.12.0/src/pyobo/sources/bigg/bigg_reaction.py +77 -0
  59. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/biogrid.py +1 -2
  60. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/ccle.py +7 -12
  61. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/cgnc.py +0 -5
  62. pyobo-0.12.0/src/pyobo/sources/chembl/__init__.py +9 -0
  63. pyobo-0.11.2/src/pyobo/sources/chembl.py → pyobo-0.12.0/src/pyobo/sources/chembl/chembl_compound.py +13 -25
  64. pyobo-0.12.0/src/pyobo/sources/chembl/chembl_target.py +160 -0
  65. pyobo-0.12.0/src/pyobo/sources/civic_gene.py +94 -0
  66. pyobo-0.12.0/src/pyobo/sources/clinicaltrials.py +160 -0
  67. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/complexportal.py +24 -24
  68. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/conso.py +14 -22
  69. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/credit.py +1 -9
  70. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/cvx.py +27 -5
  71. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/depmap.py +9 -12
  72. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/dictybase_gene.py +2 -7
  73. pyobo-0.12.0/src/pyobo/sources/drugbank/__init__.py +9 -0
  74. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/drugbank}/drugbank.py +11 -16
  75. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/drugbank}/drugbank_salt.py +3 -8
  76. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/drugcentral.py +17 -13
  77. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/expasy.py +31 -34
  78. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/famplex.py +13 -18
  79. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/flybase.py +3 -8
  80. pyobo-0.12.0/src/pyobo/sources/gard.py +62 -0
  81. pyobo-0.12.0/src/pyobo/sources/geonames/__init__.py +9 -0
  82. pyobo-0.12.0/src/pyobo/sources/geonames/features.py +28 -0
  83. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/geonames}/geonames.py +87 -26
  84. pyobo-0.12.0/src/pyobo/sources/geonames/utils.py +115 -0
  85. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/gmt_utils.py +6 -7
  86. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/go.py +20 -13
  87. pyobo-0.12.0/src/pyobo/sources/gtdb.py +154 -0
  88. pyobo-0.12.0/src/pyobo/sources/gwascentral/__init__.py +9 -0
  89. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/gwascentral}/gwascentral_phenotype.py +5 -7
  90. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/gwascentral}/gwascentral_study.py +1 -7
  91. pyobo-0.12.0/src/pyobo/sources/hgnc/__init__.py +9 -0
  92. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/hgnc}/hgnc.py +56 -70
  93. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/hgnc}/hgncgenefamily.py +8 -18
  94. pyobo-0.12.0/src/pyobo/sources/icd/__init__.py +9 -0
  95. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/icd}/icd10.py +35 -37
  96. pyobo-0.12.0/src/pyobo/sources/icd/icd11.py +148 -0
  97. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/icd}/icd_utils.py +66 -20
  98. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/interpro.py +4 -9
  99. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/itis.py +0 -5
  100. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/kegg/api.py +16 -38
  101. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/kegg/genes.py +9 -20
  102. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/kegg/genome.py +1 -7
  103. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/kegg/pathway.py +9 -21
  104. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/mesh.py +58 -24
  105. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/mgi.py +3 -10
  106. pyobo-0.12.0/src/pyobo/sources/mirbase/__init__.py +11 -0
  107. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/mirbase}/mirbase.py +8 -11
  108. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/mirbase}/mirbase_family.py +4 -8
  109. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/mirbase}/mirbase_mature.py +3 -7
  110. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/msigdb.py +74 -39
  111. pyobo-0.12.0/src/pyobo/sources/ncbi/__init__.py +9 -0
  112. pyobo-0.12.0/src/pyobo/sources/ncbi/ncbi_gc.py +162 -0
  113. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/ncbi}/ncbigene.py +18 -19
  114. pyobo-0.12.0/src/pyobo/sources/nih_reporter.py +60 -0
  115. pyobo-0.12.0/src/pyobo/sources/nlm/__init__.py +9 -0
  116. pyobo-0.12.0/src/pyobo/sources/nlm/nlm_catalog.py +48 -0
  117. pyobo-0.12.0/src/pyobo/sources/nlm/nlm_publisher.py +36 -0
  118. pyobo-0.12.0/src/pyobo/sources/nlm/utils.py +116 -0
  119. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/npass.py +6 -8
  120. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/omim_ps.py +10 -3
  121. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/pathbank.py +4 -8
  122. pyobo-0.12.0/src/pyobo/sources/pfam/__init__.py +9 -0
  123. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/pfam}/pfam.py +3 -8
  124. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/pfam}/pfam_clan.py +2 -7
  125. pyobo-0.12.0/src/pyobo/sources/pharmgkb/__init__.py +15 -0
  126. pyobo-0.12.0/src/pyobo/sources/pharmgkb/pharmgkb_chemical.py +89 -0
  127. pyobo-0.12.0/src/pyobo/sources/pharmgkb/pharmgkb_disease.py +77 -0
  128. pyobo-0.12.0/src/pyobo/sources/pharmgkb/pharmgkb_gene.py +108 -0
  129. pyobo-0.12.0/src/pyobo/sources/pharmgkb/pharmgkb_pathway.py +63 -0
  130. pyobo-0.12.0/src/pyobo/sources/pharmgkb/pharmgkb_variant.py +84 -0
  131. pyobo-0.12.0/src/pyobo/sources/pharmgkb/utils.py +86 -0
  132. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/pid.py +1 -6
  133. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/pombase.py +6 -10
  134. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/pubchem.py +4 -9
  135. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/reactome.py +5 -11
  136. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/rgd.py +11 -16
  137. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/rhea.py +37 -36
  138. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/ror.py +69 -42
  139. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/selventa/schem.py +4 -7
  140. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/selventa/scomp.py +1 -6
  141. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/selventa/sdis.py +4 -7
  142. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/selventa/sfam.py +1 -6
  143. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/sgd.py +6 -11
  144. pyobo-0.12.0/src/pyobo/sources/signor/__init__.py +7 -0
  145. pyobo-0.12.0/src/pyobo/sources/signor/download.py +41 -0
  146. pyobo-0.12.0/src/pyobo/sources/signor/signor_complexes.py +105 -0
  147. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/slm.py +12 -15
  148. pyobo-0.12.0/src/pyobo/sources/umls/__init__.py +9 -0
  149. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/umls/get_synonym_types.py +20 -4
  150. pyobo-0.12.0/src/pyobo/sources/umls/sty.py +57 -0
  151. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/umls/synonym_types.tsv +1 -1
  152. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/umls/umls.py +18 -22
  153. pyobo-0.12.0/src/pyobo/sources/unimod.py +46 -0
  154. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/uniprot/uniprot.py +40 -32
  155. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/uniprot/uniprot_ptm.py +4 -34
  156. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/utils.py +3 -2
  157. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/wikipathways.py +7 -10
  158. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/zfin.py +5 -10
  159. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/ssg/__init__.py +12 -16
  160. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/ssg/index.html +26 -13
  161. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/ssg/term.html +12 -2
  162. pyobo-0.12.0/src/pyobo/struct/__init__.py +80 -0
  163. pyobo-0.12.0/src/pyobo/struct/functional/__init__.py +1 -0
  164. pyobo-0.12.0/src/pyobo/struct/functional/dsl.py +2572 -0
  165. pyobo-0.12.0/src/pyobo/struct/functional/macros.py +423 -0
  166. pyobo-0.12.0/src/pyobo/struct/functional/obo_to_functional.py +385 -0
  167. pyobo-0.12.0/src/pyobo/struct/functional/ontology.py +270 -0
  168. pyobo-0.12.0/src/pyobo/struct/functional/utils.py +112 -0
  169. pyobo-0.12.0/src/pyobo/struct/reference.py +373 -0
  170. pyobo-0.12.0/src/pyobo/struct/struct.py +2266 -0
  171. pyobo-0.12.0/src/pyobo/struct/struct_utils.py +1078 -0
  172. pyobo-0.12.0/src/pyobo/struct/typedef.py +331 -0
  173. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/struct/utils.py +12 -5
  174. pyobo-0.12.0/src/pyobo/struct/vocabulary.py +138 -0
  175. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/utils/cache.py +13 -11
  176. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/utils/io.py +17 -31
  177. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/utils/iter.py +5 -5
  178. pyobo-0.12.0/src/pyobo/utils/misc.py +76 -0
  179. pyobo-0.12.0/src/pyobo/utils/path.py +147 -0
  180. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/version.py +3 -3
  181. pyobo-0.11.2/MANIFEST.in +0 -11
  182. pyobo-0.11.2/PKG-INFO +0 -711
  183. pyobo-0.11.2/setup.cfg +0 -4
  184. pyobo-0.11.2/src/pyobo/__init__.py +0 -68
  185. pyobo-0.11.2/src/pyobo/api/__init__.py +0 -55
  186. pyobo-0.11.2/src/pyobo/api/alts.py +0 -92
  187. pyobo-0.11.2/src/pyobo/api/hierarchy.py +0 -291
  188. pyobo-0.11.2/src/pyobo/api/metadata.py +0 -40
  189. pyobo-0.11.2/src/pyobo/api/names.py +0 -255
  190. pyobo-0.11.2/src/pyobo/api/properties.py +0 -206
  191. pyobo-0.11.2/src/pyobo/api/relations.py +0 -207
  192. pyobo-0.11.2/src/pyobo/api/utils.py +0 -104
  193. pyobo-0.11.2/src/pyobo/api/xrefs.py +0 -187
  194. pyobo-0.11.2/src/pyobo/aws.py +0 -162
  195. pyobo-0.11.2/src/pyobo/cli/aws.py +0 -47
  196. pyobo-0.11.2/src/pyobo/cli/cli.py +0 -120
  197. pyobo-0.11.2/src/pyobo/cli/database.py +0 -338
  198. pyobo-0.11.2/src/pyobo/cli/lookup.py +0 -334
  199. pyobo-0.11.2/src/pyobo/constants.py +0 -99
  200. pyobo-0.11.2/src/pyobo/gilda_utils.py +0 -272
  201. pyobo-0.11.2/src/pyobo/identifier_utils.py +0 -142
  202. pyobo-0.11.2/src/pyobo/normalizer.py +0 -232
  203. pyobo-0.11.2/src/pyobo/reader.py +0 -620
  204. pyobo-0.11.2/src/pyobo/registries/__init__.py +0 -16
  205. pyobo-0.11.2/src/pyobo/registries/metaregistry.json +0 -507
  206. pyobo-0.11.2/src/pyobo/registries/metaregistry.py +0 -135
  207. pyobo-0.11.2/src/pyobo/sources/README.md +0 -15
  208. pyobo-0.11.2/src/pyobo/sources/civic_gene.py +0 -54
  209. pyobo-0.11.2/src/pyobo/sources/icd11.py +0 -105
  210. pyobo-0.11.2/src/pyobo/sources/umls/__init__.py +0 -3
  211. pyobo-0.11.2/src/pyobo/struct/__init__.py +0 -34
  212. pyobo-0.11.2/src/pyobo/struct/reference.py +0 -178
  213. pyobo-0.11.2/src/pyobo/struct/struct.py +0 -1496
  214. pyobo-0.11.2/src/pyobo/struct/typedef.py +0 -379
  215. pyobo-0.11.2/src/pyobo/utils/misc.py +0 -88
  216. pyobo-0.11.2/src/pyobo/utils/path.py +0 -141
  217. pyobo-0.11.2/src/pyobo/xrefdb/__init__.py +0 -1
  218. pyobo-0.11.2/src/pyobo/xrefdb/canonicalizer.py +0 -214
  219. pyobo-0.11.2/src/pyobo/xrefdb/priority.py +0 -59
  220. pyobo-0.11.2/src/pyobo/xrefdb/sources/__init__.py +0 -60
  221. pyobo-0.11.2/src/pyobo/xrefdb/sources/biomappings.py +0 -36
  222. pyobo-0.11.2/src/pyobo/xrefdb/sources/cbms2019.py +0 -91
  223. pyobo-0.11.2/src/pyobo/xrefdb/sources/chembl.py +0 -83
  224. pyobo-0.11.2/src/pyobo/xrefdb/sources/compath.py +0 -82
  225. pyobo-0.11.2/src/pyobo/xrefdb/sources/famplex.py +0 -64
  226. pyobo-0.11.2/src/pyobo/xrefdb/sources/gilda.py +0 -50
  227. pyobo-0.11.2/src/pyobo/xrefdb/sources/intact.py +0 -113
  228. pyobo-0.11.2/src/pyobo/xrefdb/sources/ncit.py +0 -133
  229. pyobo-0.11.2/src/pyobo/xrefdb/sources/pubchem.py +0 -27
  230. pyobo-0.11.2/src/pyobo/xrefdb/sources/wikidata.py +0 -116
  231. pyobo-0.11.2/src/pyobo.egg-info/SOURCES.txt +0 -181
  232. pyobo-0.11.2/src/pyobo.egg-info/dependency_links.txt +0 -1
  233. pyobo-0.11.2/src/pyobo.egg-info/entry_points.txt +0 -2
  234. pyobo-0.11.2/src/pyobo.egg-info/requires.txt +0 -36
  235. pyobo-0.11.2/src/pyobo.egg-info/top_level.txt +0 -1
  236. pyobo-0.11.2/tests/__init__.py +0 -1
  237. pyobo-0.11.2/tests/constants.py +0 -18
  238. pyobo-0.11.2/tests/resources/citations.txt +0 -201
  239. pyobo-0.11.2/tests/resources/test_chebi.obo +0 -436
  240. pyobo-0.11.2/tests/resources/test_msigdb.gmt +0 -3
  241. pyobo-0.11.2/tests/resources/test_wikipathways.gmt +0 -3
  242. pyobo-0.11.2/tests/test_alt_ids.py +0 -91
  243. pyobo-0.11.2/tests/test_caches.py +0 -86
  244. pyobo-0.11.2/tests/test_extract.py +0 -63
  245. pyobo-0.11.2/tests/test_get.py +0 -264
  246. pyobo-0.11.2/tests/test_gmt.py +0 -57
  247. pyobo-0.11.2/tests/test_ground.py +0 -38
  248. pyobo-0.11.2/tests/test_mapper.py +0 -63
  249. pyobo-0.11.2/tests/test_sources/__init__.py +0 -1
  250. pyobo-0.11.2/tests/test_sources/test_famplex.py +0 -14
  251. pyobo-0.11.2/tests/test_sources/test_meta.py +0 -38
  252. pyobo-0.11.2/tests/test_struct.py +0 -51
  253. pyobo-0.11.2/tests/test_utils.py +0 -75
  254. pyobo-0.11.2/tests/test_version_pins.py +0 -44
  255. {pyobo-0.11.2 → pyobo-0.12.0}/LICENSE +0 -0
  256. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/__main__.py +0 -0
  257. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/cli/__init__.py +0 -0
  258. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/py.typed +0 -0
  259. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/__init__.py +0 -0
  260. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
  261. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/ro.tsv +0 -0
  262. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/so.py +0 -0
  263. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/resources/so.tsv +0 -0
  264. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/agrovoc.py +0 -0
  265. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/chebi.py +1 -1
  266. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/cpt.py +0 -0
  267. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/kegg/__init__.py +0 -0
  268. {pyobo-0.11.2/src/pyobo/sources → pyobo-0.12.0/src/pyobo/sources/mirbase}/mirbase_constants.py +0 -0
  269. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/selventa/__init__.py +0 -0
  270. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/umls/__main__.py +0 -0
  271. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/sources/uniprot/__init__.py +1 -1
  272. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/ssg/base.html +0 -0
  273. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/ssg/typedef.html +0 -0
  274. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/utils/__init__.py +0 -0
  275. {pyobo-0.11.2 → pyobo-0.12.0}/src/pyobo/utils/ndex_utils.py +0 -0
@@ -1,36 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pyobo
3
- Version: 0.11.2
3
+ Version: 0.12.0
4
4
  Summary: A python package for handling and generating OBO
5
- Author-email: Charles Tapley Hoyt <cthoyt@gmail.com>
6
- Maintainer-email: Charles Tapley Hoyt <cthoyt@gmail.com>
7
- License: MIT License
8
-
9
- Copyright (c) 2024 Charles Tapley Hoyt
10
-
11
- Permission is hereby granted, free of charge, to any person obtaining a copy
12
- of this software and associated documentation files (the "Software"), to deal
13
- in the Software without restriction, including without limitation the rights
14
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
- copies of the Software, and to permit persons to whom the Software is
16
- furnished to do so, subject to the following conditions:
17
-
18
- The above copyright notice and this permission notice shall be included in all
19
- copies or substantial portions of the Software.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
- SOFTWARE.
28
-
29
- Project-URL: Bug Tracker, https://github.com/biopragmatics/pyobo/issues
30
- Project-URL: Homepage, https://github.com/biopragmatics/pyobo
31
- Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
32
- Project-URL: Documentation, https://pyobo.readthedocs.io
33
5
  Keywords: snekpack,cookiecutter,ontologies,biomedical ontologies,life sciences,natural sciences,bioinformatics,cheminformatics,Open Biomedical Ontologies,OBO
6
+ Author: Charles Tapley Hoyt
7
+ Author-email: Charles Tapley Hoyt <cthoyt@gmail.com>
8
+ License-File: LICENSE
34
9
  Classifier: Development Status :: 4 - Beta
35
10
  Classifier: Environment :: Console
36
11
  Classifier: Intended Audience :: Developers
@@ -39,16 +14,16 @@ Classifier: Operating System :: OS Independent
39
14
  Classifier: Framework :: Pytest
40
15
  Classifier: Framework :: tox
41
16
  Classifier: Framework :: Sphinx
17
+ Classifier: Natural Language :: English
42
18
  Classifier: Programming Language :: Python
43
- Classifier: Programming Language :: Python :: 3.9
44
19
  Classifier: Programming Language :: Python :: 3.10
45
20
  Classifier: Programming Language :: Python :: 3.11
46
21
  Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
47
23
  Classifier: Programming Language :: Python :: 3 :: Only
24
+ Classifier: Typing :: Typed
48
25
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
49
26
  Classifier: Topic :: Scientific/Engineering :: Chemistry
50
- Requires-Python: >=3.9
51
- Description-Content-Type: text/markdown
52
27
  Requires-Dist: obonet>=0.3.0
53
28
  Requires-Dist: click
54
29
  Requires-Dist: tqdm
@@ -56,33 +31,51 @@ Requires-Dist: pyyaml
56
31
  Requires-Dist: pandas
57
32
  Requires-Dist: requests
58
33
  Requires-Dist: protmapper
59
- Requires-Dist: more_itertools
60
- Requires-Dist: more_click>=0.0.2
34
+ Requires-Dist: more-itertools
35
+ Requires-Dist: more-click>=0.0.2
61
36
  Requires-Dist: humanize
62
37
  Requires-Dist: tabulate
63
38
  Requires-Dist: cachier
64
- Requires-Dist: pystow>=0.2.7
65
- Requires-Dist: bioversions>=0.5.535
66
- Requires-Dist: bioregistry>=0.11.23
67
- Requires-Dist: bioontologies>=0.4.0
68
- Requires-Dist: zenodo-client>=0.0.5
69
- Requires-Dist: class_resolver
39
+ Requires-Dist: pystow>=0.7.0
40
+ Requires-Dist: bioversions>=0.7.0
41
+ Requires-Dist: bioregistry>=0.12.7
42
+ Requires-Dist: bioontologies>=0.7.1
43
+ Requires-Dist: ssslm>=0.0.13
44
+ Requires-Dist: zenodo-client>=0.3.6
45
+ Requires-Dist: class-resolver>=0.6.0
70
46
  Requires-Dist: psycopg2-binary
71
47
  Requires-Dist: pydantic>=2.0
72
- Requires-Dist: requests-ftp
73
- Requires-Dist: drugbank_downloader
74
- Requires-Dist: chembl_downloader
75
- Requires-Dist: umls_downloader>=0.1.3
76
- Requires-Dist: typing_extensions
48
+ Requires-Dist: curies>=0.10.10
49
+ Requires-Dist: python-dateutil
50
+ Requires-Dist: networkx>=3.4
51
+ Requires-Dist: drugbank-downloader
52
+ Requires-Dist: chembl-downloader
53
+ Requires-Dist: umls-downloader>=0.1.3
54
+ Requires-Dist: clinicaltrials-downloader>=0.0.2
55
+ Requires-Dist: nih-reporter-downloader>=0.0.1
56
+ Requires-Dist: typing-extensions
77
57
  Requires-Dist: rdflib
78
- Provides-Extra: tests
79
- Requires-Dist: pytest; extra == "tests"
80
- Requires-Dist: coverage; extra == "tests"
58
+ Requires-Dist: sphinx>=8 ; extra == 'docs'
59
+ Requires-Dist: sphinx-rtd-theme>=3.0 ; extra == 'docs'
60
+ Requires-Dist: sphinx-click ; extra == 'docs'
61
+ Requires-Dist: sphinx-automodapi ; extra == 'docs'
62
+ Requires-Dist: ssslm[gilda] ; extra == 'gilda'
63
+ Requires-Dist: ssslm[gilda-slim] ; extra == 'gilda-slim'
64
+ Requires-Dist: pytest ; extra == 'tests'
65
+ Requires-Dist: coverage[toml] ; extra == 'tests'
66
+ Maintainer: Charles Tapley Hoyt
67
+ Maintainer-email: Charles Tapley Hoyt <cthoyt@gmail.com>
68
+ Requires-Python: >=3.10
69
+ Project-URL: Bug Tracker, https://github.com/biopragmatics/pyobo/issues
70
+ Project-URL: Documentation, https://pyobo.readthedocs.io
71
+ Project-URL: Funding, https://github.com/sponsors/cthoyt
72
+ Project-URL: Homepage, https://github.com/biopragmatics/pyobo
73
+ Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
81
74
  Provides-Extra: docs
82
- Requires-Dist: sphinx>=8; extra == "docs"
83
- Requires-Dist: sphinx-rtd-theme>=3.0; extra == "docs"
84
- Requires-Dist: sphinx-click; extra == "docs"
85
- Requires-Dist: sphinx_automodapi; extra == "docs"
75
+ Provides-Extra: gilda
76
+ Provides-Extra: gilda-slim
77
+ Provides-Extra: tests
78
+ Description-Content-Type: text/markdown
86
79
 
87
80
  <!--
88
81
  <p align="center">
@@ -117,25 +110,24 @@ Requires-Dist: sphinx_automodapi; extra == "docs"
117
110
  <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.3381961.svg" alt="DOI"></a>
118
111
  </p>
119
112
 
120
- Tools for biological identifiers, names, synonyms, xrefs, hierarchies, relations, and properties through the
121
- perspective of OBO.
113
+ Tools for biological identifiers, names, synonyms, xrefs, hierarchies,
114
+ relations, and properties through the perspective of OBO.
122
115
 
123
116
  ## Example Usage
124
117
 
125
- Note! PyOBO is no-nonsense. This means that there's no repetitive
126
- prefixes in identifiers. It also means all identifiers are strings,
127
- no exceptions.
118
+ Note! PyOBO is no-nonsense. This means that there's no repetitive prefixes in
119
+ identifiers. It also means all identifiers are strings, no exceptions.
128
120
 
129
- Note! The first time you run these, they have to download and cache
130
- all resources. We're not in the business of redistributing data,
131
- so all scripts should be completely reproducible. There's some
132
- AWS tools for hosting/downloading pre-compiled versions in
133
- `pyobo.aws` if you don't have time for that.
121
+ Note! The first time you run these, they have to download and cache all
122
+ resources. We're not in the business of redistributing data, so all scripts
123
+ should be completely reproducible. There's some AWS tools for
124
+ hosting/downloading pre-compiled versions in `pyobo.aws` if you don't have time
125
+ for that.
134
126
 
135
- Note! PyOBO can perform grounding in a limited number of cases, but
136
- it is *not* a general solution for named entity recognition (NER) or grounding.
137
- It's suggested to check `Gilda <https://github.com/indralab/gilda>`_
138
- for a no-nonsense solution.
127
+ Note! PyOBO can perform grounding in a limited number of cases, but it is _not_
128
+ a general solution for named entity recognition (NER) or grounding. It's
129
+ suggested to check `Gilda <https://github.com/indralab/gilda>`\_ for a
130
+ no-nonsense solution.
139
131
 
140
132
  ### Mapping Identifiers and CURIEs
141
133
 
@@ -185,6 +177,7 @@ one using alternative identifiers listed in the underlying OBO with:
185
177
 
186
178
  ```python
187
179
  import pyobo
180
+ from pyobo import Reference
188
181
 
189
182
  # Look up DNA-binding transcription factor activity (go:0003700)
190
183
  # based on an old id
@@ -192,13 +185,13 @@ primary_curie = pyobo.get_primary_curie('go:0001071')
192
185
  assert primary_curie == 'go:0003700'
193
186
 
194
187
  # If it's already the primary, it just gets returned
195
- assert 'go:0003700' == pyobo.get_priority_curie('go:0003700')
188
+ assert Reference.from_curie('go:0003700') == pyobo.get_primary_curie('go:0003700')
196
189
  ```
197
190
 
198
191
  ### Mapping Species
199
192
 
200
- Some resources have species information for their term. Get a mapping of WikiPathway identifiers
201
- to species (as NCBI taxonomy identifiers):
193
+ Some resources have species information for their term. Get a mapping of
194
+ WikiPathway identifiers to species (as NCBI taxonomy identifiers):
202
195
 
203
196
  ```python
204
197
  import pyobo
@@ -229,30 +222,28 @@ it up and its preferred label.
229
222
  ```python
230
223
  import pyobo
231
224
 
232
- prefix, identifier, name = pyobo.ground('chebi', 'Fusilade II')
233
- assert prefix == 'chebi'
234
- assert identifier == '132964'
235
- assert name == 'fluazifop-P-butyl'
225
+ reference = pyobo.ground('chebi', 'Fusilade II')
226
+ assert reference.prefix == 'chebi'
227
+ assert reference.identifier == '132964'
228
+ assert reference.name == 'fluazifop-P-butyl'
236
229
 
237
230
  # When failure happens...
238
- prefix, identifier, name = pyobo.ground('chebi', 'Definitely not a real name')
239
- assert prefix is None
240
- assert identifier is None
241
- assert name is None
231
+ reference = pyobo.ground('chebi', 'Definitely not a real name')
232
+ assert reference is None
242
233
  ```
243
234
 
244
- If you're not really sure which namespace a name might belong to, you
245
- can try a few in a row (prioritize by ones that cover the appropriate
246
- entity type to avoid false positives in case of conflicts):
235
+ If you're not really sure which namespace a name might belong to, you can try a
236
+ few in a row (prioritize by ones that cover the appropriate entity type to avoid
237
+ false positives in case of conflicts):
247
238
 
248
239
  ```python
249
240
  import pyobo
250
241
 
251
242
  # looking for phenotypes/pathways
252
- prefix, identifier, name = pyobo.ground(['efo', 'go'], 'ERAD')
253
- assert prefix == 'go'
254
- assert identifier == '0030433'
255
- assert name == 'ubiquitin-dependent ERAD pathway'
243
+ reference = pyobo.ground(['efo', 'go'], 'ERAD')
244
+ assert reference.prefix == 'go'
245
+ assert reference.identifier == '0030433'
246
+ assert reference.name == 'ubiquitin-dependent ERAD pathway'
256
247
  ```
257
248
 
258
249
  ### Cross-referencing
@@ -277,8 +268,8 @@ pubchem_compound_id = pyobo.get_xref('chebi', '132964', 'pubchem.compound')
277
268
  assert pubchem_compound_id == '3033674'
278
269
  ```
279
270
 
280
- Get xrefs from Entrez to HGNC, but they're only available through HGNC,
281
- so you need to flip them:
271
+ Get xrefs from Entrez to HGNC, but they're only available through HGNC, so you
272
+ need to flip them:
282
273
 
283
274
  ```python
284
275
  import pyobo
@@ -292,8 +283,8 @@ mapt_hgnc = ncbigene_id_to_hgnc_id['4137']
292
283
  assert mapt_hgnc == '6893'
293
284
  ```
294
285
 
295
- Since this is a common pattern, there's a keyword argument `flip`
296
- that does this for you:
286
+ Since this is a common pattern, there's a keyword argument `flip` that does this
287
+ for you:
297
288
 
298
289
  ```python
299
290
  import pyobo
@@ -313,45 +304,10 @@ hgnc_id = pyobo.get_xref('hgnc', '4137', 'ncbigene', flip=True)
313
304
  assert hgnc_id == '6893'
314
305
  ```
315
306
 
316
- Remap a CURIE based on pre-defined priority list and [Inspector Javert's Xref
317
- Database](https://cthoyt.com/2020/04/19/inspector-javerts-xref-database.html):
318
-
319
- ```python
320
-
321
- import pyobo
322
-
323
- # Map to the best source possible
324
- mapt_ncbigene = pyobo.get_priority_curie('hgnc:6893')
325
- assert mapt_ncbigene == 'ncbigene:4137'
326
-
327
- # Sometimes you know you're the best. Own it.
328
- assert 'ncbigene:4137' == pyobo.get_priority_curie('ncbigene:4137')
329
- ```
330
-
331
- Find all CURIEs mapped to a given one using Inspector Javert's Xref Database:
332
-
333
- ```python
334
- import pyobo
335
-
336
- # Get a set of all CURIEs mapped to MAPT
337
- mapt_curies = pyobo.get_equivalent('hgnc:6893')
338
- assert 'ncbigene:4137' in mapt_curies
339
- assert 'ensembl:ENSG00000186868' in mapt_curies
340
- ```
341
-
342
- If you don't want to wait to build the database locally for the `pyobo.get_priority_curie` and
343
- `pyobo.get_equivalent`, you can use the following code to download a release from
344
- [Zenodo](https://zenodo.org/record/3757266):
345
-
346
- ```python
347
- import pyobo.resource_utils
348
-
349
- pyobo.resource_utils.ensure_inspector_javert()
350
- ```
351
-
352
307
  ### Properties
353
308
 
354
- Get properties, like SMILES. The semantics of these are defined on an OBO-OBO basis.
309
+ Get properties, like SMILES. The semantics of these are defined on an OBO-OBO
310
+ basis.
355
311
 
356
312
  ```python
357
313
  import pyobo
@@ -378,47 +334,50 @@ assert smiles == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
378
334
  Check if an entity is in the hierarchy:
379
335
 
380
336
  ```python
381
- import networkx as nx
382
337
  import pyobo
338
+ from pyobo import Reference
383
339
 
384
340
  # check that go:0008219 ! cell death is an ancestor of go:0006915 ! apoptotic process
385
- assert 'go:0008219' in pyobo.get_ancestors('go', '0006915')
341
+ assert Reference.from_curie('go:0008219') in pyobo.get_ancestors('go', '0006915')
386
342
 
387
343
  # check that go:0070246 ! natural killer cell apoptotic process is a
388
344
  # descendant of go:0006915 ! apoptotic process
389
345
  apopototic_process_descendants = pyobo.get_descendants('go', '0006915')
390
- assert 'go:0070246' in apopototic_process_descendants
346
+ assert Reference.from_curie('go:0070246') in apopototic_process_descendants
391
347
  ```
392
348
 
393
349
  Get the sub-hierarchy below a given node:
394
350
 
395
351
  ```python
396
352
  import pyobo
353
+ from pyobo import Reference
397
354
 
398
355
  # get the descendant graph of go:0006915 ! apoptotic process
399
356
  apopototic_process_subhierarchy = pyobo.get_subhierarchy('go', '0006915')
400
357
 
401
358
  # check that go:0070246 ! natural killer cell apoptotic process is a
402
359
  # descendant of go:0006915 ! apoptotic process through the subhierarchy
403
- assert 'go:0070246' in apopototic_process_subhierarchy
360
+ assert Reference.from_curie('go:0070246') in apopototic_process_subhierarchy
404
361
  ```
405
362
 
406
363
  Get a hierarchy with properties preloaded in the node data dictionaries:
407
364
 
408
365
  ```python
409
366
  import pyobo
367
+ from pyobo import Reference
410
368
 
411
369
  prop = 'http://purl.obolibrary.org/obo/chebi/smiles'
412
370
  chebi_hierarchy = pyobo.get_hierarchy('chebi', properties=[prop])
413
371
 
414
- assert 'chebi:132964' in chebi_hierarchy
372
+ assert Reference.from_curie('chebi:132964') in chebi_hierarchy
415
373
  assert prop in chebi_hierarchy.nodes['chebi:132964']
416
374
  assert chebi_hierarchy.nodes['chebi:132964'][prop] == 'C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F'
417
375
  ```
418
376
 
419
377
  ### Relations
420
378
 
421
- Get all orthologies (`ro:HOM0000017`) between HGNC and MGI (note: this is one way)
379
+ Get all orthologies (`ro:HOM0000017`) between HGNC and MGI (note: this is one
380
+ way)
422
381
 
423
382
  ```python
424
383
  >>> import pyobo
@@ -440,11 +399,10 @@ If you want to do it in one line, use:
440
399
 
441
400
  ### Writings Tests that Use PyOBO
442
401
 
443
- If you're writing your own code that relies on PyOBO, and unit
444
- testing it (as you should) in a continuous integration setting,
445
- you've probably realized that loading all of the resources on each
446
- build is not so fast. In those scenarios, you can use some of the
447
- pre-build patches like in the following:
402
+ If you're writing your own code that relies on PyOBO, and unit testing it (as
403
+ you should) in a continuous integration setting, you've probably realized that
404
+ loading all the resources on each build is not so fast. In those scenarios, you
405
+ can use some of the pre-build patches like in the following:
448
406
 
449
407
  ```python
450
408
  import unittest
@@ -464,57 +422,75 @@ class MyTestCase(unittest.TestCase):
464
422
  pyobo.get_name('chebi', '1234')
465
423
  ```
466
424
 
467
-
468
425
  ## Curation of the Bioregistry
469
426
 
470
427
  In order to normalize references and identify resources, PyOBO uses the
471
- [Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part of PyOBO, but has since
472
- been externalized for more general reuse.
428
+ [Bioregistry](https://github.com/bioregistry/bioregistry). It used to be a part
429
+ of PyOBO, but has since been externalized for more general reuse.
473
430
 
474
- At [src/pyobo/registries/metaregistry.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/registries/metaregistry.json)
475
- is the curated "metaregistry". This is a source of information that contains
476
- all sorts of fixes for missing/wrong information in MIRIAM, OLS, and OBO Foundry; entries that don't appear in
477
- any of them; additional synonym information for each namespace/prefix; rules for normalizing xrefs and CURIEs, etc.
431
+ At
432
+ [src/pyobo/registries/metaregistry.json](https://github.com/pyobo/pyobo/blob/master/src/pyobo/registries/metaregistry.json)
433
+ is the curated "metaregistry". This is a source of information that contains all
434
+ sorts of fixes for missing/wrong information in MIRIAM, OLS, and OBO Foundry;
435
+ entries that don't appear in any of them; additional synonym information for
436
+ each namespace/prefix; rules for normalizing xrefs and CURIEs, etc.
478
437
 
479
438
  Other entries in the metaregistry:
480
439
 
481
- - The `"remappings"->"full"` entry is a dictionary from strings that might follow `xref:`
482
- in a given OBO file that need to be completely replaced, due to incorrect formatting
483
- - The `"remappings"->"prefix"` entry contains a dictionary of prefixes for xrefs that need
484
- to be remapped. Several rules, for example, remove superfluous spaces that occur inside
485
- CURIEs or and others address instances of the GOGO issue.
486
- - The `"blacklists"` entry contains rules for throwing out malformed xrefs based on
487
- full string, just prefix, or just suffix.
440
+ - The `"remappings"->"full"` entry is a dictionary from strings that might
441
+ follow `xref:` in a given OBO file that need to be completely replaced, due to
442
+ incorrect formatting
443
+ - The `"remappings"->"prefix"` entry contains a dictionary of prefixes for xrefs
444
+ that need to be remapped. Several rules, for example, remove superfluous
445
+ spaces that occur inside CURIEs or and others address instances of the GOGO
446
+ issue.
447
+ - The `"blacklists"` entry contains rules for throwing out malformed xrefs based
448
+ on full string, just prefix, or just suffix.
488
449
 
489
450
  ## Troubleshooting
490
451
 
491
- The OBO Foundry seems to be pretty unstable with respect to the URLs to OBO resources. If you get an error like:
452
+ The OBO Foundry seems to be pretty unstable with respect to the URLs to OBO
453
+ resources. If you get an error like:
492
454
 
493
455
  ```
494
456
  pyobo.getters.MissingOboBuild: OBO Foundry is missing a build for: mondo
495
457
  ```
496
458
 
497
- Then you should check the corresponding page on the OBO Foundry (in this case, http://www.obofoundry.org/ontology/mondo.html)
498
- and make update to the `url` entry for that namespace in the Bioregistry.
459
+ Then you should check the corresponding page on the OBO Foundry (in this case,
460
+ http://www.obofoundry.org/ontology/mondo.html) and make update to the `url`
461
+ entry for that namespace in the Bioregistry.
499
462
 
500
463
  ## 🚀 Installation
501
464
 
502
465
  The most recent release can be installed from
503
- [PyPI](https://pypi.org/project/pyobo/) with:
466
+ [PyPI](https://pypi.org/project/pyobo/) with uv:
504
467
 
505
468
  ```console
506
- python3 -m pip install pyobo
469
+ $ uv pip install pyobo
507
470
  ```
508
471
 
509
- The most recent code and data can be installed directly from GitHub with:
472
+ or with pip:
510
473
 
511
474
  ```console
512
- python3 -m pip install git+https://github.com/biopragmatics/pyobo.git
475
+ $ python3 -m pip install pyobo
476
+ ```
477
+
478
+ The most recent code and data can be installed directly from GitHub with uv:
479
+
480
+ ```console
481
+ $ uv pip install git+https://github.com/biopragmatics/pyobo.git
482
+ ```
483
+
484
+ or with pip:
485
+
486
+ ```console
487
+ $ python3 -m pip install git+https://github.com/biopragmatics/pyobo.git
513
488
  ```
514
489
 
515
490
  ## 👐 Contributing
516
491
 
517
- Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See
492
+ Contributions, whether filing an issue, making a pull request, or forking, are
493
+ appreciated. See
518
494
  [CONTRIBUTING.md](https://github.com/biopragmatics/pyobo/blob/master/.github/CONTRIBUTING.md)
519
495
  for more information on getting involved.
520
496
 
@@ -551,49 +527,59 @@ This project has been supported by the following grants:
551
527
 
552
528
  ### 🍪 Cookiecutter
553
529
 
554
- This package was created with [@audreyfeldroy](https://github.com/audreyfeldroy)'s
555
- [cookiecutter](https://github.com/cookiecutter/cookiecutter) package using [@cthoyt](https://github.com/cthoyt)'s
556
- [cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack) template.
530
+ This package was created with
531
+ [@audreyfeldroy](https://github.com/audreyfeldroy)'s
532
+ [cookiecutter](https://github.com/cookiecutter/cookiecutter) package using
533
+ [@cthoyt](https://github.com/cthoyt)'s
534
+ [cookiecutter-snekpack](https://github.com/cthoyt/cookiecutter-snekpack)
535
+ template.
557
536
 
558
537
  ## 🛠️ For Developers
559
538
 
560
539
  <details>
561
540
  <summary>See developer instructions</summary>
562
541
 
563
- The final section of the README is for if you want to get involved by making a code contribution.
542
+ The final section of the README is for if you want to get involved by making a
543
+ code contribution.
564
544
 
565
545
  ### Development Installation
566
546
 
567
547
  To install in development mode, use the following:
568
548
 
569
549
  ```console
570
- git clone git+https://github.com/biopragmatics/pyobo.git
571
- cd pyobo
572
- python3 -m pip install -e .
550
+ $ git clone git+https://github.com/biopragmatics/pyobo.git
551
+ $ cd pyobo
552
+ $ uv pip install -e .
553
+ ```
554
+
555
+ Alternatively, install using pip:
556
+
557
+ ```console
558
+ $ python3 -m pip install -e .
573
559
  ```
574
560
 
575
561
  ### Updating Package Boilerplate
576
562
 
577
- This project uses `cruft` to keep boilerplate (i.e., configuration, contribution guidelines, documentation
578
- configuration)
579
- up-to-date with the upstream cookiecutter package. Update with the following:
563
+ This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
564
+ guidelines, documentation configuration) up-to-date with the upstream
565
+ cookiecutter package. Install cruft with either `uv tool install cruft` or
566
+ `python3 -m pip install cruft` then run:
580
567
 
581
568
  ```console
582
- python3 -m pip install cruft
583
- cruft update
569
+ $ cruft update
584
570
  ```
585
571
 
586
- More info on Cruft's update command is
587
- available [here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
572
+ More info on Cruft's update command is available
573
+ [here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
588
574
 
589
575
  ### 🥼 Testing
590
576
 
591
577
  After cloning the repository and installing `tox` with
592
- `python3 -m pip install tox tox-uv`,
593
- the unit tests in the `tests/` folder can be run reproducibly with:
578
+ `uv tool install tox --with tox-uv` or `python3 -m pip install tox tox-uv`, the
579
+ unit tests in the `tests/` folder can be run reproducibly with:
594
580
 
595
581
  ```console
596
- tox -e py
582
+ $ tox -e py
597
583
  ```
598
584
 
599
585
  Additionally, these tests are automatically re-run with each commit in a
@@ -604,67 +590,77 @@ Additionally, these tests are automatically re-run with each commit in a
604
590
  The documentation can be built locally using the following:
605
591
 
606
592
  ```console
607
- git clone git+https://github.com/biopragmatics/pyobo.git
608
- cd pyobo
609
- tox -e docs
610
- open docs/build/html/index.html
593
+ $ git clone git+https://github.com/biopragmatics/pyobo.git
594
+ $ cd pyobo
595
+ $ tox -e docs
596
+ $ open docs/build/html/index.html
611
597
  ```
612
598
 
613
- The documentation automatically installs the package as well as the `docs`
614
- extra specified in the [`pyproject.toml`](../../Desktop/pyobo/pyproject.toml). `sphinx` plugins
615
- like `texext` can be added there. Additionally, they need to be added to the
616
- `extensions` list in [`docs/source/conf.py`](../../Desktop/pyobo/docs/source/conf.py).
599
+ The documentation automatically installs the package as well as the `docs` extra
600
+ specified in the [`pyproject.toml`](pyproject.toml). `sphinx` plugins like
601
+ `texext` can be added there. Additionally, they need to be added to the
602
+ `extensions` list in [`docs/source/conf.py`](docs/source/conf.py).
617
603
 
618
604
  The documentation can be deployed to [ReadTheDocs](https://readthedocs.io) using
619
- [this guide](https://docs.readthedocs.io/en/stable/intro/import-guide.html).
620
- The [`.readthedocs.yml`](../../Desktop/pyobo/.readthedocs.yml) YAML file contains all the configuration you'll need.
621
- You can also set up continuous integration on GitHub to check not only that
622
- Sphinx can build the documentation in an isolated environment (i.e., with `tox -e docs-test`)
623
- but also that [ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).
605
+ [this guide](https://docs.readthedocs.io/en/stable/intro/import-guide.html). The
606
+ [`.readthedocs.yml`](.readthedocs.yml) YAML file contains all the configuration
607
+ you'll need. You can also set up continuous integration on GitHub to check not
608
+ only that Sphinx can build the documentation in an isolated environment (i.e.,
609
+ with `tox -e docs-test`) but also that
610
+ [ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).
624
611
 
625
612
  #### Configuring ReadTheDocs
626
613
 
627
- 1. Log in to ReadTheDocs with your GitHub account to install the integration
628
- at https://readthedocs.org/accounts/login/?next=/dashboard/
629
- 2. Import your project by navigating to https://readthedocs.org/dashboard/import then clicking the plus icon next to
630
- your repository
631
- 3. You can rename the repository on the next screen using a more stylized name (i.e., with spaces and capital letters)
614
+ 1. Log in to ReadTheDocs with your GitHub account to install the integration at
615
+ https://readthedocs.org/accounts/login/?next=/dashboard/
616
+ 2. Import your project by navigating to https://readthedocs.org/dashboard/import
617
+ then clicking the plus icon next to your repository
618
+ 3. You can rename the repository on the next screen using a more stylized name
619
+ (i.e., with spaces and capital letters)
632
620
  4. Click next, and you're good to go!
633
621
 
634
622
  ### 📦 Making a Release
635
623
 
636
624
  #### Configuring Zenodo
637
625
 
638
- [Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI to each release of your package.
626
+ [Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI
627
+ to each release of your package.
639
628
 
640
- 1. Log in to Zenodo via GitHub with this link: https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a
641
- page that lists all of your organizations and asks you to approve installing the Zenodo app on GitHub. Click "grant"
642
- next to any organizations you want to enable the integration for, then click the big green "approve" button. This
629
+ 1. Log in to Zenodo via GitHub with this link:
630
+ https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a page
631
+ that lists all of your organizations and asks you to approve installing the
632
+ Zenodo app on GitHub. Click "grant" next to any organizations you want to
633
+ enable the integration for, then click the big green "approve" button. This
643
634
  step only needs to be done once.
644
- 2. Navigate to https://zenodo.org/account/settings/github/, which lists all of your GitHub repositories (both in your
645
- username and any organizations you enabled). Click the on/off toggle for any relevant repositories. When you make
646
- a new repository, you'll have to come back to this
635
+ 2. Navigate to https://zenodo.org/account/settings/github/, which lists all of
636
+ your GitHub repositories (both in your username and any organizations you
637
+ enabled). Click the on/off toggle for any relevant repositories. When you
638
+ make a new repository, you'll have to come back to this
647
639
 
648
- After these steps, you're ready to go! After you make "release" on GitHub (steps for this are below), you can navigate
649
- to https://zenodo.org/account/settings/github/repository/biopragmatics/pyobo
650
- to see the DOI for the release and link to the Zenodo record for it.
640
+ After these steps, you're ready to go! After you make "release" on GitHub (steps
641
+ for this are below), you can navigate to
642
+ https://zenodo.org/account/settings/github/repository/biopragmatics/pyobo to see
643
+ the DOI for the release and link to the Zenodo record for it.
651
644
 
652
645
  #### Registering with the Python Package Index (PyPI)
653
646
 
654
647
  You only have to do the following steps once.
655
648
 
656
- 1. Register for an account on the [Python Package Index (PyPI)](https://pypi.org/account/register)
657
- 2. Navigate to https://pypi.org/manage/account and make sure you have verified your email address. A verification email
658
- might not have been sent by default, so you might have to click the "options" dropdown next to your address to get to
659
- the "re-send verification email" button
660
- 3. 2-Factor authentication is required for PyPI since the end of 2023 (see
661
- this [blog post from PyPI](https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/)). This means
662
- you have to first issue account recovery codes, then set up 2-factor authentication
649
+ 1. Register for an account on the
650
+ [Python Package Index (PyPI)](https://pypi.org/account/register)
651
+ 2. Navigate to https://pypi.org/manage/account and make sure you have verified
652
+ your email address. A verification email might not have been sent by default,
653
+ so you might have to click the "options" dropdown next to your address to get
654
+ to the "re-send verification email" button
655
+ 3. 2-Factor authentication is required for PyPI since the end of 2023 (see this
656
+ [blog post from PyPI](https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/)).
657
+ This means you have to first issue account recovery codes, then set up
658
+ 2-factor authentication
663
659
  4. Issue an API token from https://pypi.org/manage/account/token
664
660
 
665
661
  #### Configuring your machine's connection to PyPI
666
662
 
667
- You have to do the following steps once per machine.
663
+ You have to do the following steps once per machine.
668
664
 
669
665
  ```console
670
666
  $ uv tool install keyring
@@ -676,34 +672,37 @@ Note that this deprecates previous workflows using `.pypirc`.
676
672
 
677
673
  #### Uploading to PyPI
678
674
 
679
- After installing the package in development mode and installing
680
- `tox` with `python3 -m pip install tox tox-uv`,
681
- run the following from the console:
675
+ After installing the package in development mode and installing `tox` with
676
+ `uv tool install tox --with tox-uv` or `python3 -m pip install tox tox-uv`, run
677
+ the following from the console:
682
678
 
683
679
  ```console
684
- tox -e finish
680
+ $ tox -e finish
685
681
  ```
686
682
 
687
683
  This script does the following:
688
684
 
689
- 1. Uses [bump-my-version](https://github.com/callowayproject/bump-my-version) to switch the version number in
690
- the `pyproject.toml`, `CITATION.cff`, `src/pyobo/version.py`,
691
- and [`docs/source/conf.py`](../../Desktop/pyobo/docs/source/conf.py) to not have the `-dev` suffix
685
+ 1. Uses [bump-my-version](https://github.com/callowayproject/bump-my-version) to
686
+ switch the version number in the `pyproject.toml`, `CITATION.cff`,
687
+ `src/pyobo/version.py`, and [`docs/source/conf.py`](docs/source/conf.py) to
688
+ not have the `-dev` suffix
692
689
  2. Packages the code in both a tar archive and a wheel using
693
690
  [`uv build`](https://docs.astral.sh/uv/guides/publish/#building-your-package)
694
- 3. Uploads to PyPI using [`uv publish`](https://docs.astral.sh/uv/guides/publish/#publishing-your-package).
695
- 4. Push to GitHub. You'll need to make a release going with the commit where the version was bumped.
696
- 5. Bump the version to the next patch. If you made big changes and want to bump the version by minor, you can
697
- use `tox -e bumpversion -- minor` after.
691
+ 3. Uploads to PyPI using
692
+ [`uv publish`](https://docs.astral.sh/uv/guides/publish/#publishing-your-package).
693
+ 4. Push to GitHub. You'll need to make a release going with the commit where the
694
+ version was bumped.
695
+ 5. Bump the version to the next patch. If you made big changes and want to bump
696
+ the version by minor, you can use `tox -e bumpversion -- minor` after.
698
697
 
699
698
  #### Releasing on GitHub
700
699
 
701
- 1. Navigate
702
- to https://github.com/biopragmatics/pyobo/releases/new
703
- to draft a new release
704
- 2. Click the "Choose a Tag" dropdown and select the tag corresponding to the release you just made
705
- 3. Click the "Generate Release Notes" button to get a quick outline of recent changes. Modify the title and description
706
- as you see fit
700
+ 1. Navigate to https://github.com/biopragmatics/pyobo/releases/new to draft a
701
+ new release
702
+ 2. Click the "Choose a Tag" dropdown and select the tag corresponding to the
703
+ release you just made
704
+ 3. Click the "Generate Release Notes" button to get a quick outline of recent
705
+ changes. Modify the title and description as you see fit
707
706
  4. Click the big green "Publish Release" button
708
707
 
709
708
  This will trigger Zenodo to assign a DOI to your release as well.