Skip to content

Commit

Permalink
Define test and lint requirements as extras
Browse files Browse the repository at this point in the history
  • Loading branch information
davidesarra committed Nov 5, 2022
1 parent 71bb4a9 commit 8ba6167
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/lint.txt
python -m pip install .[lint]
- name: Check order of Python imports
run: isort --check-only --diff --quiet .
- name: Check formatting of Python files
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL := /usr/bin/env bash

install:
@ pip install --upgrade build pip setuptools twine && \
pip install -e . -r requirements/lint.txt -r requirements/test.txt
pip install -e .[lint,test]

build: install
@ python -m build
Expand Down
2 changes: 0 additions & 2 deletions requirements/lint.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements/test.txt

This file was deleted.

9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,12 @@ packages = jupyter_spaces
python_requires = ~=3.6
install_requires =
ipython>=5.0.0

[options.extras_require]
lint =
black==22.10.0
isort==5.10.1
test =
pytest>=7.0.1
pytest-cov==4.0.0
tox==3.27.0
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python =

[testenv]
deps =
-rrequirements/test.txt
-e.[test]
ipython5: ipython>=5.0.0,<6.0.0
ipython6: ipython>=6.0.0,<7.0.0
ipython7: ipython>=7.3.0,<8.0.0
Expand Down

0 comments on commit 8ba6167

Please sign in to comment.