Skip to content

release: prepare 3.0.0 so main can pass release.yml (no publish) - #541

Merged
JohnnyWilson16 merged 3 commits into
mainfrom
release/prepare-3.0.0-jwd
Nov 28, 2026
Merged

JohnnyWilson16 merged 3 commits into
mainfrom
release/prepare-3.0.0-jwd

Conversation

@JohnnyWilson16

Copy link
Copy Markdown
Contributor

What changed?

Main can now pass every job in release.yml up to the publish step. This PR does not tag or publish. A maintainer makes the release decision.

Two commits:

  1. style: fixes the 112 ruff check . errors that stop the release quality gate. No change to src/ behavior.
  2. release: sets the version to 3.0.0 and fixes the release scripts.
    • pyproject.toml is the one source of the version. The resolve step no longer parses __version__ with ast.literal_eval. The smoke job checks fd.__version__ against the resolved version.
    • The smoke scripts in release.yml and testpypi.yml no longer pass verbose=False.
    • The test job installs .[dev,migrate,docs]. Main has no ml extra. migrate brings libcst, which mypy and tests/test_migrate_codemod.py need.
    • New docs extra (same pins as 2.1.0). The online and large markers are registered.
    • docs/api-reference.md lists the 12 names that 3.x exports.
    • CHANGELOG has a [3.0.0] - Unreleased section with the breaking changes from 2.1.0. A Never released heading marks the 2.x entries that the 3.0 rewrite removed.
    • The pyproject description no longer claims a DuckDB backend.

Why?

PyPI has 2.1.0. The README documents the 3.x API on main. A new user who runs pip install freshdata-cleaner and copies the README quickstart gets:

TypeError: ColumnContract.__init__() got an unexpected keyword argument 'impute'

The fix is a 3.x release, but main cannot release:

