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

Use non-dev dependencies in pyproject.toml #124

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ deps =
pytest-cov
coverage
extras = test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the extras can be removed here then?

# Unfortunately, tox does not allow separate installation flags for the project
# dependencies and the test dependencies. When running tox, we want to install the
# project dependencies with the --pre flag, so that we get the latest version of all
# dependencies. We do the installation step ourselves for this reason.
skip_install = true
commands_pre =
pip install --pre -e .[test]
Comment on lines +24 to +25
Copy link
Member

@yunzheng yunzheng May 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also possible to list the flags and package extra under [deps] like so:

[testenv]
deps =
    pytest
    pytest-cov
    coverage
    --pre --editable .[test]

Then you don't have to run the pip command separately.

commands =
# Capturing output will fail on pypy, possibly due to this issue: https://github.com/pytest-dev/pytest/issues/5502
pytest --basetemp="{envtmpdir}" {posargs:--color=yes --capture=no --cov=flow --cov-report=term-missing -v tests}
Expand Down
Loading