Skip to content

Conversation

@reckart
Copy link
Member

@reckart reckart commented Mar 9, 2025

What's in the PR

  • ...

How to test manually

  • ...

Automatic testing

  • PR includes unit tests

Documentation

  • PR updates documentation

serwarde added 6 commits March 4, 2025 15:41
- 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
@reckart reckart added the ⭐️ Enhancement New feature or request label Mar 9, 2025
@reckart reckart added this to the 0.3.0 milestone Mar 9, 2025
@reckart reckart added this to Kanban Mar 9, 2025
@reckart reckart linked an issue Mar 9, 2025 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to 🔖 To do in Kanban Mar 9, 2025
@reckart reckart marked this pull request as draft March 9, 2025 12:53
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2025

Codecov Report

Attention: Patch coverage is 84.11215% with 17 lines in your changes missing coverage. Please review.

Project coverage is 96.16%. Comparing base (88dab61) to head (e27cc22).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
pycaprio/core/adapters/local_adapter.py 84.69% 13 Missing and 2 partials ⚠️
pycaprio/core/pycaprio.py 77.77% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

serwarde added 5 commits March 9, 2025 21:24
- 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
@serwarde serwarde marked this pull request as ready for review March 31, 2025 09:02
@serwarde serwarde requested a review from Copilot March 31, 2025 09:03
Copy link
Contributor

Copilot AI left a 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]>
@serwarde serwarde merged commit 9af9848 into main Mar 31, 2025
5 checks passed
@serwarde serwarde deleted the 24-support-local-projects branch March 31, 2025 09:07
@github-project-automation github-project-automation bot moved this from 🔖 To do to 🍹 Done in Kanban Mar 31, 2025
@reckart reckart modified the milestones: 0.3.0, 0.3.1 Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⭐️ Enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Support local projects

4 participants