From b742191aaaf87a185ce64bcc1368ba386e5ae397 Mon Sep 17 00:00:00 2001 From: Philip Dodds <5761+pdodds@users.noreply.github.com> Date: Wed, 19 Feb 2025 19:23:27 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20refactor:=20remove=20unused=20Ta?= =?UTF-8?q?skEndpoint=20class=20and=20update=20validation=20methods?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 2 -- kodexa/model/persistence.py | 2 +- kodexa/platform/client.py | 15 --------------- tests/taxonomy_test.py | 2 +- 4 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a5506a21..65cbcbb1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,6 @@ on: push: branches: - 'releases/**' - paths: - - '**' jobs: build-and-publish-python-package: diff --git a/kodexa/model/persistence.py b/kodexa/model/persistence.py index 63a4b08a..32e7e4c0 100644 --- a/kodexa/model/persistence.py +++ b/kodexa/model/persistence.py @@ -1054,7 +1054,7 @@ def get_model_insights(self) -> List[ModelInsight]: """ model_insights = [] for model_insight in self.cursor.execute(MODEL_INSIGHT_SELECT).fetchall(): - model_insights.append(ModelInsight.parse_raw(model_insight[0])) + model_insights.append(ModelInsight.model_validate_json(model_insight[0])) return model_insights diff --git a/kodexa/platform/client.py b/kodexa/platform/client.py index 93b71b84..15314fab 100644 --- a/kodexa/platform/client.py +++ b/kodexa/platform/client.py @@ -2708,21 +2708,6 @@ def get_type(self) -> str: return "taskTemplates" -class TaskEndpoint(EntityEndpoint, Task): - """Represents a task endpoint. - - This class is used to interact with the task endpoint of the API. - """ - - def get_type(self) -> str: - """Get the type of the endpoint. - - Returns: - str: The type of the endpoint, in this case "projects". - """ - return "tasks" - - class RetainedGuidanceEndpoint(EntityEndpoint, RetainedGuidance): """Represents a retained guidance endpoint. diff --git a/tests/taxonomy_test.py b/tests/taxonomy_test.py index f5d60b03..76d8afdd 100644 --- a/tests/taxonomy_test.py +++ b/tests/taxonomy_test.py @@ -28,6 +28,6 @@ def update_name(taxon): assert taxonomy.find_taxon_by_path( '5a9f6c65-8226-4ac6-925b-a1fe91683e7c/4241d1ac-38eb-448b-a28c-9ba69f2f33de').label == 'TrancheName' - new_taxonomy = Taxonomy.model_validate(taxonomy.dict()) + new_taxonomy = Taxonomy.model_validate(taxonomy.model_dump()) print(json.dumps(new_taxonomy.model_dump(), indent=4))