Skip to content

Prepare ULTK for release 0.1.0#73

Merged
shanest merged 6 commits intomainfrom
prepare-for-release
Mar 5, 2026
Merged

Prepare ULTK for release 0.1.0#73
shanest merged 6 commits intomainfrom
prepare-for-release

Conversation

@shanest
Copy link
Collaborator

@shanest shanest commented Mar 5, 2026

Summary

  • Packaging: bump version to 0.1.0 (PEP 440-compliant), add missing
    tqdm runtime dep, move dev-only tools (mypy, pytest, scipy-stubs)
    into [dependency-groups] dev, delete legacy setup.py shim that
    conflicted with the uv_build backend
  • Source fixes: update all_meanings(), Expression default,
    complement(), and draw_referent() to use the tuple-based Meaning API
    introduced in the FrozenDict refactor — these call sites were never updated
  • Test fixes: update all Meaning constructors in test_language.py and
    test_grammar.py to the tuple-based API; fix isAnimal helper; resolve a
    duplicate test_exp_subset method silently shadowing the positive-case test
  • CI: replace actions/setup-python + pip with astral-sh/setup-uv@v5
    • uv in all three workflows; target Python 3.13
  • Docs: update README.md and CLAUDE.md install/test instructions to
    use uv

Test plan

  • uv sync --group dev installs cleanly
  • uv run pytest src/tests/ -v — all 22 tests pass
  • uv build produces .whl and .tar.gz for v0.1.0
  • CI test workflow passes on push

## Packaging

- Bump version from invalid `0.0.1c` to PEP 440-compliant `0.1.0`
- Add `tqdm` to runtime dependencies (imported by `effcomm/optimization.py`
  and `language/sampling.py` but was missing from `pyproject.toml`)
- Move dev-only tools (`mypy`, `pytest`, `scipy-stubs`) out of `dependencies`
  and into a `[dependency-groups] dev` section so they are not installed by
  end-users of the library
- Delete `setup.py` legacy shim, which conflicted with the `uv_build` backend

## Source-code bug fixes

- `language/sampling.py` `all_meanings()`: fix `Meaning` construction to use
  the tuple-based API (boolean values indexed parallel to `universe.referents`)
  instead of passing a raw referent subset-tuple, which broke after the
  `FrozenDict`→tuple refactor
- `language/language.py` `Expression` default: replace
  `Meaning(FrozenDict(), ...)` with `Meaning(tuple(), ...)` and remove the
  now-unused `FrozenDict` import
- `language/grammar/grammar.py`:
  - `complement()`: replace the non-existent `.referents` attribute with
    `tuple(not val for val in self.meaning.mapping)`
  - `draw_referent()`: replace `.referents` attribute access with correct
    `zip(universe.referents, mapping)` iteration

## Test fixes

- `test_language.py`: replace all `FrozenDict({ref: bool})` `Meaning`
  constructors with `tuple(bool for ref in ...)`, fix `isAnimal` helper to
  iterate via `zip(universe.referents, mapping)` instead of dict `.items()`,
  rename duplicate `test_exp_subset` method to `test_exp_can_express_positive`
  so both positive and negative can_express tests actually run, remove unused
  `FrozenDict` import
- `test_grammar.py`: fix `goal_meaning` to use the tuple-based `Meaning` API

## CI workflows

- Replace `actions/setup-python` + `pip` with `astral-sh/setup-uv@v5` + `uv`
  in all three workflows (`test.yml`, `docs.yml`, `pypi-publish.yml`)
- `test.yml`: `uv sync --group dev` + `uv run pytest src/tests/`
- `docs.yml`: `uv sync` + `uv run pdoc ...`; upgrade to Python 3.13
- `pypi-publish.yml`: replace `python -m build` with `uv build`

## Documentation

- `README.md`: update install instructions to recommend `uv sync`, note
  Python 3.13 requirement, update testing section to use `uv run pytest`
- `CLAUDE.md`: update commands to use `uv sync --group dev` and
  `uv run pytest src/tests/`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 5, 2026 22:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prepares ULTK for the 0.1.0 release by aligning packaging/CI/docs with uv, and updating remaining call sites/tests to the tuple-based Meaning API so the codebase is consistent with the recent FrozenDict refactor.

Changes:

  • Bump package version to 0.1.0, add tqdm as a runtime dependency, and move dev tools into [dependency-groups].dev; remove legacy setup.py.
  • Update language/grammar code paths and tests to construct Meaning(mapping=tuple[...], universe=...) instead of legacy mapping forms.
  • Switch GitHub Actions workflows to astral-sh/setup-uv + uv commands; update README/CLAUDE guidance accordingly.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
uv.lock Reflects version bump, adds tqdm, and moves dev-only deps into a dev group.
src/ultk/language/sampling.py Updates all_meanings() to emit tuple-based Meaning mappings.
src/ultk/language/language.py Updates Expression default Meaning to tuple-based mapping.
src/ultk/language/grammar/grammar.py Updates complement()/draw_referent() to use Meaning.mapping booleans.
src/tests/test_language.py Updates test meanings to tuple mapping; fixes shadowed test name; updates helper logic.
src/tests/test_grammar.py Updates goal meaning construction to tuple mapping.
setup.py Removes legacy setuptools shim.
pyproject.toml Bumps version, adds tqdm, and introduces [dependency-groups].dev.
README.md Updates install/test instructions to use uv.
CLAUDE.md Adds repo-specific uv-based dev/test guidance.
.github/workflows/test.yml Uses uv sync --group dev + uv run pytest.
.github/workflows/pypi-publish.yml Uses uv build for distributions.
.github/workflows/docs.yml Uses uv sync + uv run pdoc to build docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

shanest and others added 4 commits March 5, 2026 14:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@shanest shanest merged commit 00f7a69 into main Mar 5, 2026
2 of 3 checks passed
@shanest shanest deleted the prepare-for-release branch March 5, 2026 23:26
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.

2 participants