-
Notifications
You must be signed in to change notification settings - Fork 6
#24 - Support local projects #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Create LocalInceptionAdapter for handling local INCEpTION projects
- Extend Pycaprio class to support the newly created local_adapter
- Refactor Pycaprio initialization to streamline remote and local mode setup
- Implements method for retrieving all projects in local directory - Implements method for retrieving a single project from local directory
- Adds placeholders for missing abstract methods
- Adds first unit tests for LocalInceptionAdapter
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
- Coverage 98.94% 96.16% -2.78%
==========================================
Files 19 20 +1
Lines 474 574 +100
Branches 61 32 -29
==========================================
+ Hits 469 552 +83
- Misses 1 15 +14
- Partials 4 7 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Implements method for retrieving a list of documents in a project - Implements method for retrieving a single document in a project - Minor formatting changes
- Adds unit tests for retrieving list of documents from a project in LocalInceptionAdapter
- Adds unit test for retrieving a document from a give project in LocalInceptionAdapter
- Implements method for retrieving a list of annotations from a document - Implements method for retrieving the annotation of a specific user from a document
- Adds unit tests for retrieving list of annotations from a document - Adds unit tests for retrieving annotation by a specific user from a document
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for handling local INCEpTION projects by implementing the LocalInceptionAdapter and updating the Pycaprio client to optionally run in local mode. The key changes include new unit tests for the local adapter, modifications to the Pycaprio client initialization to support a local projects directory, and the implementation of the LocalInceptionAdapter for reading project ZIP files.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unit_tests/core/adapters/test_local_adapter.py | New unit tests added for local project handling |
| pycaprio/core/pycaprio.py | Updated client initialization to support local mode using LocalInceptionAdapter |
| pycaprio/core/adapters/local_adapter.py | Implementation of local adapter methods to interact with project ZIP files |
Comments suppressed due to low confidence (1)
pycaprio/core/adapters/local_adapter.py:76
- The return type annotation for the 'documents' method is incorrect; it returns Document objects rather than strings. Consider changing it to List[Document].
def documents(self, project: Union[Project, str]) -> List[str]:
- Fix return type hint Co-authored-by: Copilot <[email protected]>
What's in the PR
How to test manually
Automatic testing
Documentation