diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index cd8be78..c8c3a29 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -28,8 +28,8 @@ jobs: - name: Run pytest run: just pytest - - name: Run ruff checks - run: just check + - name: Run ruff lint and checks + run: just lint - name: Run mypy checks run: just mypy diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2a3208c..4e11d7f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,9 +7,9 @@ repos: language: system always_run: true pass_filenames: false - - id: check - name: Formatting and linting - entry: just check + - id: lint + name: Linting and checking + entry: just lint language: system always_run: true pass_filenames: false diff --git a/Justfile b/Justfile index bb3e6a6..2ce3c2f 100644 --- a/Justfile +++ b/Justfile @@ -23,9 +23,9 @@ pytest: echo "> Running python tests..." uv run --frozen pytest -v -# Run ruff checks +# Lint and check the codebase [group("tests")] -check: +lint: echo "> Running ruff code quality check..." uv run --frozen ruff check echo "> Running ruff format check..." @@ -48,7 +48,7 @@ format: # Run all tests [group("tests")] -test: check mypy pytest +test: lint mypy pytest # Build mkdocs site [group("docs")] @@ -60,7 +60,7 @@ build-docs: [group("docs")] serve-docs: build-docs echo "> Serving docs..." - uv run mkdocs serve + uv run mkdocs serve --open -w docs -w python_ntfy # Build the package [group("release")] @@ -72,10 +72,7 @@ build: # Bump version, push and create draft release [confirm("Are you sure you want to draft a release? [y/N]")] [group("release")] -draft-release bump='patch': - @just _bump_version {{ bump }} - @just _push_version - @just _create_draft_release +draft-release bump='patch': (_bump_version bump) _push_version _create_draft_release _bump_version bump: git checkout main diff --git a/pyproject.toml b/pyproject.toml index 4e8fb82..2e9e001 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,19 +41,19 @@ module-root = "" [dependency-groups] dev = [ - "mkdocstrings[python]>=0.26.2,<0.31.0", - "mypy>=1.12.0,<2.0.0", - "pytest>=7.4.1,<9.0.0", - "python-dotenv>=1.0.0,<2.0.0", - "pytest-asyncio>=0.21.1,<1.2.0", - "pytest-codecov>=0.5.1,<0.8.0", - "ruff>=0.7,<0.13", - "mkdocs-material>=9.5.41,<10.0.0", - "mkdocstrings-python>=1.12.1,<2.0.0", - "types-pygments>=2.18.0.20240506", - "types-colorama>=0.4.15.20240311", - "types-requests>=2.32.0.20241016", - "types-setuptools>=75.2.0.20241018,<81.0.0.0", + "mkdocstrings[python]>=0.26.2", + "mypy >=1.12.0", + "pytest >=7.4.1", + "python-dotenv >=1.0.0", + "pytest-asyncio >=0.21.1", + "pytest-codecov >=0.5.1", + "ruff >=0.7", + "mkdocs-material >=9.5.41", + "mkdocstrings-python >=1.12.1", + "types-pygments >=2.18.0.20240506", + "types-colorama >=0.4.15.20240311", + "types-requests >=2.32.0.20241016", + "types-setuptools >=75.2.0.20241018", ] [tool.ruff.lint.isort] diff --git a/uv.lock b/uv.lock index 4a53383..4f0cda1 100644 --- a/uv.lock +++ b/uv.lock @@ -709,19 +709,19 @@ requires-dist = [{ name = "requests", specifier = ">=2.31.0" }] [package.metadata.requires-dev] dev = [ - { name = "mkdocs-material", specifier = ">=9.5.41,<10.0.0" }, - { name = "mkdocstrings", extras = ["python"], specifier = ">=0.26.2,<0.31.0" }, - { name = "mkdocstrings-python", specifier = ">=1.12.1,<2.0.0" }, - { name = "mypy", specifier = ">=1.12.0,<2.0.0" }, - { name = "pytest", specifier = ">=7.4.1,<9.0.0" }, - { name = "pytest-asyncio", specifier = ">=0.21.1,<1.2.0" }, - { name = "pytest-codecov", specifier = ">=0.5.1,<0.8.0" }, - { name = "python-dotenv", specifier = ">=1.0.0,<2.0.0" }, - { name = "ruff", specifier = ">=0.7,<0.13" }, + { name = "mkdocs-material", specifier = ">=9.5.41" }, + { name = "mkdocstrings", extras = ["python"], specifier = ">=0.26.2" }, + { name = "mkdocstrings-python", specifier = ">=1.12.1" }, + { name = "mypy", specifier = ">=1.12.0" }, + { name = "pytest", specifier = ">=7.4.1" }, + { name = "pytest-asyncio", specifier = ">=0.21.1" }, + { name = "pytest-codecov", specifier = ">=0.5.1" }, + { name = "python-dotenv", specifier = ">=1.0.0" }, + { name = "ruff", specifier = ">=0.7" }, { name = "types-colorama", specifier = ">=0.4.15.20240311" }, { name = "types-pygments", specifier = ">=2.18.0.20240506" }, { name = "types-requests", specifier = ">=2.32.0.20241016" }, - { name = "types-setuptools", specifier = ">=75.2.0.20241018,<81.0.0.0" }, + { name = "types-setuptools", specifier = ">=75.2.0.20241018" }, ] [[package]]