Release step Failure on main (0e89722)
resolve ValueError: malformed node or string on line 15: <ast.Call object ...>
resolve 0.4.0 is already on PyPI (https://pypi.org/pypi/freshdata-cleaner/0.4.0/json returns 200)
test: install WARNING: freshdata-cleaner 0.4.0 does not provide the extra 'docs' (and 'ml')
test: ruff Found 112 errors.
test: mypy src/freshdata/cli/migrate.py:44: error: Class cannot subclass "VisitorBasedCodemodCommand" (has type "Any") (libcst not installed)
test: pytest ModuleNotFoundError: No module named 'libcst'. With libcst: ERROR: Unknown marker(s) in '-m' expression: large, online.
test: mkdocs not installed. With mkdocs: ERROR - mkdocstrings: freshdata.clean_csv could not be found
smoke TypeError: CleanConfig.__init__() got an unexpected keyword argument 'verbose'

How was it tested?

New check: tests/test_release_workflow.py. It reads the scripts out of release.yml and runs them offline.

Before (main + the new test file):

FAILED tests/test_release_workflow.py::test_version_is_newer_than_every_released_version
    AssertionError: assert (0, 4, 0) > (2, 1, 0)
FAILED tests/test_release_workflow.py::test_resolve_step_reads_the_version
    ValueError: malformed node or string on line 15: <ast.Call object at 0x1022cf790>
FAILED tests/test_release_workflow.py::test_smoke_script_runs_against_the_installed_package
    TypeError: CleanConfig.__init__() got an unexpected keyword argument 'verbose'
FAILED tests/test_release_workflow.py::test_release_pytest_markers_are_registered
    AssertionError: release.yml selects unregistered markers: {'large', 'online'}

After:

5 passed in 0.59s

The release test job, run by hand with Python 3.12 after pip install -e ".[dev,migrate,docs]" "numpy<2.5":

== ruff check .
All checks passed!
== mypy src/freshdata
Success: no issues found in 8 source files
== pytest -m 'not online and not large'
Required test coverage of 90% reached. Total coverage: 96.15%
99 passed, 1 warning in 6.78s
== mkdocs build --strict
mkdocs exit=0
INFO    -  Documentation built in 1.83 seconds

Build, twine check, and the release.yml smoke script in a new venv with the built wheel:

Successfully built freshdata_cleaner-3.0.0.tar.gz and freshdata_cleaner-3.0.0-py3-none-any.whl
freshdata_cleaner-3.0.0-py3-none-any.whl: PASSED
freshdata_cleaner-3.0.0.tar.gz: PASSED
freshdata 3.0.0
smoke ok: (3, 2)

scripts/audit_artifacts.py (the clean-room CI job): CLEANROOM_SMOKE_PASS: pandas and polars (eager and lazy) verified.

  • New unit tests added in tests/
  • Ran fast CI lane locally: pytest -m "not online and not large"
  • Ran linting and type checks: ruff check . and mypy src/freshdata

Any performance impact?

  • None / negligible

Any compatibility concerns?

  • Deprecation or behavior change documented below:

The code on main does not change. The release does change behavior for PyPI users: 3.0.0 removes most of the 2.1.0 API. The [3.0.0] CHANGELOG section lists what goes and points to freshdata-migrate.

Before the tag:

  1. Replace Unreleased in ## [3.0.0] - Unreleased with the release date.
  2. Merge docs: make the README quickstart run with no edits, and check it in CI #539 (README quickstart) first, so the README on PyPI runs.
  3. The docs site still shows 2.x. docs.yml has its deploy trigger turned off. This PR does not change that.

Documentation updated?

  • Documentation updated in docs/ (api-reference.md)
  • Note added in CHANGELOG.md

release.yml runs `ruff check .` before it builds. On main that step
fails with 112 errors, so no release can pass it.

- `ruff check --fix`, then `--unsafe-fixes`. The unsafe fixes here keep
  behavior: `int(round(x))` to `round(x)`, `zip(..., strict=False)`,
  and `_` prefixes on unused unpacked names.
- Hand fixes for the last 20: ClassVar annotations, loop variables bound
  in benchmark lambdas, an en dash, and `pytest.raises(FrozenInstanceError)`
  in place of `pytest.raises(Exception)`.
- examples/ may use scikit-learn's `X` name (N803, N806).

No change to src/ behavior. mypy is clean. The suite passes.
PyPI has 2.1.0. The README documents the 3.x API on main, so a user
who runs `pip install freshdata-cleaner` gets an API the README does
not describe. Main cannot release today:

- pyproject says 0.4.0, and PyPI already has 0.4.0.
- The resolve step reads `__version__` with ast.literal_eval. Main sets
  it with importlib.metadata, so the step stops with ValueError.
- The test job asks for extras that main does not have (ml, docs). Its
  `pytest -m` names markers that pytest does not know. mkdocs stops on
  docs/api-reference.md, which names 2.x functions.
- The smoke job calls `fd.clean(..., verbose=False)`. 3.x has no
  `verbose`.

Changes:

- version 3.0.0, and a 3.0.0 CHANGELOG section that lists the breaking
  changes from 2.1.0. Entries for 2.x work that never shipped are marked.
- pyproject.toml is the one source of the version. The smoke job now
  checks `fd.__version__` against the resolved version.
- A docs extra, registered online/large markers, and an API reference
  page for the 12 names that 3.x exports.
- The pyproject description no longer claims a DuckDB backend.
- tests/test_release_workflow.py runs the release scripts offline.

This commit does not tag or publish.
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 209a4ecb-81a4-4bb7-a895-90baa00e1e62
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

The 3.0.0 section gets its release date before the tag. The release
check compared the version with every dated CHANGELOG entry, so the
dated 3.0.0 entry made it fail: assert (3, 0, 0) > (3, 0, 0). The check
now compares only with entries for older versions.
@JohnnyWilson16
JohnnyWilson16 merged commit c386c8d into main Nov 28, 2026
15 checks passed
@JohnnyWilson16
JohnnyWilson16 deleted the release/prepare-3.0.0-jwd branch November 28, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant