Skip to content

chore: move deps from requirements.txt to pyproject.toml #233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: pip install -r requirements-dev.txt

- name: Install nox
run: |
python -m pip install --upgrade pip
python -m pip install nox

- name: Run pre-commit
run: |
Expand Down Expand Up @@ -63,7 +67,7 @@ jobs:
python-version: ${{ matrix.py }}
- run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
pip install .[dev]

- name: Download wheel artifact
uses: actions/download-artifact@v4
Expand All @@ -85,7 +89,11 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- run: pip install -r requirements-dev.txt

- name: Install nox
run: |
python -m pip install --upgrade pip
python -m pip install nox

- name: Build docs
run: nox -s docs
Expand Down
4 changes: 2 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# and commit this file to your remote git repository to share the goodness with others.

tasks:
- before: pip install --upgrade pip && pip install -r requirements-dev.txt
- before: pip install --upgrade pip
init: pre-commit install
command: pip install -e .
command: pip install -e .[dev]
3 changes: 0 additions & 3 deletions docs/requirements.txt

This file was deleted.

14 changes: 3 additions & 11 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
nox.options.reuse_existing_virtualenvs = True
nox.options.sessions = ["lint"]

REQUIREMENTS = {
"dev": "requirements-dev.txt",
"docs": "docs/requirements.txt",
}

# -----------------------------------------------------------------------------
# Development Commands
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -54,22 +49,19 @@ def commit_check(session):

@nox.session()
def coverage(session):
session.install(".")
session.install("-r", REQUIREMENTS["dev"])
session.install('.[test]')
session.run("coverage", "run", "--source", "commit_check", "-m", "pytest")
session.run("coverage", "report")
session.run("coverage", "xml")


@nox.session()
def docs(session):
session.install(".")
session.install("-r", REQUIREMENTS["docs"])
session.install('.[docs]')
session.run("sphinx-build", "-E", "-W", "-b", "html", "docs", "_build/html")


@nox.session(name="docs-live")
def docs_live(session):
session.install(".")
session.install("-r", REQUIREMENTS["docs"], "sphinx-autobuild")
session.install('.[docs]')
session.run("sphinx-autobuild", "-b", "html", "docs", "_build/html")
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ tracker = "https://github.com/commit-check/commit-check/issues"
# ... other project metadata fields as specified in:
# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

[project.optional-dependencies]
dev = ['nox']
test = ['coverage', 'pytest', 'pytest-mock']
docs = ['sphinx-immaterial', 'sphinx-autobuild']

[tool.setuptools]
zip-safe = false
packages = ["commit_check"]
Expand Down
5 changes: 0 additions & 5 deletions requirements-dev.txt

This file was deleted.

Loading