Skip to content

Commit

Permalink
🔧 refactor: remove unused TaskEndpoint class and update validation me…
Browse files Browse the repository at this point in the history
…thods
  • Loading branch information
pdodds committed Feb 20, 2025
1 parent 48a61d2 commit b742191
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 19 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- 'releases/**'
paths:
- '**'

jobs:
build-and-publish-python-package:
Expand Down
2 changes: 1 addition & 1 deletion kodexa/model/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 0 additions & 15 deletions kodexa/platform/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/taxonomy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit b742191

Please sign in to comment.