Skip to content

Commit

Permalink
Use uv (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
FollowTheProcess committed Aug 22, 2024
1 parent 57e09b1 commit 4af90b0
Show file tree
Hide file tree
Showing 4 changed files with 1,707 additions and 26 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: python3 -m pip install --upgrade pip nox
run: python3 -m pip install --upgrade pip nox[uv]

- name: Run Tests and Coverage
run: nox --non-interactive --session test
Expand All @@ -56,7 +56,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Install Dependencies
run: python3 -m pip install --upgrade pip nox
run: python3 -m pip install --upgrade pip nox[uv]

- name: Run Tests and Coverage
run: nox --non-interactive --session test -- cover
Expand All @@ -80,7 +80,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Install Dependencies
run: python3 -m pip install --upgrade pip nox
run: python3 -m pip install --upgrade pip nox[uv]

- name: Build Docs
run: nox --non-interactive --session docs
Expand All @@ -105,7 +105,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Install Dependencies
run: python3 -m pip install --upgrade pip nox
run: python3 -m pip install --upgrade pip nox[uv]

- name: Deploy Docs to GitHub Pages
env:
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Install Dependencies
run: python3 -m pip install --upgrade pip nox
run: python3 -m pip install --upgrade pip nox[uv]

- name: Build sdist and wheel
run: nox --non-interactive --session build
Expand Down
2 changes: 2 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import nox

nox.options.default_venv_backend = "uv"

ROOT = Path(__file__).parent.resolve()
SRC = ROOT / "src"
TESTS = ROOT / "tests"
Expand Down
43 changes: 22 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,35 +56,15 @@ dependencies = [
"rich==13.7.1",
"rtoml==0.11",
"thefuzz[speedup]==0.22.1",
"typing-extensions==4.8; python_version<='3.9'",
"virtualenv==20.26.3",
]
optional-dependencies.dev = [
"covdefaults",
"coverage[toml]",
"freezegun",
"mkdocs",
"mkdocs-material",
"mypy",
"nox",
"pre-commit",
"pytest",
"pytest-clarity",
"pytest-cov",
"pytest-httpx",
"pytest-mock",
"pytest-randomly",
"ruff",
"types-click",
"types-pyyaml",
]

urls.Documentation = "https://FollowTheProcess.github.io/pytoil/"
urls.Homepage = "https://github.com/FollowTheProcess/pytoil"
urls.Source = "https://github.com/FollowTheProcess/pytoil"
scripts.pytoil = "pytoil.cli.root:main"

[tool.ruff]
target-version = "py39"
line-length = 120

lint.select = [
Expand Down Expand Up @@ -200,3 +180,24 @@ enable_error_code = [
"redundant-expr",
"truthy-bool",
]

[tool.uv]
dev-dependencies = [
"covdefaults",
"coverage[toml]",
"freezegun",
"mkdocs",
"mkdocs-material",
"mypy",
"nox",
"pre-commit",
"pytest",
"pytest-clarity",
"pytest-cov",
"pytest-httpx",
"pytest-mock",
"pytest-randomly",
"ruff",
"types-click",
"types-pyyaml",
]
Loading

0 comments on commit 4af90b0

Please sign in to comment.