Skip to content

Commit 0219eb3

Browse files
chore: move deps from requirements.txt to pyproject.toml (#233)
* chore: remove requirements.txt files * install nox * install nox * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * update noxfile.py * update noxfile.py and pyproject.tom * fix pyproject.toml * move sphinx-autobuild into pyproject.toml --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 742fc42 commit 0219eb3

File tree

6 files changed

+21
-24
lines changed

6 files changed

+21
-24
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ jobs:
2121
- uses: actions/setup-python@v5
2222
with:
2323
python-version: '3.x'
24-
- run: pip install -r requirements-dev.txt
24+
25+
- name: Install nox
26+
run: |
27+
python -m pip install --upgrade pip
28+
python -m pip install nox
2529
2630
- name: Run pre-commit
2731
run: |
@@ -63,7 +67,7 @@ jobs:
6367
python-version: ${{ matrix.py }}
6468
- run: |
6569
pip install --upgrade pip
66-
pip install -r requirements-dev.txt
70+
pip install .[dev]
6771
6872
- name: Download wheel artifact
6973
uses: actions/download-artifact@v4
@@ -85,7 +89,11 @@ jobs:
8589
- uses: actions/setup-python@v5
8690
with:
8791
python-version: "3.10"
88-
- run: pip install -r requirements-dev.txt
92+
93+
- name: Install nox
94+
run: |
95+
python -m pip install --upgrade pip
96+
python -m pip install nox
8997
9098
- name: Build docs
9199
run: nox -s docs

.gitpod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# and commit this file to your remote git repository to share the goodness with others.
44

55
tasks:
6-
- before: pip install --upgrade pip && pip install -r requirements-dev.txt
6+
- before: pip install --upgrade pip
77
init: pre-commit install
8-
command: pip install -e .
8+
command: pip install -e .[dev]

docs/requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

noxfile.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
nox.options.reuse_existing_virtualenvs = True
55
nox.options.sessions = ["lint"]
66

7-
REQUIREMENTS = {
8-
"dev": "requirements-dev.txt",
9-
"docs": "docs/requirements.txt",
10-
}
11-
127
# -----------------------------------------------------------------------------
138
# Development Commands
149
# -----------------------------------------------------------------------------
@@ -54,22 +49,19 @@ def commit_check(session):
5449

5550
@nox.session()
5651
def coverage(session):
57-
session.install(".")
58-
session.install("-r", REQUIREMENTS["dev"])
52+
session.install('.[test]')
5953
session.run("coverage", "run", "--source", "commit_check", "-m", "pytest")
6054
session.run("coverage", "report")
6155
session.run("coverage", "xml")
6256

6357

6458
@nox.session()
6559
def docs(session):
66-
session.install(".")
67-
session.install("-r", REQUIREMENTS["docs"])
60+
session.install('.[docs]')
6861
session.run("sphinx-build", "-E", "-W", "-b", "html", "docs", "_build/html")
6962

7063

7164
@nox.session(name="docs-live")
7265
def docs_live(session):
73-
session.install(".")
74-
session.install("-r", REQUIREMENTS["docs"], "sphinx-autobuild")
66+
session.install('.[docs]')
7567
session.run("sphinx-autobuild", "-b", "html", "docs", "_build/html")

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ tracker = "https://github.com/commit-check/commit-check/issues"
4040
# ... other project metadata fields as specified in:
4141
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
4242

43+
[project.optional-dependencies]
44+
dev = ['nox']
45+
test = ['coverage', 'pytest', 'pytest-mock']
46+
docs = ['sphinx-immaterial', 'sphinx-autobuild']
47+
4348
[tool.setuptools]
4449
zip-safe = false
4550
packages = ["commit_check"]

requirements-dev.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy