Skip to content

Commit

Permalink
Deeper uv integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Emrys-Merlin committed Nov 1, 2024
1 parent e365b35 commit 4a79019
Show file tree
Hide file tree
Showing 7 changed files with 398 additions and 366 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
make publish
shell: bash
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}

- name: Create release
uses: actions/create-release@v1
Expand Down
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,24 @@ SHELL := /bin/bash

.PHONY: setup
setup:
pip install uv
uv pip install -e ".[dev,docs]"
pre-commit install
uv sync
uv run pre-commit install

.PHONY: test
test:
pytest --cov=web_watchr --cov-report term-missing
uv run pytest --cov=web_watchr --cov-report term-missing

.PHONY: setup-ci
setup-ci:
pip install --upgrade pip
pip install uv
uv venv
uv pip install -e ".[dev]"
uv sync

.PHONY: run-ci
run-ci: setup-ci
uv run pytest --cov=web_watchr --cov-report term-missing --cov-report xml:coverage.xml --junit-xml=report.xml

.PHONY: docs
docs:
mkdocs gh-deploy
uv run mkdocs gh-deploy

.PHONY: clean
clean:
Expand All @@ -41,4 +37,4 @@ build:

.PHONY: publish
publish:
uvx twine upload dist/*
uv publish
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| 3.10 | 3.11 | 3.12 | 3.13 |
|------|------|------|------|
|![tests](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2Fweb_watchr_3.10-junit-tests.json)|![tests](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2Fweb_watchr_3.11-junit-tests.json)|![tests](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2Fweb_watchr_3.12-junit-tests.json)|![tests](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2Fweb_watchr_3.13-junit-tests.json)|
|![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2F272263ce795e0ca0adf06fa6d8aa2fe496a778dd%2Fweb_watchr_3.10-cobertura-coverage.json)|![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2F272263ce795e0ca0adf06fa6d8aa2fe496a778dd%2Fweb_watchr_3.11-cobertura-coverage.json)|![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2F272263ce795e0ca0adf06fa6d8aa2fe496a778dd%2Fweb_watchr_3.12-cobertura-coverage.json)|![Endpoint Badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2FEmrys-Merlin%2Fec2e4e339a048ca0f0b996517d282a4a%2Fraw%2F272263ce795e0ca0adf06fa6d8aa2fe496a778dd%2Fweb_watchr_3.13-cobertura-coverage.json)|
|![Endpoint Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Emrys-Merlin/ec2e4e339a048ca0f0b996517d282a4a/raw/7bb08f823be14242b40466aed324de8bff518364/web_watchr_3.10-cobertura-coverage.json)|![Endpoint Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Emrys-Merlin/ec2e4e339a048ca0f0b996517d282a4a/raw/7bb08f823be14242b40466aed324de8bff518364/web_watchr_3.11-cobertura-coverage.json)|![Endpoint Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Emrys-Merlin/ec2e4e339a048ca0f0b996517d282a4a/raw/7bb08f823be14242b40466aed324de8bff518364/web_watchr_3.12-cobertura-coverage.json)|![Endpoint Badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/Emrys-Merlin/ec2e4e339a048ca0f0b996517d282a4a/raw/7bb08f823be14242b40466aed324de8bff518364/web_watchr_3.13-cobertura-coverage.json)|

# WebWatchr

Expand Down
38 changes: 16 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,7 @@ dependencies = [
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"ruff",
"pre-commit",
"mypy",
"ipdb",
]
docs = [
"mkdocs",
"mkdocstrings[python]",
]
all = ["web_watchr[dev,docs]"]
# [project.optional-dependencies]

[tool.hatch.version]
path = "src/web_watchr/__init__.py"
Expand All @@ -61,12 +48,19 @@ Repository = "https://github.com/Emrys-Merlin/web_watchr.git"
"Bug Tracker" = "https://github.com/Emrys-Merlin/web_watchr/issues"
# Changelog = "https://github.com/me/spam/blob/master/CHANGELOG.md"

[tool.semantic_release]
version_variable = [
"src/web_watchr/__init__.py:__version__"
[tool.uv]
default-groups = ["dev", "docs"]

[dependency-groups]
dev = [
"pytest",
"pytest-cov",
"ruff",
"pre-commit",
"mypy",
"ipdb",
]
docs = [
"mkdocs",
"mkdocstrings[python]",
]
major_on_zero = true
branch = "main"
upload_to_PyPI = true
upload_to_release = true
build_command = "make setup-ci && make build"
2 changes: 1 addition & 1 deletion src/web_watchr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
from .watchr import Watchr

__all__ = ["Watchr"]
__version__ = "0.3.0"
__version__ = "0.4.0"

logger.disable("website_monitoring_bot")
Loading

0 comments on commit 4a79019

Please sign in to comment.