From b0cd18378b3e46a34b65aa9d7184a1346dd286dc Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Mon, 28 Aug 2023 11:35:27 -0600 Subject: [PATCH] Move dev deps back to requirements files (#2155) --- .github/workflows/deploy.yml | 2 +- pyproject.toml | 35 ++++------------------------------- requirements/dev.txt | 2 ++ requirements/docs.txt | 5 +++++ requirements/lint.txt | 1 + requirements/test.txt | 4 ++++ requirements/tools.txt | 1 + 7 files changed, 18 insertions(+), 32 deletions(-) create mode 100644 requirements/dev.txt create mode 100644 requirements/docs.txt create mode 100644 requirements/lint.txt create mode 100644 requirements/test.txt create mode 100644 requirements/tools.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 464edfb80..fca011bbe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip build - python -m pip install .[docs] + python -m pip install -r requirements/docs.txt - name: Deploy documents run: | git config user.name ${{ secrets.GH_USER }} diff --git a/pyproject.toml b/pyproject.toml index aff18b731..99203bfc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,34 +42,6 @@ extra = [ "Pygments>=2.12" ] -dev = [ - "build", - "tox" -] - -docs = [ - "mkdocs_pymdownx_material_extras>=2.1", - "pymdown_lexers @ git+https://github.com/facelessuser/pymdown-lexers.git", - "mkdocs-git-revision-date-localized-plugin", - "mkdocs-minify-plugin", - "pyspelling" -] - -lint = [ - "ruff" -] - -test = [ - "PyYAML>=3.10", - "pytest", - "pytest-cov", - "coverage" -] - -tools = [ - "requests" -] - [tool.hatch.build.targets.sdist] include = [ "/docs/src/markdown/**/*.md", @@ -81,6 +53,7 @@ include = [ "/docs/theme/**/*.html", "/docs/theme/**/*.css.map", "/docs/theme/**/*.js.map", + "/requirements/*.txt", "/pymdownx/**/*.py", "/tests/**/*.txt", "/tests/**/*.py", @@ -159,7 +132,7 @@ legacy_tox_ini = """ passenv = LANG deps= .[extra] - .[test] + -r requirements/test.txt commands= {envbindir}/py.test --cov pymdownx --cov-append {toxinidir} {envbindir}/coverage html -d {envtmpdir}/coverage @@ -168,7 +141,7 @@ legacy_tox_ini = """ [testenv:documents] deps= - .[docs] + -r requirements/docs.txt .[extra] commands= {envpython} -m pip install . @@ -177,7 +150,7 @@ legacy_tox_ini = """ [testenv:lint] deps= - .[lint] + -r requirements/lint.txt commands= {envbindir}/ruff check {toxinidir} diff --git a/requirements/dev.txt b/requirements/dev.txt new file mode 100644 index 000000000..ab0d7f6a1 --- /dev/null +++ b/requirements/dev.txt @@ -0,0 +1,2 @@ +build +tox diff --git a/requirements/docs.txt b/requirements/docs.txt new file mode 100644 index 000000000..8afffd094 --- /dev/null +++ b/requirements/docs.txt @@ -0,0 +1,5 @@ +mkdocs_pymdownx_material_extras>=2.1 +pymdown_lexers @ git+https://github.com/facelessuser/pymdown-lexers.git +mkdocs-git-revision-date-localized-plugin +mkdocs-minify-plugin +pyspelling diff --git a/requirements/lint.txt b/requirements/lint.txt new file mode 100644 index 000000000..af3ee5763 --- /dev/null +++ b/requirements/lint.txt @@ -0,0 +1 @@ +ruff diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 000000000..62d67ba49 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,4 @@ +PyYAML>=3.10 +pytest +pytest-cov +coverage diff --git a/requirements/tools.txt b/requirements/tools.txt new file mode 100644 index 000000000..f2293605c --- /dev/null +++ b/requirements/tools.txt @@ -0,0 +1 @@ +requests