Skip to content

Commit

Permalink
Prep for V1.0.2 (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh authored Aug 6, 2024
2 parents 017dc92 + d80c00a commit e56d884
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ontogpt"
version = "1.0.1"
version = "1.0.2"
description = "OntoGPT"
authors = ["Chris Mungall <cjmungall@lbl.gov>", "J. Harry Caufield <jhc@lbl.gov>"]
license = "BSD-3"
Expand Down
2 changes: 1 addition & 1 deletion src/ontogpt/engines/pheno_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def evaluate(self, phenopackets: List[PHENOPACKET]) -> List[DiagnosisPrediction]
dp.rank = i
dp.matching_disease_ids = list(matches)
break
print(dump_minimal_yaml(dp.dict()))
print(dump_minimal_yaml(dp.model_dump()))
results.append(dp)
return results

Expand Down
2 changes: 1 addition & 1 deletion src/ontogpt/io/html_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def export(
self.export_metadata(extraction_output)
self.export_results(extraction_output.extracted_object, extraction_output)
self.h2("YAML Object")
self.details(yaml.dump(extraction_output.dict()), output, code="yaml")
self.details(yaml.dump(extraction_output.model_dump()), output, code="yaml")
self.h2("Prompt")
self.details(extraction_output.prompt, output)
self.h2("Completion")
Expand Down
2 changes: 1 addition & 1 deletion src/ontogpt/io/owl_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def export(
def _as_dataclass_object(self, element: pydantic.BaseModel, schemaview: SchemaView):
cls_name = type(element).__name__
schemaview.merge_imports()
element_dict = element.dict()
element_dict = element.model_dump()
dataclasses_module = PythonGenerator(schemaview.schema).compile_module()
target_class_py = dataclasses_module.__dict__[cls_name]
element_as_dataclass = target_class_py(**element_dict)
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for ontogpt."""

import logging
import os
from pathlib import Path
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_evaluation/test_eval_drugmechdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_transform(self):
obj = _fix_source_mechanism(objs[0])
src_mechanism = Mechanism(**obj)
r = self.engine.transform_mechanism(src_mechanism)
print(yaml.dump(r.dict()))
print(yaml.dump(r.model_dump()))

def test_load_and_transform_source_database(self):
"""
Expand Down
9 changes: 9 additions & 0 deletions tests/output/task-classes.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
code task description
default='sat' OntologyCoherencyTask A task to determine if an ontology is coherent. There should be a single answer, which is a boolean.
default='indirect' EntailedIndirectSuperClassTask A task to determine the indirect superclasses of a class.
default='superc' EntailedTransitiveSuperClassTask A task to determine the all transitive superclasses of a class.
default='expr' EntailedSubClassOfExpressionTask A task to determine the subclasses of a class expression.
default='dir-sup' EntailedDirectSuperClassTask A task to determine the direct superclasses of a class. Includes those entailed by other axioms, e.g. equivalence axioms. Context: a standard pattern in bio-ontologies is to infer the structure of one ontology from another - e.g. the metabolic process branch in GO may be entailed by GO equivalence axioms plus the IS_A links in CHEBI.
default='mrca' MostRecentCommonSubsumerTask A task to determine the most specific common ancestors.
default='tc' TaxonConstraintTask A task to determine inapplicable classes by taxon.
default='abox' ABoxTask A task to infer assertions over property chains and transitvity in aboxes.
1 change: 0 additions & 1 deletion tests/unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from tests import OUTPUT_DIR

UNIT_CACHE_DB = str(OUTPUT_DIR / "unit_test_cache.db")
GENE_REQUESTS_CACHE_DB = str(OUTPUT_DIR / "gene_requests_cache.db")
1 change: 1 addition & 0 deletions tests/unit/test_exporters/test_html_exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core tests."""

import pickle
import unittest

Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_exporters/test_markdown_exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core tests."""

import pickle
import unittest

Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_exporters/test_owl_exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core tests."""

import pickle
import unittest

Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_exporters/test_rdf_exporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Core tests."""

import pickle
import unittest

Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_unit_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""CLI test."""

import unittest

from click.testing import CliRunner
Expand Down

0 comments on commit e56d884

Please sign in to comment.