Skip to content
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

#316 - Switch to using plain pyproject.toml #317

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

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

- 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
Copy link

codecov bot commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.43%. Comparing base (a76b4e1) to head (473e3d6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
- Coverage   95.47%   91.43%   -4.04%     
==========================================
  Files           5        5              
  Lines        2009     2009              
  Branches        0      520     +520     
==========================================
- Hits         1918     1837      -81     
  Misses         91       91              
- Partials        0       81      +81     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants