Bring fp-py to the nativelite compliance floor (manifest, tests, CI guard) - #11
Merged
Conversation
- pyproject.toml (hatchling) with explicit dependencies = [] — the zero-dep guarantee is now machine-verifiable; version 0.1.0; MIT via LICENSE file - move fp/ -> src/fp/ per package-anatomy standard - expose fp.__version__ - coverage pinned dev-only under [project.optional-dependencies] Verified: pip install -e . succeeds; import fp, fp.__version__, python -m fp, and 64-char fingerprint all work; declared runtime deps are empty. Closes #4. Closes #9.
- tests/test_fingerprint.py: fingerprint determinism, get_components structure + fallbacks, machine_id per-platform branches, CLI (default + --components) - tests/test_client.py: get_fingerprint, post_fingerprint success/merge/ invalid-JSON(ValueError)/URLError/TimeoutError — all via mock, no live network - runnable with: python -m unittest discover -s tests Verified: 16 tests pass; coverage 93% (client.py 100%), above the 80% bar. Closes #5.
- tools/dep_guard.py: stdlib-only (tomllib + ast). Asserts pyproject dependencies == [] and scans src/fp imports against sys.stdlib_module_names; fails the build on any third-party runtime import. - .github/workflows/ci.yml: unittest across Python 3.9-3.13 + a dependency-guard job on 3.12. Verified locally: guard passes clean; fails (exit 1) on a planted 'import requests'. Closes #6.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4, #5, #6, #9.
Brings
fp-pyfrom "runtime is clean but nothing proves it" to a package that proves and enforces its nativelite compliance. Three tightly-coupled blockers landed as one reviewable unit (each depends on the previous):1. Packaging (#4, #9)
pyproject.toml(hatchling) with explicitdependencies = []— zero-dep is now machine-verifiable; version0.1.0; MIT viaLICENSE.src/fp/layout; exposefp.__version__.coverageis dev-only ([project.optional-dependencies]).2. Tests (#5)
unittestsuite (tests/), deterministic viamock— no live network.fingerprintdeterminism,get_componentsstructure + fallbacks,machine_idper-platform branches, the CLI, and everyfp.clientpath (success / merge / invalid-JSON / URLError / TimeoutError).python -m unittest discover -s tests.3. CI + dependency guard (#6)
tools/dep_guard.py— stdlib-only (tomllib+ast); asserts empty runtime deps and scans imports againstsys.stdlib_module_names..github/workflows/ci.yml— unittest matrix (3.9–3.13) + a guard job.How verified (clean venv, locally)
No runtime behavior changed — this is packaging, tests, and enforcement only.