doc: README and CLAUDE.md for the uv workflow; fix debug env var and platform claims
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,24 +4,25 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## What this is
|
||||
|
||||
`app_skellington` is a small Python library (published to PyPI) for building CLI applications. It has nothing runnable on its own. It glues together argparse-based multi-level command menus, name-based dependency injection, ConfigObj INI config with spec validation, and colorlog logging. It targets Python >=3.8 on Linux, Windows and Mac. Runtime deps are `appdirs`, `configobj` and `colorlog`.
|
||||
`app_skellington` is a small Python library (published to PyPI) for building CLI applications. It has nothing runnable on its own. It glues together argparse-based multi-level command menus, name-based dependency injection, ConfigObj INI config with spec validation, and colorlog logging. It targets Python >=3.8. Only Linux is tested; Windows and macOS are goals. Runtime deps are `appdirs`, `configobj` and `colorlog`.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
pip install -e '.[dev]' pytest # dev extras = ruff, pre-commit; pytest is NOT in the extras
|
||||
pytest tests # full suite from repo root (or `pytest .` from inside tests/)
|
||||
pytest tests/cfg/test_cfg.py::TestConfig_e2e::test_uses_spec_as_defaults # single test
|
||||
pytest tests -k "<keyword>"
|
||||
uv sync # .venv with the package (editable) + dev group: ruff, pytest, pre-commit, pyyaml
|
||||
uv run pytest # full suite (testpaths = tests)
|
||||
uv run pytest tests/cfg/test_cfg.py::TestConfig_e2e::test_uses_spec_as_defaults # single test
|
||||
uv run pytest -k "<keyword>"
|
||||
uv run --python 3.8 pytest # any supported Python; uv.lock forks per version
|
||||
|
||||
ruff check --fix # lint + import sorting (config in pyproject.toml)
|
||||
ruff format # formatter, line length 88
|
||||
uv run ruff check --fix # lint + import sorting (config in pyproject.toml)
|
||||
uv run ruff format # formatter, line length 88
|
||||
|
||||
python -m build # sdist + wheel into dist/
|
||||
python -m setuptools_scm # print the version the build will get
|
||||
uv build # sdist + wheel into dist/; the version shows in the file names
|
||||
uv lock # after any dependency change; commit uv.lock
|
||||
```
|
||||
|
||||
- **Versioning is tag-driven.** setuptools_scm uses `release-branch-semver` and derives the version from the latest `vX.Y.Z` git tag. It writes `app_skellington/_version.py` at build time. That file is tracked, but don't hand-edit it. `pip install -e .` also rewrites it, so `git restore` it rather than committing the churn. A release means tagging, then `python -m build`, then `twine upload dist/*`. The README covers the full publish steps.
|
||||
- **Versioning is tag-driven.** setuptools_scm uses `release-branch-semver` and derives the version from the latest `vX.Y.Z` git tag. It generates `app_skellington/_version.py`, which is git-ignored, so never commit it. The release steps (tag on `main`, `uv build`, TestPyPI, verify, PyPI) are in the README's Publish section.
|
||||
- **ruff** handles formatting (88 columns) and lint (`E`, `F`, `W`, `I`). E501 is ignored on purpose, since the formatter owns line length. Keep the `ruff==` pin in `pyproject.toml` equal to the `rev:` in `.pre-commit-config.yaml`.
|
||||
- Tests cover only `cfg` (ConfigObj fixtures live in `tests/cfg/`) plus a CommandTree constructor smoke test. `tests/test_log.py` is empty.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user