Skip to content
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
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ devr check
- `devr fix`
- `devr security [--fail-fast]`
- `devr doctor`
- `python -m devr --version` (module entrypoint smoke check)

### Shell completion

Expand Down Expand Up @@ -126,10 +127,14 @@ Use this checklist when cutting a release:
- Move completed entries from `Unreleased` into a new version section.
- Add release date (`YYYY-MM-DD`) and keep entries grouped by change type.
3. Bump version in `pyproject.toml` under `[project].version`.
4. Commit release metadata (`CHANGELOG.md`, version bump, and any final docs updates).
5. Tag the release (for example, `vX.Y.Z`) and push branch + tag.
6. Publish to PyPI using your standard release workflow.
7. Add a fresh `Unreleased` section to `CHANGELOG.md` for subsequent work.
4. Build and smoke-test the package artifacts:
- `python -m build`
- `python -m pip install --force-reinstall dist/*.whl`
- `python -m devr --version`
5. Commit release metadata (`CHANGELOG.md`, version bump, and any final docs updates).
6. Tag the release (for example, `vX.Y.Z`) and push branch + tag.
7. Publish to PyPI using your standard release workflow.
8. Add a fresh `Unreleased` section to `CHANGELOG.md` for subsequent work.

## Default toolchain

Expand Down
13 changes: 13 additions & 0 deletions REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

This review was refreshed after the latest completed work and focuses on **new** reliability, UX, and maintainability opportunities for `devr`.


## 0.1.0 release additions to prioritize

1. **Add `python -m devr` module entrypoint support (done in this branch).**
- This gives users a reliable fallback invocation path and improves post-install smoke testing.

2. **Run package artifact smoke tests as part of release steps.**
- Build the wheel/sdist and verify the installed artifact can execute `devr --version` and `python -m devr --version`.

3. **Reconcile changelog and version state before tagging.**
- `pyproject.toml` already says `0.1.0`, while `CHANGELOG.md` still has unreleased entries that read as already-shipped features.
- Move completed items into the final `0.1.0` section (or bump target version if intentionally post-0.1.0 work).

## High-impact improvements

1. **Add machine-readable output modes (`--json`) for `check`, `security`, and `doctor`.**
Expand Down
7 changes: 7 additions & 0 deletions src/devr/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"""Module entry point for ``python -m devr``."""

from .cli import app


if __name__ == "__main__":
app(prog_name="devr")
15 changes: 15 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""CLI behavior tests for devr commands."""

import os
import subprocess
from pathlib import Path
from types import SimpleNamespace
Expand All @@ -23,6 +24,20 @@
runner = CliRunner()


def test_module_entrypoint_supports_version_flag() -> None:
proc = subprocess.run(
["python", "-m", "devr", "--version"],
cwd=str(Path(__file__).resolve().parents[1]),
capture_output=True,
text=True,
check=False,
env={**os.environ, "PYTHONPATH": "src"},
)

assert proc.returncode == 0
assert proc.stdout.startswith("devr ")


def test_version_flag_prints_version(monkeypatch) -> None:
monkeypatch.setattr("devr.cli.version", lambda _: "1.2.3")

Expand Down