Skip to content

Commit d58a92a

Browse files
authored
Merge pull request #27 from abhiksark/dev
Release v0.3.1 — finish pythonlings rename + --version fix
2 parents 10e6bb0 + 8706811 commit d58a92a

5 files changed

Lines changed: 28 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
All notable changes to this project are documented here. Pythonlings follows
44
Semantic Versioning.
55

6+
## [0.3.1] - 2026-06-20
7+
8+
### Fixed
9+
10+
- `pythonlings --version` now reports the installed package version instead of
11+
a separate hardcoded string in `cli.py` (which had drifted to `0.3.0`). The
12+
version is read from package metadata, so it can no longer fall out of sync
13+
with `pyproject.toml`.
14+
- Corrected stale `pylings` references in the contributor guide (`CLAUDE.md`):
15+
the smoke-test command, manual-testing flows, package paths, stylesheet, and
16+
entry point now consistently use the `pythonlings` name the project adopted
17+
in 0.3.0. (The unrelated `pylings` PyPI package belongs to a different
18+
project; `pythonlings` is the only command this project ships.)
19+
620
## [0.3.0] - 2026-06-10
721

822
### Added

CLAUDE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ python -m pytest -q # full suite
1313
python -m pytest tests/unit/test_runner.py -q # one file
1414
python -m pytest tests/unit/test_state.py::test_name -q # one test
1515

16-
pylings --root tests/fixtures/passing_curriculum verify # smoke-test: all solutions pass their checks
16+
pythonlings --root tests/fixtures/passing_curriculum verify # smoke-test: all solutions pass their checks
1717

1818
python -m build # sdist + wheel
1919
```
2020

21-
Manual testing of flows: `pylings init --path ./learn-python` (create a learner workspace), `pylings` (TUI), `pylings run variables1`, `pylings dry-run variables1`, `pylings solution variables1`, `pylings hint`, `pylings list`, `pylings topics`, `pylings reset`. `--root` points any command at an arbitrary workspace (used heavily by tests against `tests/fixtures/`).
21+
Manual testing of flows: `pythonlings init --path ./learn-python` (create a learner workspace), `pythonlings` (TUI), `pythonlings run variables1`, `pythonlings dry-run variables1`, `pythonlings solution variables1`, `pythonlings hint`, `pythonlings list`, `pythonlings topics`, `pythonlings reset`. `--root` points any command at an arbitrary workspace (used heavily by tests against `tests/fixtures/`).
2222

2323
## Architecture
2424

2525
Two distinct trees in this repo:
2626

27-
1. **The application**`pylings/` (installable package)
27+
1. **The application**`pythonlings/` (installable package)
2828
2. **The curriculum** — repo-root `exercises/`, `checks/`, `solutions/`, and `info.toml`
2929

30-
At build time, hatch `force-include` maps the curriculum into the wheel as `pylings/curriculum/` (see `pyproject.toml`). `pylings init` copies that bundled curriculum into a self-contained learner workspace; progress lives in `<workspace>/.pylings/state.json` (written atomically, with `.bak` recovery on corruption).
30+
At build time, hatch `force-include` maps the curriculum into the wheel as `pythonlings/curriculum/` (see `pyproject.toml`). `pythonlings init` copies that bundled curriculum into a self-contained learner workspace; progress lives in `<workspace>/.pythonlings/state.json` (written atomically, with `.bak` recovery on corruption).
3131

3232
### Curriculum model
3333

@@ -38,7 +38,7 @@ Each exercise is a triple that must stay in sync, plus a manifest entry:
3838
- `solutions/<name>.py` — reference answer
3939
- `info.toml` — ordered `[[exercises]]` entries with `name`, `path`, `hint`, `docs` URL; this file is the source of truth for exercise order and topics
4040

41-
When changing curriculum, update all four, then run the relevant tests plus `pylings --root tests/fixtures/passing_curriculum verify`. Exercise names are topic + ordinal (`variables1`, `collections10`).
41+
When changing curriculum, update all four, then run the relevant tests plus `pythonlings --root tests/fixtures/passing_curriculum verify`. Exercise names are topic + ordinal (`variables1`, `collections10`).
4242

4343
### How checks run (`core/runner.py`)
4444

@@ -47,8 +47,8 @@ An exercise passes when a generated runner script `exec()`s the exercise source
4747
### Layering
4848

4949
- `pythonlings/core/` — all filesystem, manifest, state, reset, solutions, and runner logic. No UI imports. (Checks rerun on a debounce in the TUI editor, not a filesystem watcher.)
50-
- `pylings/screens/` and `pylings/widgets/` — Textual UI only; `pylings/app.py` wires them up; `pylings.tcss` holds styles.
51-
- `pylings/cli.py` — argparse subcommands; entry point `pylings = "pylings.cli:main"`.
50+
- `pythonlings/screens/` and `pythonlings/widgets/` — Textual UI only; `pythonlings/app.py` wires them up; `pythonlings.tcss` holds styles.
51+
- `pythonlings/cli.py` — argparse subcommands; entry point `pythonlings = "pythonlings.cli:main"`.
5252

5353
Keep UI behavior in screens/widgets and behavior logic in core — tests depend on this split (`tests/unit/` for core, `tests/integration/` for CLI/workspace flows, `tests/tui/` for Textual pilot tests, fixtures in `tests/fixtures/`).
5454

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cd learn-python && uvx pythonlings
2727
How it works: **edit** the broken exercise in the built-in editor → checks
2828
rerun as you type and advance you to the next one. That's the whole loop.
2929

30-
Status: `v0.3.0`, alpha — published on PyPI as `pythonlings`.
30+
Status: `v0.3.1`, alpha — published on PyPI as `pythonlings`.
3131

3232
![Coding screen](docs/assets/screenshots/coding-screen.png)
3333

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "pythonlings"
7-
version = "0.3.0"
7+
version = "0.3.1"
88
description = "Python learnings, Rustlings-style, in a terminal TUI."
99
readme = "Readme.md"
1010
requires-python = ">=3.9"

pythonlings/cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33

44
import argparse
55
import sys
6+
from importlib.metadata import PackageNotFoundError, version as _package_version
67
from pathlib import Path
78

8-
__version__ = "0.3.0"
9+
try:
10+
__version__ = _package_version("pythonlings")
11+
except PackageNotFoundError: # running from a source checkout without an install
12+
__version__ = "0.0.0+unknown"
913

1014

1115
def _build_parser() -> argparse.ArgumentParser:

0 commit comments

Comments
 (0)