-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added api endpoint for test data transform history
- Loading branch information
Kolea PLESCO
authored and
Kolea PLESCO
committed
Jan 16, 2025
1 parent
7018d7b
commit 3c1e667
Showing
6 changed files
with
85 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
mapping_workbench/backend/test_data_suite/services/test_data_transform_history.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from beanie import PydanticObjectId | ||
|
||
from mapping_workbench.backend.project.models.entity import Project | ||
from mapping_workbench.backend.test_data_suite.models.entity import TestDataFileResource, TestDataManifestationHistory | ||
|
||
|
||
async def add_test_data_transform_to_history( | ||
test_data_file_resource: TestDataFileResource, | ||
project_id: PydanticObjectId | ||
): | ||
history_item = TestDataManifestationHistory( | ||
project=Project.link_from_id(project_id), | ||
test_data_id=test_data_file_resource.id, | ||
in_manifestation=test_data_file_resource.content, | ||
out_manifestation=test_data_file_resource.rdf_manifestation | ||
) | ||
await history_item.create() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters