Skip to content

Commit d2e13af

Browse files
improve: add py3.13 to CI matrix, add format check step, update Makefile targets (#8)
* improve: add py3.13 to CI matrix, add format check step, update Makefile targets * fix: apply ruff formatting to cli.py and test_cli.py by dev-engineer
1 parent c93b40b commit d2e13af

5 files changed

Lines changed: 25 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ jobs:
2323
- name: Run ruff check
2424
run: ruff check src/ tests/
2525

26+
- name: Check formatting
27+
run: ruff format --check src/ tests/
28+
2629
test:
2730
runs-on: ubuntu-latest
2831
strategy:
2932
matrix:
30-
python-version: ["3.10", "3.11", "3.12"]
33+
python-version: ["3.10", "3.11", "3.12", "3.13"]
3134

3235
steps:
3336
- uses: actions/checkout@v6

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to Revenue Holdings CLI will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.3.0] - 2026-06-30
9+
10+
### Added
11+
- Python 3.13 to CI test matrix
12+
- Formatting check step in CI workflow
13+
- `format-check` Makefile target
14+
15+
### Changed
16+
- Makefile lint/format targets scoped to `src/ tests/` instead of entire repo
17+
818
## [0.2.0] - 2026-05-17
919

1020
### Added

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Generated by Agent B — Lint & Type Scripts
2-
.PHONY: lint test format typecheck
2+
.PHONY: lint test format typecheck format-check
33

44
lint:
5-
ruff check .
5+
ruff check src/ tests/
66

77
format:
8-
ruff format .
8+
ruff format src/ tests/
9+
10+
format-check:
11+
ruff format --check src/ tests/
912

1013
typecheck:
1114
pyright src/

src/devforge/cli.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def list_tools(
8282

8383
@app.command()
8484
def install(
85-
tool: str = typer.Argument(
86-
..., help="Tool to install: " + ", ".join(TOOLS.keys()) + ", or 'all'"
87-
),
85+
tool: str = typer.Argument(..., help="Tool to install: " + ", ".join(TOOLS.keys()) + ", or 'all'"),
8886
):
8987
"""Install a DevForge tool."""
9088
if tool == "all":
@@ -101,10 +99,7 @@ def install(
10199
pkg = f"devforge[{extras}]"
102100
console.print(f"[yellow]Installing {pkg}...[/yellow]")
103101
try:
104-
result = subprocess.run(
105-
[sys.executable, "-m", "pip", "install", pkg],
106-
capture_output=True, text=True
107-
)
102+
result = subprocess.run([sys.executable, "-m", "pip", "install", pkg], capture_output=True, text=True)
108103
if result.returncode == 0:
109104
console.print(f"[green]Successfully installed:[/green] {', '.join(targets)}")
110105
else:
@@ -130,8 +125,7 @@ def show_versions(
130125
info = TOOLS[t]
131126
try:
132127
result = subprocess.run(
133-
[sys.executable, "-m", "pip", "show", info["package"]],
134-
capture_output=True, text=True
128+
[sys.executable, "-m", "pip", "show", info["package"]], capture_output=True, text=True
135129
)
136130
if result.returncode == 0:
137131
for line in result.stdout.splitlines():

tests/test_cli.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for devforge meta-package."""
2+
23
from __future__ import annotations
34

45
from devforge import TOOLS, __version__
@@ -86,9 +87,7 @@ def test_versions_unknown_tool_fails(self):
8687
@mock.patch("devforge.cli.subprocess.run")
8788
def test_versions_specific_tool_not_installed(self, mock_run):
8889
"""Show 'not installed' for a tool that isn't installed."""
89-
mock_run.return_value = mock.MagicMock(
90-
returncode=1, stdout="", stderr=""
91-
)
90+
mock_run.return_value = mock.MagicMock(returncode=1, stdout="", stderr="")
9291
result = runner.invoke(app, ["versions", "guard"])
9392
assert result.exit_code == 0
9493
assert "guard" in result.stdout

0 commit comments

Comments
 (0)