Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[2026.09.7] - 2026-09-30¶
Added¶
- Documentation site is published:
ci.ymldeploys the built site to GitHub Pages frommain, and the repository homepage and[project.urls]point at it. - Development page covering setup, the
misetasks, testing, type checking, the docs build, pre-commit hooks, the release process, and the project layout.
Changed¶
- Project status is beta (
Development Status :: 4 - Beta). - The release workflow now stamps
[Unreleased]inCHANGELOG.mdwith the new CalVer version and date before tagging, so a released change never stays listed as "Unreleased". - Maintainer address in the package metadata, code of conduct, and beads export replaced with a placeholder.
Fixed¶
- Mermaid diagrams render.
zensical.tomloverrode Zensical's defaultcustom_fenceslist (which ships themermaidfence), so every diagram was emitted as a plain code block. - The generated dependency list on the credits page renders. The generator only
printed under
if __name__ == "__main__", butmarkdown-execruns it with a synthetic__name__and emits nothing when no output is produced. - Dropped a fabricated
.pyc-source cachefrom the architecture page; the package has a single content-hash cache.
[2026.09.6] - 2026-09-30¶
Added¶
-
Documentation overhaul: New
Architecturepage with two Mermaid pipeline diagrams (per-stage data flow and per-file work decomposition); newComparison with other toolspage positioningpyreorderagainstisort, RuffI001,undersort,ssort,sdsort, andABSort(with verified references to each tool's documented behavior); newArchitecture Decision Recordsdirectory underdocs/adr/with three ADRs covering the libcst parser choice (0001), the forward-reference barrier rule (0002), and thestepdowndefault strategy (0003). -
Project rename: clean-sort → pyreorder. New PyPI package name is
pyreorder(theclean-sortname is unreservable due to PyPI's ultranormalization filter colliding with the existingcleansortproject). The CLI command ispyreorder(short alias:rord); the import name ispyreorder; the source dir issrc/pyreorder/; the config table is[tool.pyreorder]; the disable directive is# pyreorder: off. The skill is renamed fromclean-sorttopyreorder. Legacycsort.*config/cache paths are auto-migrated bypyreorder.migrate; no other compatibility aliases are provided. -
runtime_setupsection: Module-level assignments to non-constant names (logger = get_logger(__name__),app = typer.Typer()) now group into a newruntime_setupbucket (default order: aftermodule_constants) instead of acting as barriers. An import below such a statement can now migrate up to the imports block. The forward-reference barrier is extended to coverruntime_setupassignments, preventingNameErrorfor assignments that reference later-defined names. -
pyreorder config generatesubcommand: produces a pyreorder.toml template from the current config schema. Supports--output FILE(must end in.toml),--with-comments(explanatory comments for each setting), and--with-config FILE(merges recognized values from an existing config; invalid/deprecated keys are dropped with warnings). The schema is now the single source of truth for recognized config keys. Replaces the oldpyreorder config init. -
Content-hash skip cache: pyreorder now caches sorted-output hashes keyed by
(config_signature, source_hash). On repeat runs, files whose content hash matches the cached sorted hash are skipped entirely (no parse, no sort). Default location:~/.cache/pyreorder/<project-slug>/cache.json. Configurable via[cli] cache_dir; disabled via[cli] cache = falseor--no-cache. Safe by construction: only skips files already in sorted state. -
Parallel file processing: pyreorder can sort files in parallel using a process pool (
parallel_backend = "process", default) or thread pool ("thread"). Configure via[cli] jobs(0 = serial, negative = autoint(0.75*cpu_count())) or--jobs/-jper-invocation. Stdin mode always runs serially. -
[discovery]config table: Persistent file-discovery options previously only available as CLI flags.exclude(glob list, merged with--excludeflags) andrecursive(bool, defaulttrue;--no-recursiveoverrides). -
--fail/--no-failCLI flag and[cli] fail_on_changedconfig: Control whetherpyreorder runexits non-zero when files are modified. Default remains exit 1 on change (pre-commit/CI friendly);--no-fail(or[cli] fail_on_changed = false) exits 0, useful when running pyreorder from a formatter task that always writes.pyreorder checkis unaffected. -
from __future__ import annotationsawareness: When the module hasfrom __future__ import annotations, annotation-only names inAnnAssignare excluded from the forward-reference check, since annotations are not evaluated at runtime. -
Initial project structure from copier-uv-plus.
Fixed¶
- Forward-reference barrier for module-level constants (issue #1): A
module-level constant whose RHS references a name defined in a later section
(e.g.
_DEFAULT_COLOR = Color.REDwhereColoris an enum) is now treated as a barrier — it stays in place rather than being hoisted tomodule_constants. This preventsNameErrorat import time.