Skip to content
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

Release 0.4.0 #27

Merged
merged 4 commits into from
Nov 1, 2024
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
7 changes: 5 additions & 2 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 All @@ -36,7 +39,7 @@ jobs:
make run-ci

- name: Create coverage badge
uses: gaelgirodon/ci-badges-action@v1.5.0
uses: gaelgirodon/ci-badges-action@v1.6.0
with:
gist-id: ${{ vars.GIST_ID_BADGES }}
token: ${{ secrets.GIST_TOKEN }}
Expand Down Expand Up @@ -78,7 +81,7 @@ jobs:

- name: Fail if any matrix job failed
if: needs.test.result != 'success'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Some matrix job failed. Please check the logs.')
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ jobs:
echo "::set-output name=version::$(grep -oP '__version__ = "\K[^"]+' src/web_watchr/__init__.py)"
shell: bash

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

- name: Build and publish
run: |
make setup-ci
make build
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
Loading