pyobo 0.12.10__tar.gz → 0.12.12__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.
- {pyobo-0.12.10 → pyobo-0.12.12}/PKG-INFO +45 -23
- {pyobo-0.12.10 → pyobo-0.12.12}/README.md +37 -22
- {pyobo-0.12.10 → pyobo-0.12.12}/pyproject.toml +15 -5
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/__init__.py +6 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/__init__.py +11 -1
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/alts.py +18 -4
- pyobo-0.12.12/src/pyobo/api/embedding.py +247 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/names.py +28 -6
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/xrefs.py +21 -1
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/cli/cli.py +9 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/cli/database.py +63 -22
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/cli/lookup.py +39 -24
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/cli/utils.py +6 -2
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/constants.py +66 -7
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/getters.py +8 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ner/api.py +17 -10
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ner/scispacy_utils.py +2 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/plugins.py +3 -1
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/__init__.py +2 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/antibodyregistry.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/bigg/bigg_compartment.py +1 -1
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/complexportal.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/conso.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/famplex.py +3 -3
- pyobo-0.12.12/src/pyobo/sources/goldbook.py +86 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/hgnc/hgnc.py +157 -96
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/hgnc/hgncgenefamily.py +14 -13
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/msigdb.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/omim_ps.py +8 -2
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/reactome.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/rgd.py +7 -11
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/slm.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/uniprot/uniprot.py +3 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/wikipathways.py +7 -2
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/__init__.py +2 -2
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/functional/macros.py +1 -1
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/functional/obo_to_functional.py +7 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obo/reader.py +4 -4
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/struct.py +48 -18
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/struct_utils.py +19 -5
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/typedef.py +19 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/vocabulary.py +6 -3
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/path.py +5 -4
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/version.py +1 -1
- pyobo-0.12.10/src/pyobo/api/embedding.py +0 -148
- {pyobo-0.12.10 → pyobo-0.12.12}/LICENSE +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/.DS_Store +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/__main__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/combine.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/edges.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/hierarchy.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/metadata.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/properties.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/relations.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/species.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/typedefs.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/api/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/cli/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/cli/database_utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/gilda_utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/api.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/relations/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/relations/api.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/relations/data.json +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/relations/data_owl.json +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/relations/data_rdf.json +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/identifier_utils/relations/data_rdfs.json +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/mocks.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ner/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ner/normalizer.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/py.typed +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resource_utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/ncbitaxon.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/ncbitaxon.tsv.gz +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/ro.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/ro.tsv +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/so.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/resources/so.tsv +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/README.md +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/agrovoc.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/bigg/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/bigg/bigg_metabolite.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/bigg/bigg_model.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/bigg/bigg_reaction.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/biogrid.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/ccle.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/cgnc.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chebi.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chembl/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chembl/chembl_cell.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chembl/chembl_compound.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chembl/chembl_mechanism.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chembl/chembl_target.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/chembl/chembl_tissue.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/civic_gene.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/clinicaltrials.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/cpt.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/credit.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/cvx.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/depmap.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/dictybase_gene.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/drugbank/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/drugbank/drugbank.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/drugbank/drugbank_salt.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/drugcentral.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/expasy.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/flybase.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/gard.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/geonames/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/geonames/features.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/geonames/geonames.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/geonames/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/gmt_utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/go.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/gtdb.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/gwascentral/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/gwascentral/gwascentral_phenotype.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/gwascentral/gwascentral_study.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/hgnc/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/iana_media_type.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/icd/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/icd/icd10.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/icd/icd11.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/icd/icd_utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/iconclass.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/intact.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/interpro.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/itis.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/kegg/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/kegg/api.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/kegg/genes.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/kegg/genome.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/kegg/pathway.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mesh.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mgi.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mirbase/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mirbase/mirbase.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mirbase/mirbase_constants.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mirbase/mirbase_family.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/mirbase/mirbase_mature.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/ncbi/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/ncbi/ncbi_gc.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/ncbi/ncbigene.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/nih_reporter.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/nlm/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/nlm/nlm_catalog.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/nlm/nlm_publisher.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/nlm/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/npass.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pathbank.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pfam/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pfam/pfam.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pfam/pfam_clan.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/pharmgkb_chemical.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/pharmgkb_disease.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/pharmgkb_gene.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/pharmgkb_pathway.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/pharmgkb_variant.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pharmgkb/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pid.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pombase.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/pubchem.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/rhea.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/ror.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/selventa/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/selventa/schem.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/selventa/scomp.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/selventa/sdis.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/selventa/sfam.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/sgd.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/signor/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/signor/download.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/signor/signor_complexes.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/spdx.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/umls/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/umls/__main__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/umls/get_synonym_types.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/umls/sty.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/umls/synonym_types.tsv +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/umls/umls.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/unimod.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/uniprot/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/uniprot/uniprot_ptm.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/sources/zfin.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ssg/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ssg/base.html +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ssg/index.html +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ssg/term.html +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/ssg/typedef.html +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/functional/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/functional/dsl.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/functional/ontology.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/functional/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obo/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obo/reader_utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obograph/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obograph/export.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obograph/reader.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/obograph/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/reference.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/struct/utils.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/__init__.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/cache.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/io.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/iter.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/misc.py +0 -0
- {pyobo-0.12.10 → pyobo-0.12.12}/src/pyobo/utils/ndex_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyobo
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.12
|
|
4
4
|
Summary: A python package for handling and generating OBO
|
|
5
5
|
Keywords: snekpack,cookiecutter,ontologies,biomedical ontologies,life sciences,natural sciences,bioinformatics,cheminformatics,Open Biomedical Ontologies,OBO
|
|
6
6
|
Author: Charles Tapley Hoyt
|
|
@@ -55,10 +55,15 @@ Requires-Dist: nih-reporter-downloader>=0.0.1
|
|
|
55
55
|
Requires-Dist: typing-extensions
|
|
56
56
|
Requires-Dist: rdflib
|
|
57
57
|
Requires-Dist: obographs>=0.0.8
|
|
58
|
+
Requires-Dist: sssom-pydantic>=0.1.1
|
|
58
59
|
Requires-Dist: psycopg2-binary ; extra == 'drugcentral'
|
|
59
60
|
Requires-Dist: ssslm[gilda] ; extra == 'gilda'
|
|
60
61
|
Requires-Dist: ssslm[gilda-slim] ; extra == 'gilda-slim'
|
|
62
|
+
Requires-Dist: grape ; extra == 'grape'
|
|
63
|
+
Requires-Dist: embiggen ; extra == 'grape'
|
|
64
|
+
Requires-Dist: ensmallen ; extra == 'grape'
|
|
61
65
|
Requires-Dist: protmapper ; extra == 'pid'
|
|
66
|
+
Requires-Dist: pykeen ; extra == 'pykeen'
|
|
62
67
|
Requires-Dist: scispacy ; python_full_version < '3.13' and extra == 'scispacy'
|
|
63
68
|
Requires-Dist: spacy ; python_full_version < '3.13' and extra == 'scispacy'
|
|
64
69
|
Requires-Dist: scipy<1.11 ; python_full_version < '3.13' and extra == 'scispacy'
|
|
@@ -74,7 +79,9 @@ Project-URL: Repository, https://github.com/biopragmatics/pyobo.git
|
|
|
74
79
|
Provides-Extra: drugcentral
|
|
75
80
|
Provides-Extra: gilda
|
|
76
81
|
Provides-Extra: gilda-slim
|
|
82
|
+
Provides-Extra: grape
|
|
77
83
|
Provides-Extra: pid
|
|
84
|
+
Provides-Extra: pykeen
|
|
78
85
|
Provides-Extra: scispacy
|
|
79
86
|
Provides-Extra: sources
|
|
80
87
|
Description-Content-Type: text/markdown
|
|
@@ -516,20 +523,6 @@ Alternatively, install using pip:
|
|
|
516
523
|
$ python3 -m pip install -e .
|
|
517
524
|
```
|
|
518
525
|
|
|
519
|
-
### Updating Package Boilerplate
|
|
520
|
-
|
|
521
|
-
This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
|
|
522
|
-
guidelines, documentation configuration) up-to-date with the upstream
|
|
523
|
-
cookiecutter package. Install cruft with either `uv tool install cruft` or
|
|
524
|
-
`python3 -m pip install cruft` then run:
|
|
525
|
-
|
|
526
|
-
```console
|
|
527
|
-
$ cruft update
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
More info on Cruft's update command is available
|
|
531
|
-
[here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
|
|
532
|
-
|
|
533
526
|
### 🥼 Testing
|
|
534
527
|
|
|
535
528
|
After cloning the repository and installing `tox` with
|
|
@@ -567,8 +560,21 @@ only that Sphinx can build the documentation in an isolated environment (i.e.,
|
|
|
567
560
|
with `tox -e docs-test`) but also that
|
|
568
561
|
[ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).
|
|
569
562
|
|
|
563
|
+
</details>
|
|
564
|
+
|
|
565
|
+
## 🧑💻 For Maintainers
|
|
566
|
+
|
|
567
|
+
<details>
|
|
568
|
+
<summary>See maintainer instructions</summary>
|
|
569
|
+
|
|
570
|
+
### Initial Configuration
|
|
571
|
+
|
|
570
572
|
#### Configuring ReadTheDocs
|
|
571
573
|
|
|
574
|
+
[ReadTheDocs](https://readthedocs.org) is an external documentation hosting
|
|
575
|
+
service that integrates with GitHub's CI/CD. Do the following for each
|
|
576
|
+
repository:
|
|
577
|
+
|
|
572
578
|
1. Log in to ReadTheDocs with your GitHub account to install the integration at
|
|
573
579
|
https://readthedocs.org/accounts/login/?next=/dashboard/
|
|
574
580
|
2. Import your project by navigating to https://readthedocs.org/dashboard/import
|
|
@@ -577,12 +583,10 @@ with `tox -e docs-test`) but also that
|
|
|
577
583
|
(i.e., with spaces and capital letters)
|
|
578
584
|
4. Click next, and you're good to go!
|
|
579
585
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
#### Configuring Zenodo
|
|
586
|
+
#### Configuring Archival on Zenodo
|
|
583
587
|
|
|
584
588
|
[Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI
|
|
585
|
-
to each release of your package.
|
|
589
|
+
to each release of your package. Do the following for each repository:
|
|
586
590
|
|
|
587
591
|
1. Log in to Zenodo via GitHub with this link:
|
|
588
592
|
https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a page
|
|
@@ -602,10 +606,10 @@ the DOI for the release and link to the Zenodo record for it.
|
|
|
602
606
|
|
|
603
607
|
#### Registering with the Python Package Index (PyPI)
|
|
604
608
|
|
|
605
|
-
|
|
609
|
+
The [Python Package Index (PyPI)](https://pypi.org) hosts packages so they can
|
|
610
|
+
be easily installed with `pip`, `uv`, and equivalent tools.
|
|
606
611
|
|
|
607
|
-
1. Register for an account
|
|
608
|
-
[Python Package Index (PyPI)](https://pypi.org/account/register)
|
|
612
|
+
1. Register for an account [here](https://pypi.org/account/register)
|
|
609
613
|
2. Navigate to https://pypi.org/manage/account and make sure you have verified
|
|
610
614
|
your email address. A verification email might not have been sent by default,
|
|
611
615
|
so you might have to click the "options" dropdown next to your address to get
|
|
@@ -616,9 +620,11 @@ You only have to do the following steps once.
|
|
|
616
620
|
2-factor authentication
|
|
617
621
|
4. Issue an API token from https://pypi.org/manage/account/token
|
|
618
622
|
|
|
623
|
+
This only needs to be done once per developer.
|
|
624
|
+
|
|
619
625
|
#### Configuring your machine's connection to PyPI
|
|
620
626
|
|
|
621
|
-
|
|
627
|
+
This needs to be done once per machine.
|
|
622
628
|
|
|
623
629
|
```console
|
|
624
630
|
$ uv tool install keyring
|
|
@@ -628,6 +634,8 @@ $ keyring set https://test.pypi.org/legacy/ __token__
|
|
|
628
634
|
|
|
629
635
|
Note that this deprecates previous workflows using `.pypirc`.
|
|
630
636
|
|
|
637
|
+
### 📦 Making a Release
|
|
638
|
+
|
|
631
639
|
#### Uploading to PyPI
|
|
632
640
|
|
|
633
641
|
After installing the package in development mode and installing `tox` with
|
|
@@ -665,4 +673,18 @@ This script does the following:
|
|
|
665
673
|
|
|
666
674
|
This will trigger Zenodo to assign a DOI to your release as well.
|
|
667
675
|
|
|
676
|
+
### Updating Package Boilerplate
|
|
677
|
+
|
|
678
|
+
This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
|
|
679
|
+
guidelines, documentation configuration) up-to-date with the upstream
|
|
680
|
+
cookiecutter package. Install cruft with either `uv tool install cruft` or
|
|
681
|
+
`python3 -m pip install cruft` then run:
|
|
682
|
+
|
|
683
|
+
```console
|
|
684
|
+
$ cruft update
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
More info on Cruft's update command is available
|
|
688
|
+
[here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
|
|
689
|
+
|
|
668
690
|
</details>
|
|
@@ -435,20 +435,6 @@ Alternatively, install using pip:
|
|
|
435
435
|
$ python3 -m pip install -e .
|
|
436
436
|
```
|
|
437
437
|
|
|
438
|
-
### Updating Package Boilerplate
|
|
439
|
-
|
|
440
|
-
This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
|
|
441
|
-
guidelines, documentation configuration) up-to-date with the upstream
|
|
442
|
-
cookiecutter package. Install cruft with either `uv tool install cruft` or
|
|
443
|
-
`python3 -m pip install cruft` then run:
|
|
444
|
-
|
|
445
|
-
```console
|
|
446
|
-
$ cruft update
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
More info on Cruft's update command is available
|
|
450
|
-
[here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
|
|
451
|
-
|
|
452
438
|
### 🥼 Testing
|
|
453
439
|
|
|
454
440
|
After cloning the repository and installing `tox` with
|
|
@@ -486,8 +472,21 @@ only that Sphinx can build the documentation in an isolated environment (i.e.,
|
|
|
486
472
|
with `tox -e docs-test`) but also that
|
|
487
473
|
[ReadTheDocs can build it too](https://docs.readthedocs.io/en/stable/pull-requests.html).
|
|
488
474
|
|
|
475
|
+
</details>
|
|
476
|
+
|
|
477
|
+
## 🧑💻 For Maintainers
|
|
478
|
+
|
|
479
|
+
<details>
|
|
480
|
+
<summary>See maintainer instructions</summary>
|
|
481
|
+
|
|
482
|
+
### Initial Configuration
|
|
483
|
+
|
|
489
484
|
#### Configuring ReadTheDocs
|
|
490
485
|
|
|
486
|
+
[ReadTheDocs](https://readthedocs.org) is an external documentation hosting
|
|
487
|
+
service that integrates with GitHub's CI/CD. Do the following for each
|
|
488
|
+
repository:
|
|
489
|
+
|
|
491
490
|
1. Log in to ReadTheDocs with your GitHub account to install the integration at
|
|
492
491
|
https://readthedocs.org/accounts/login/?next=/dashboard/
|
|
493
492
|
2. Import your project by navigating to https://readthedocs.org/dashboard/import
|
|
@@ -496,12 +495,10 @@ with `tox -e docs-test`) but also that
|
|
|
496
495
|
(i.e., with spaces and capital letters)
|
|
497
496
|
4. Click next, and you're good to go!
|
|
498
497
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
#### Configuring Zenodo
|
|
498
|
+
#### Configuring Archival on Zenodo
|
|
502
499
|
|
|
503
500
|
[Zenodo](https://zenodo.org) is a long-term archival system that assigns a DOI
|
|
504
|
-
to each release of your package.
|
|
501
|
+
to each release of your package. Do the following for each repository:
|
|
505
502
|
|
|
506
503
|
1. Log in to Zenodo via GitHub with this link:
|
|
507
504
|
https://zenodo.org/oauth/login/github/?next=%2F. This brings you to a page
|
|
@@ -521,10 +518,10 @@ the DOI for the release and link to the Zenodo record for it.
|
|
|
521
518
|
|
|
522
519
|
#### Registering with the Python Package Index (PyPI)
|
|
523
520
|
|
|
524
|
-
|
|
521
|
+
The [Python Package Index (PyPI)](https://pypi.org) hosts packages so they can
|
|
522
|
+
be easily installed with `pip`, `uv`, and equivalent tools.
|
|
525
523
|
|
|
526
|
-
1. Register for an account
|
|
527
|
-
[Python Package Index (PyPI)](https://pypi.org/account/register)
|
|
524
|
+
1. Register for an account [here](https://pypi.org/account/register)
|
|
528
525
|
2. Navigate to https://pypi.org/manage/account and make sure you have verified
|
|
529
526
|
your email address. A verification email might not have been sent by default,
|
|
530
527
|
so you might have to click the "options" dropdown next to your address to get
|
|
@@ -535,9 +532,11 @@ You only have to do the following steps once.
|
|
|
535
532
|
2-factor authentication
|
|
536
533
|
4. Issue an API token from https://pypi.org/manage/account/token
|
|
537
534
|
|
|
535
|
+
This only needs to be done once per developer.
|
|
536
|
+
|
|
538
537
|
#### Configuring your machine's connection to PyPI
|
|
539
538
|
|
|
540
|
-
|
|
539
|
+
This needs to be done once per machine.
|
|
541
540
|
|
|
542
541
|
```console
|
|
543
542
|
$ uv tool install keyring
|
|
@@ -547,6 +546,8 @@ $ keyring set https://test.pypi.org/legacy/ __token__
|
|
|
547
546
|
|
|
548
547
|
Note that this deprecates previous workflows using `.pypirc`.
|
|
549
548
|
|
|
549
|
+
### 📦 Making a Release
|
|
550
|
+
|
|
550
551
|
#### Uploading to PyPI
|
|
551
552
|
|
|
552
553
|
After installing the package in development mode and installing `tox` with
|
|
@@ -584,4 +585,18 @@ This script does the following:
|
|
|
584
585
|
|
|
585
586
|
This will trigger Zenodo to assign a DOI to your release as well.
|
|
586
587
|
|
|
588
|
+
### Updating Package Boilerplate
|
|
589
|
+
|
|
590
|
+
This project uses `cruft` to keep boilerplate (i.e., configuration, contribution
|
|
591
|
+
guidelines, documentation configuration) up-to-date with the upstream
|
|
592
|
+
cookiecutter package. Install cruft with either `uv tool install cruft` or
|
|
593
|
+
`python3 -m pip install cruft` then run:
|
|
594
|
+
|
|
595
|
+
```console
|
|
596
|
+
$ cruft update
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
More info on Cruft's update command is available
|
|
600
|
+
[here](https://github.com/cruft/cruft?tab=readme-ov-file#updating-a-project).
|
|
601
|
+
|
|
587
602
|
</details>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["uv_build>=0.
|
|
2
|
+
requires = ["uv_build>=0.9.6,<1.0"]
|
|
3
3
|
build-backend = "uv_build"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pyobo"
|
|
7
|
-
version = "0.12.
|
|
7
|
+
version = "0.12.12"
|
|
8
8
|
description = "A python package for handling and generating OBO"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -89,6 +89,7 @@ dependencies = [
|
|
|
89
89
|
"typing_extensions",
|
|
90
90
|
"rdflib",
|
|
91
91
|
"obographs>=0.0.8",
|
|
92
|
+
"sssom_pydantic>=0.1.1",
|
|
92
93
|
]
|
|
93
94
|
|
|
94
95
|
# see https://peps.python.org/pep-0735/ and https://docs.astral.sh/uv/concepts/dependencies/#dependency-groups
|
|
@@ -102,6 +103,7 @@ docs = [
|
|
|
102
103
|
"sphinx-rtd-theme>=3.0",
|
|
103
104
|
"sphinx-click",
|
|
104
105
|
"sphinx_automodapi",
|
|
106
|
+
"sphinx_toolbox",
|
|
105
107
|
]
|
|
106
108
|
lint = [
|
|
107
109
|
"ruff",
|
|
@@ -139,8 +141,8 @@ bump = [
|
|
|
139
141
|
"bump-my-version",
|
|
140
142
|
]
|
|
141
143
|
build = [
|
|
142
|
-
"uv",
|
|
143
|
-
"uv-build",
|
|
144
|
+
"uv>=0.9.6",
|
|
145
|
+
"uv-build>=0.9.6",
|
|
144
146
|
]
|
|
145
147
|
release = [
|
|
146
148
|
{ include-group = "build" },
|
|
@@ -174,6 +176,14 @@ scispacy = [
|
|
|
174
176
|
"spacy; python_version <= '3.12'",
|
|
175
177
|
"scipy<1.11; python_version <= '3.12'",
|
|
176
178
|
]
|
|
179
|
+
pykeen = [
|
|
180
|
+
"pykeen",
|
|
181
|
+
]
|
|
182
|
+
grape = [
|
|
183
|
+
"grape",
|
|
184
|
+
"embiggen",
|
|
185
|
+
"ensmallen",
|
|
186
|
+
]
|
|
177
187
|
|
|
178
188
|
# See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#urls
|
|
179
189
|
# and also https://packaging.python.org/en/latest/specifications/well-known-project-urls/
|
|
@@ -305,7 +315,7 @@ known-first-party = [
|
|
|
305
315
|
docstring-code-format = true
|
|
306
316
|
|
|
307
317
|
[tool.bumpversion]
|
|
308
|
-
current_version = "0.12.
|
|
318
|
+
current_version = "0.12.12"
|
|
309
319
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:-(?P<release>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?(?:\\+(?P<build>[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?"
|
|
310
320
|
serialize = [
|
|
311
321
|
"{major}.{minor}.{patch}-{release}+{build}",
|
|
@@ -14,6 +14,7 @@ from .api import (
|
|
|
14
14
|
get_filtered_relations_df,
|
|
15
15
|
get_filtered_xrefs,
|
|
16
16
|
get_graph,
|
|
17
|
+
get_graph_embeddings_df,
|
|
17
18
|
get_hierarchy,
|
|
18
19
|
get_id_definition_mapping,
|
|
19
20
|
get_id_multirelations_mapping,
|
|
@@ -37,6 +38,7 @@ from .api import (
|
|
|
37
38
|
get_obsolete,
|
|
38
39
|
get_primary_curie,
|
|
39
40
|
get_primary_identifier,
|
|
41
|
+
get_primary_reference,
|
|
40
42
|
get_properties,
|
|
41
43
|
get_properties_df,
|
|
42
44
|
get_property,
|
|
@@ -44,6 +46,7 @@ from .api import (
|
|
|
44
46
|
get_relation,
|
|
45
47
|
get_relation_mapping,
|
|
46
48
|
get_relations_df,
|
|
49
|
+
get_semantic_mappings,
|
|
47
50
|
get_species,
|
|
48
51
|
get_sssom_df,
|
|
49
52
|
get_subhierarchy,
|
|
@@ -114,6 +117,7 @@ __all__ = [
|
|
|
114
117
|
"get_filtered_relations_df",
|
|
115
118
|
"get_filtered_xrefs",
|
|
116
119
|
"get_graph",
|
|
120
|
+
"get_graph_embeddings_df",
|
|
117
121
|
"get_grounder",
|
|
118
122
|
"get_hierarchy",
|
|
119
123
|
"get_id_definition_mapping",
|
|
@@ -139,6 +143,7 @@ __all__ = [
|
|
|
139
143
|
"get_ontology",
|
|
140
144
|
"get_primary_curie",
|
|
141
145
|
"get_primary_identifier",
|
|
146
|
+
"get_primary_reference",
|
|
142
147
|
"get_properties",
|
|
143
148
|
"get_properties_df",
|
|
144
149
|
"get_property",
|
|
@@ -149,6 +154,7 @@ __all__ = [
|
|
|
149
154
|
"get_scispacy_entities",
|
|
150
155
|
"get_scispacy_entity_linker",
|
|
151
156
|
"get_scispacy_knowledgebase",
|
|
157
|
+
"get_semantic_mappings",
|
|
152
158
|
"get_species",
|
|
153
159
|
"get_sssom_df",
|
|
154
160
|
"get_subhierarchy",
|
|
@@ -5,10 +5,16 @@ from .alts import (
|
|
|
5
5
|
get_id_to_alts,
|
|
6
6
|
get_primary_curie,
|
|
7
7
|
get_primary_identifier,
|
|
8
|
+
get_primary_reference,
|
|
8
9
|
)
|
|
9
10
|
from .combine import get_literal_mappings_subset
|
|
10
11
|
from .edges import get_edges, get_edges_df, get_graph
|
|
11
|
-
from .embedding import
|
|
12
|
+
from .embedding import (
|
|
13
|
+
get_graph_embeddings_df,
|
|
14
|
+
get_text_embedding,
|
|
15
|
+
get_text_embedding_similarity,
|
|
16
|
+
get_text_embeddings_df,
|
|
17
|
+
)
|
|
12
18
|
from .hierarchy import (
|
|
13
19
|
get_ancestors,
|
|
14
20
|
get_children,
|
|
@@ -59,6 +65,7 @@ from .typedefs import get_typedef_df
|
|
|
59
65
|
from .xrefs import (
|
|
60
66
|
get_filtered_xrefs,
|
|
61
67
|
get_mappings_df,
|
|
68
|
+
get_semantic_mappings,
|
|
62
69
|
get_sssom_df,
|
|
63
70
|
get_xref,
|
|
64
71
|
get_xrefs,
|
|
@@ -80,6 +87,7 @@ __all__ = [
|
|
|
80
87
|
"get_filtered_relations_df",
|
|
81
88
|
"get_filtered_xrefs",
|
|
82
89
|
"get_graph",
|
|
90
|
+
"get_graph_embeddings_df",
|
|
83
91
|
"get_hierarchy",
|
|
84
92
|
"get_id_definition_mapping",
|
|
85
93
|
"get_id_multirelations_mapping",
|
|
@@ -105,6 +113,7 @@ __all__ = [
|
|
|
105
113
|
"get_ontology",
|
|
106
114
|
"get_primary_curie",
|
|
107
115
|
"get_primary_identifier",
|
|
116
|
+
"get_primary_reference",
|
|
108
117
|
"get_priority_curie",
|
|
109
118
|
"get_properties",
|
|
110
119
|
"get_properties_df",
|
|
@@ -113,6 +122,7 @@ __all__ = [
|
|
|
113
122
|
"get_relation",
|
|
114
123
|
"get_relation_mapping",
|
|
115
124
|
"get_relations_df",
|
|
125
|
+
"get_semantic_mappings",
|
|
116
126
|
"get_species",
|
|
117
127
|
"get_sssom_df",
|
|
118
128
|
"get_subhierarchy",
|
|
@@ -20,6 +20,7 @@ __all__ = [
|
|
|
20
20
|
"get_id_to_alts",
|
|
21
21
|
"get_primary_curie",
|
|
22
22
|
"get_primary_identifier",
|
|
23
|
+
"get_primary_reference",
|
|
23
24
|
]
|
|
24
25
|
|
|
25
26
|
logger = logging.getLogger(__name__)
|
|
@@ -61,13 +62,13 @@ def get_alts_to_id(prefix: str, **kwargs: Unpack[GetOntologyKwargs]) -> Mapping[
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
|
|
64
|
-
def
|
|
65
|
+
def get_primary_reference(
|
|
65
66
|
prefix: str | curies.Reference | curies.ReferenceTuple,
|
|
66
67
|
identifier: str | None = None,
|
|
67
68
|
/,
|
|
68
69
|
**kwargs: Unpack[GetOntologyKwargs],
|
|
69
|
-
) ->
|
|
70
|
-
"""Get the primary
|
|
70
|
+
) -> curies.ReferenceTuple | None:
|
|
71
|
+
"""Get the primary reference for an entity."""
|
|
71
72
|
reference = _get_pi(prefix, identifier)
|
|
72
73
|
try:
|
|
73
74
|
primary_identifier = get_primary_identifier(reference, **kwargs)
|
|
@@ -76,7 +77,20 @@ def get_primary_curie(
|
|
|
76
77
|
raise
|
|
77
78
|
# this happens on invalid prefix. maybe revise?
|
|
78
79
|
return None
|
|
79
|
-
return
|
|
80
|
+
return curies.ReferenceTuple(reference.prefix, primary_identifier)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def get_primary_curie(
|
|
84
|
+
prefix: str | curies.Reference | curies.ReferenceTuple,
|
|
85
|
+
identifier: str | None = None,
|
|
86
|
+
/,
|
|
87
|
+
**kwargs: Unpack[GetOntologyKwargs],
|
|
88
|
+
) -> str | None:
|
|
89
|
+
"""Get the primary curie for an entity."""
|
|
90
|
+
reference = get_primary_reference(prefix, identifier, **kwargs)
|
|
91
|
+
if reference is None:
|
|
92
|
+
return None
|
|
93
|
+
return reference.curie
|
|
80
94
|
|
|
81
95
|
|
|
82
96
|
def get_primary_identifier(
|