Skip to content

Conversation

@reckart
Copy link
Member

@reckart reckart commented May 6, 2024

What's in the PR

  • Manage dependencies in requirements files
  • Use pip-tools to manage dependencies
  • Remove poetry

How to test manually

  • Build / release

Automatic testing

  • PR includes unit tests

Documentation

  • PR updates documentation

reckart added 2 commits May 4, 2024 20:53
- Remove setup.py
- Switch to pyproject.toml
- Update GitHub actions to use poetry
- Clean up code a bit according to feedback from flake8
- Update release guide
- Use ruff
- Address linter issues in json.py
@reckart reckart added this to the 0.10.0 milestone May 6, 2024
@reckart reckart self-assigned this May 6, 2024
@reckart reckart force-pushed the refactoring/316-Switch-to-using-plain-pyproject.toml branch from d608947 to 8f43b16 Compare May 6, 2024 18:37
@reckart reckart changed the title Refactoring/316 switch to using plain pyproject.toml #316 - Switch to using plain pyproject.toml May 6, 2024
- Manage dependencies in requirements files
- Use pip-tools to manage dependencies
- Remove poetry
@reckart reckart force-pushed the refactoring/316-Switch-to-using-plain-pyproject.toml branch from 8f43b16 to 28478b1 Compare May 6, 2024 18:45
@codecov
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.44%. Comparing base (473e3d6) to head (916a962).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #317   +/-   ##
=======================================
  Coverage   91.43%   91.44%           
=======================================
  Files           5        5           
  Lines        2009     2010    +1     
  Branches      520      446   -74     
=======================================
+ Hits         1837     1838    +1     
  Misses         91       91           
  Partials       81       81           

☔ 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.

@reckart
Copy link
Member Author

reckart commented May 6, 2024

@DavidHuebner does this look more reasonable to you?

@DavidHuebner
Copy link
Collaborator

The project structure looks fine, but I have some doubts if pinning all the versions is really a good idea for dkpro-cassis (sorry if I only make the argument now).

So, generally cassis is installed as part of larger projects as an auxiliary module and not as a standalone library. We should be flexible to deal with the dependency ranges in other libraries. For instance, attrs is used in jupyterlab and we previously had a problem that attrs was too tightly specified in cassis (see #293 ). If we now pin all dependencies, we will run into more dependency conflicts compared to using ranges. Have a look at this discussion as well (https://stackoverflow.com/a/44938662).

Hence, I would actually prefer ranges over specific versions.

@reckart
Copy link
Member Author

reckart commented May 7, 2024

I don't mind having ranges for the declaration of compatibility, but I would like to have pinned versions for builds (in particular testing, documentation, etc.). Is that possible?

I.e. when setting up the venv for building, I want to have fixed versions. When another library uses cassis, it should look at the compatibility declarations in the package metadata. My understanding is that the version declarations in pyproject.toml would declare the compatibility while the requirements.txt would be used when setting up the local venv.

@DavidHuebner
Copy link
Collaborator

I see. I think you are right. When installing from PyPI, the pyproject.toml should take precedence over requirements.txt and provide flexible versions (just tested it with a plain local pip install .). In contrast, the requirements.txt can be picked up by the local IDE to use fixed versions or the dependencies can explicitly be installed with pip install -r requirements.txt.

reckart added 5 commits May 7, 2024 09:09
* main:
  #318 - Address linter issues

% Conflicts:
%	cassis/json.py
…Switch-to-using-plain-pyproject.toml

* refactoring/314-Switch-to-poetry:
  #318 - Address linter issues
- Move dependenceis into pyproject.toml
…ect.toml

* main:
  No issue: Improve array example
@reckart reckart added this to Kanban Mar 9, 2025
@github-project-automation github-project-automation bot moved this to In progress in Kanban Mar 9, 2025
@reckart reckart force-pushed the refactoring/316-Switch-to-using-plain-pyproject.toml branch from 5a17e3c to 916a962 Compare March 9, 2025 15:52
@reckart reckart merged commit 4cae87c into main Mar 9, 2025
6 of 7 checks passed
@reckart reckart deleted the refactoring/316-Switch-to-using-plain-pyproject.toml branch March 9, 2025 15:57
@github-project-automation github-project-automation bot moved this from In progress to Done in Kanban Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants