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

tests: install dependencies from poetry.lock instead of duplicating in tox.ini #89

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

muxator
Copy link

@muxator muxator commented Sep 16, 2024

Currently, when tox is used to run the tests, various venvs are built reading the dependencies section in tox.ini.

Those dependencies are a subset of the dev dependencies listed in pyproject.toml, and need to be kept synchronized (which hit us in the past).

It seems that Poetry >= 1.2 and tox >= 4.0 can coexist togheter, see Poetry FAQ "Is tox supported?" (https://python-poetry.org/docs/faq/#use-case-2).

This PR is an attempt at using that strategy.

muxator and others added 3 commits September 13, 2024 18:28
From https://python-poetry.org/docs/managing-dependencies/#dependency-groups:

    A note about defining a dev dependencies group

    The proper way to define a dev dependencies group since Poetry 1.2.0 is the
    following:

    [tool.poetry.group.dev.dependencies]
    pytest = "^6.0.0"
    pytest-mock = "*"

    This group notation is preferred since Poetry 1.2.0 and not usable in
    earlier versions.

    [...]

    Poetry will slowly transition away from the dev-dependencies notation which
    will soon be deprecated, so it’s advised to migrate your existing
    development dependencies to the new group notation.
Poetry >= 1.2 and tox >= 4.0 can coexist togheter, so that we do not have to
duplicate the dependency specification in tox.ini. In the past, this has been a
source of problems.

source: Poetry FAQ "Is tox supported?" (https://python-poetry.org/docs/faq/#use-case-2)
@muxator muxator force-pushed the use-poetry-for-tox-dependencies branch from a5a6c00 to e703f3a Compare September 17, 2024 19:40
@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.52%. Comparing base (55e65fe) to head (d671b3f).
Report is 2 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #89   +/-   ##
=======================================
  Coverage   88.52%   88.52%           
=======================================
  Files          33       33           
  Lines        1751     1751           
=======================================
  Hits         1550     1550           
  Misses        201      201           

…ust lints for now: COMPLETE_ME)

The "make" command should be available on every supported platform in our Github
CI runners.
@muxator muxator force-pushed the use-poetry-for-tox-dependencies branch 2 times, most recently from 27bd518 to d671b3f Compare September 19, 2024 16:03
@muxator muxator force-pushed the use-poetry-for-tox-dependencies branch from d671b3f to 379c280 Compare September 20, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants