-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mapping endpoint to serve mapping rows (#466)
Closes #427 This PR is to add an endpoint that serves mappings following the associations endpoint, and to serve the mappings for an entity with the entity response (with extras turned on) - [x] model - [x] interface - [x] implementation tests - [x] implementation - [x] cli - [x] api - [x] api tests --------- Co-authored-by: glass-ships <[email protected]> Co-authored-by: Vincent Rubinetti <[email protected]>
- Loading branch information
1 parent
9e9e7ea
commit 7184f54
Showing
28 changed files
with
831 additions
and
201 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from abc import ABC | ||
from typing import List | ||
|
||
from monarch_py.datamodels.model import MappingResults | ||
|
||
|
||
class MappingInterface(ABC): | ||
def get_mappings( | ||
self, | ||
entity_id: List[str] = None, | ||
subject_id: List[str] = None, | ||
predicate_id: List[str] = None, | ||
object_id: List[str] = None, | ||
mapping_justification: List[str] = None, | ||
) -> MappingResults: | ||
""" | ||
Get SSSOM Mappings based on the provided constraints | ||
Args: | ||
entity_id: Filter to only mappings matching the specified entity IDs. Defaults to None. | ||
subject_id: Filter to only mappings matching the specified subject IDs. Defaults to None. | ||
predicate_id: Filter to only mappings matching the specified predicate IDs. Defaults to None. | ||
object_id: Filter to only mappings matching the specified object IDs. Defaults to None. | ||
mapping_justification: Filter to only mappings matching the specified mapping justifications. Defaults to None. | ||
""" | ||
raise NotImplementedError |
Oops, something went wrong.