From 3f5b1a91473447b0faf84150145169eb49f07f3c Mon Sep 17 00:00:00 2001 From: Albert Wang Date: Sun, 17 Mar 2024 21:23:00 -0700 Subject: [PATCH] Move requirements-test.txt into pyproject.toml --- .drone.yml | 2 +- README.md | 2 +- pyproject.toml | 10 ++++++++++ requirements-test.txt | 6 ------ 4 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 requirements-test.txt diff --git a/.drone.yml b/.drone.yml index e2d18aa..d7832ce 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,7 @@ steps: - apt-get update && apt-get install -y curl git - curl -L "https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-$(dpkg --print-architecture)" > "${HOME}/bin/cc-test-reporter" - chmod +x "${HOME}/bin/cc-test-reporter" - - pip install -r requirements-test.txt + - pip install -e .[test] - ruff check . - mypy . --strict --exclude build - cc-test-reporter before-build diff --git a/README.md b/README.md index 135e953..0cb8a45 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Development ----------- ```bash -pip install -r requirements-test.txt +pip install -e .[test] ruff check . mypy . --strict coverage run -m unittest diff --git a/pyproject.toml b/pyproject.toml index 68948d0..c0ef287 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,6 +25,16 @@ classifiers = [ dependencies = [] dynamic = ["version", "readme"] +[project.optional-dependencies] +test = [ + # Testing + "coverage==7.4.0", # Test coverage + "ruff==0.1.14", # Python linting + + # Type checking + "mypy==1.8.0", # Static typing +] + [project.urls] "Homepage" = "https://github.com/albertyw/syspath" diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 71b4381..0000000 --- a/requirements-test.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Testing -coverage==7.4.0 # Test coverage -ruff==0.1.14 # Python linting - -# Type checking -mypy==1.8.0 # Static typing