`tox` warning when running default configuration
See original GitHub issueHello,
I am testing this as a potential way to structure a project I’m working on. First of all - awesome job.
I’ve set up my repository and made a few changes to the environment files and so on and I tested to see that tox
works with some dummy test file and dummy test function before adding my code to the repository. When I run the command tox
, the test passes but I get the following warning:
The way I understand this is that the extras field under [testenv]
basically means that tox
executes pip install[testing]
since extras
is bound to testing
and there is an entry in the setup.cfg
to install the dependencies. Hence, I don’t understand exactly what tox
complains about? Should I go and explicitly add deps to [testenv]
?
Many thanks for great work, it’s a massive help!
Relevant testenv config.
[testenv]
description = invoke pytest to run automated tests
isolated_build = True
setenv =
TOXINIDIR = {toxinidir}
passenv =
HOME
extras =
testing
commands =
pytest {posargs}
Relevant part of setup.cfg
[options.extras_require]
# Add here additional requirements for extra features, to install with:
# `pip install sgd-utils[PDF]` like:
# PDF = ReportLab; RXP
# Add here test requirements (semicolon/line-separated)
testing =
setuptools
pytest>=6.2.3, <7.0.0
pytest-cov
Please provide any additional information below. I created my environment using the command:
conda env create -f environment.yml
where the environment file is
name: my_package_name
channels:
- defaults
- conda-forge
- pytorch
# - fastai
dependencies:
- python>=3.8, <3.9
- pip
# BASICS
# VISUALIZATION
- matplotlib
- seaborn
# OTHER TOOLS
- pip:
- -e . # install git checkout of sgd-utils in editable mode
# add here only pip-packages that are not available in conda/conda-forge!
# or use if your preferred way of installing packages is pip in a conda env :)
and then updating with
conda env update -f dev_environment.yml
where the dev_environment.yml
file is
name: my_package_name
channels:
- defaults
- conda-forge
- pytorch
dependencies:
- pip:
# - jupyterlab
- pytest>=6.2.3, <7.0.0
- pytest-cov
- tox
- pre_commit
- nbdime
#- nbstripout
- sphinx
- recommonmark
- flake8>=3.9.1, <4.0.0
Versions and main components
- PyScaffold Version: 4.0.1
- dsproject extension: 0.6.1
- Python Version: 3.8.8
- Operating system: Windows 10 (but working in WSL 1)
- How did you install PyScaffold: pip
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
@FlorianWilhelm, I have followed your advice and put the development dependencies under
-dependencies
rather than-pip
.tox
now runs warning free 👍! Thank you so much for your help and sorry for the delay.Your work is very valuable for machine learning research.
Hi @alexcoca, any news on this issue? Have you had time to test it out again?