mirror of
https://github.com/AlexsJones/llmfit.git
synced 2026-08-29 13:11:40 +00:00
* feat(python): scaffold in-repo PyPI packaging
Copied hatch_build.py, src/__init__.py, src/__main__.py, and tests/ from
the external llmfit-pypi repo into llmfit-python/. Created pyproject.toml
at the repo root (adapted from llmfit-pypi) with updated author, paths, and
non-standard source mapping for the gitignore-safe llmfit-python/src/ layout.
Created .github/workflows/pypi.yml to build and publish all 8 platform wheels
on tag push, mirroring the docker.yml trigger pattern.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(python): rewrite hatch_build.py to use in-repo binaries
hatch_build.py previously downloaded release binaries from GitHub at
wheel-build time, verifying SHA256 and fetching license via the GitHub
API (~267 lines). It now expects the pre-compiled binary to already
exist at target/<rust-target>/release/ and reads version and license
directly from Cargo.toml (~174 lines, no network calls).
This enables the new CI split in release.yml: each build matrix job
uploads its binary as a binary-<target> artifact, and a dedicated
publish-python job (ubuntu-latest only) downloads all of them and runs
uv build in a loop over platform tags before publishing to PyPI in a
single step. Wheel failures no longer block binary release assets.
Also removes the now-redundant standalone pypi.yml workflow, adds
license = "MIT" to Cargo.toml workspace.package, and relocates the
Python package source into src/llmfit/ to match hatch layout.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: add Python gitignore entries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: add Python code quality Makefile targets
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(python): respect LLMFIT_PYTHON_PLATFORM_TAG in editable installs
When the env var is set, look in target/{rust_target}/release/ (via the
renamed _find_binary_for_target) rather than the default host-native
paths (_find_local_binary). Also splits py_target_from_env / py_target
in initialize so the editable branch reuses the already-read value.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ci: add Python CI workflow and tighten Rust CI path filters
- Add python-ci.yml with cross-platform pytest job (gated on llmfit-python/
or pyproject.toml changes via dorny/paths-filter) and a lint/typecheck job
that also triggers on scripts/**/*.py changes
- Exclude llmfit-python/** from Rust CI path triggers
- Replace cryptic Cargo.*o* glob with explicit Cargo.{lock,toml}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: remove committed .pyc file from tracking
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: normalise ruff lint exception comment formatting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Ruff formatted these lines into one line
* Fix import ordering
* Move pyproject.toml and uv.lock into llmfit-python/
* Correct path to tested code
* Run checks without installing llmfit itself (which fails)
* chore: bump setup-python and setup-uv to latest versions
Upgrades actions/setup-python v5 → v6 and astral-sh/setup-uv v5 → v8.1.0
to resolve Node.js 20 deprecation warnings in CI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Disallow setting LLMFIT_PYTHON_PLATFORM_TAG on an editable build
* Improve inline comments in binary selection logic
* Move binary version check out of selection logic
* Always check that binary file exists
* Check all binaries before building wheels
* Set the execute bit that was lost by GitHub Actions
* Python CI downloads latest release binary instead of rebuilding Rust
Replaces the cargo build steps in the test job with a download of the
latest release archive from GitHub Releases, verified via SHA256.
LLMFIT_VERSION is set to the downloaded release version so the wheel
build does not conflict with an unreleased Cargo.toml bump.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* publish-python: use release file downloads instead of GHA artifacts
Removes the binary artifact upload/download mechanism. publish-python
now depends on the release job (not build) and downloads each archive
directly from GitHub Releases, verifying its checksum inline via pipe
before extracting the binary and building the wheel.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix typo in ci.yml comment: worfklows -> workflows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Accept optional v prefix in binary --version output
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Simplify BinaryNotFoundError to inherit only from LlmfitError
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add fmt-check target; use in check instead of fmt
Avoids `make check` unexpectedly modifying files on disk.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Split up checksum file to work around * in sha file on Windows
* Fix Windows zip extraction in Python CI workflow
Use unzip instead of tar to extract .zip archives on Windows, since
Git Bash's tar does not support the zip format.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Make llmfit binary version visible in CI tests
* Prevent multiline echo-on-Windows weirdness
* Consolidate CI workflows and add path-based job gating
Merges python-ci.yml into ci.yml. Adds a changes job using
dorny/paths-filter to detect whether Rust or Python files changed,
then gates fmt/clippy/check/check-python jobs accordingly via
job-level if conditions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Tell uv where the python project is
* Remove outdated sentence about LLMFIT_VERSION from docstring
* Run Python tests with debug binary in editable mode for max reuse with cargo test
* Control the working dir to control test discovery
* Run Python build system integration test when there are no Python changes
* Update comment
* Always run cargo build on macos
* Show contents of target/ (for debugging)
* Debug production of debug builds by cargo test
* Always run cargo build to get a debug build
* Only build debug binary for subsequent pytest
* Revert "Debug production of debug builds by cargo test"
This reverts commit
|
||
|---|---|---|
| .. | ||
| test_llmfit.py | ||