veny 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- veny-0.2.2/.github/dependabot.yml +10 -0
- veny-0.2.2/.github/workflows/release.yml +79 -0
- veny-0.2.2/.github/workflows/test.yml +79 -0
- veny-0.2.2/.gitignore +35 -0
- veny-0.2.2/.gitleaksignore +28 -0
- veny-0.2.2/.pre-commit-config.yaml +47 -0
- veny-0.2.2/CLAUDE.md +126 -0
- veny-0.2.2/LICENSE +201 -0
- veny-0.2.2/PKG-INFO +194 -0
- veny-0.2.2/PROGRESS.md +4089 -0
- veny-0.2.2/README.md +168 -0
- veny-0.2.2/RELEASING.md +119 -0
- veny-0.2.2/docs/prompts/2026-08-14-emmykit-json-type-registry.md +194 -0
- veny-0.2.2/docs/prompts/2026-08-14-utilities-adopt-emmykit-scripts.md +114 -0
- veny-0.2.2/docs/prompts/2026-08-15-emmykit-shell-alias-helpers-audit.md +91 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-12-module-alias-resolver.md +2076 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-12-module-alias-resolver.md.tasks.json +77 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-12-stdlib-index.md +1095 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-12-stdlib-index.md.tasks.json +66 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-14-emmykit-migration.md +1220 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-14-emmykit-migration.md.tasks.json +70 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-14-venv-cache-matching.md +2106 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-14-venv-cache-matching.md.tasks.json +81 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-15-delete-visitor-block.md +567 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-15-delete-visitor-block.md.tasks.json +48 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-15-packaged-entry-point.md +1309 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-15-packaged-entry-point.md.tasks.json +69 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-16-analysis-foundation.md +753 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-16-analysis-foundation.md.tasks.json +57 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-16-analysis-imports-and-call-graph.md +1000 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-16-analysis-imports-and-call-graph.md.tasks.json +66 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-16-uv-migration.md +940 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-16-uv-migration.md.tasks.json +84 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-18-classify-and-environment.md +551 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-18-classify-and-environment.md.tasks.json +47 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-18-verify-cache-search-last-used-wiring-index.md +145 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-18-verify-cache-search-last-used.md +2039 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-18-verify-cache-search-last-used.md.tasks.json +102 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-19-pipeline-and-cli-slimming-wiring-index.md +630 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-19-pipeline-and-cli-slimming.md +2284 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-19-pipeline-and-cli-slimming.md.tasks.json +99 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-21-last-used-persistence-wiring-index.md +382 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-21-last-used-persistence.md +1431 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-21-last-used-persistence.md.tasks.json +90 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-21-state-model-values-wiring-index.md +314 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-21-state-model-values.md +1765 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-21-state-model-values.md.tasks.json +94 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-23-behaviour-changes-4c-dead-arguments.md +25 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-23-behaviour-changes-4c-wiring-index.md +422 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-23-behaviour-changes-4c.md +1106 -0
- veny-0.2.2/docs/superpowers/plans/2026-08-23-behaviour-changes-4c.md.tasks.json +96 -0
- veny-0.2.2/docs/superpowers/specs/2026-08-12-module-alias-resolver-design.md +355 -0
- veny-0.2.2/docs/superpowers/specs/2026-08-12-stdlib-index-design.md +333 -0
- veny-0.2.2/docs/superpowers/specs/2026-08-14-emmykit-migration-design.md +235 -0
- veny-0.2.2/docs/superpowers/specs/2026-08-14-venv-cache-matching-design.md +416 -0
- veny-0.2.2/docs/superpowers/specs/2026-08-15-packaged-entry-point-design.md +346 -0
- veny-0.2.2/docs/superpowers/specs/2026-08-15-veny-rearchitecture-design.md +651 -0
- veny-0.2.2/pixi.lock +6098 -0
- veny-0.2.2/pixi.toml +154 -0
- veny-0.2.2/pyproject.toml +185 -0
- veny-0.2.2/scripts/differential_3d.py +699 -0
- veny-0.2.2/scripts/differential_3e.py +1103 -0
- veny-0.2.2/scripts/differential_4a.py +503 -0
- veny-0.2.2/scripts/differential_4b.py +1026 -0
- veny-0.2.2/scripts/differential_4c.py +803 -0
- veny-0.2.2/scripts/smoke-install.sh +68 -0
- veny-0.2.2/scripts/wiring_sweep_4a.py +354 -0
- veny-0.2.2/scripts/wiring_sweep_4b.py +487 -0
- veny-0.2.2/scripts/wiring_sweep_4c.py +522 -0
- veny-0.2.2/src/veny/__init__.py +5 -0
- veny-0.2.2/src/veny/__main__.py +10 -0
- veny-0.2.2/src/veny/alias_index.py +828 -0
- veny-0.2.2/src/veny/analysis/__init__.py +1 -0
- veny-0.2.2/src/veny/analysis/call_graph.py +177 -0
- veny-0.2.2/src/veny/analysis/custom_modules.py +256 -0
- veny-0.2.2/src/veny/analysis/imports.py +683 -0
- veny-0.2.2/src/veny/analysis/literals.py +229 -0
- veny-0.2.2/src/veny/analysis/scan.py +347 -0
- veny-0.2.2/src/veny/analysis/scan_state.py +30 -0
- veny-0.2.2/src/veny/cache_search.py +751 -0
- veny-0.2.2/src/veny/classify.py +275 -0
- veny-0.2.2/src/veny/cli.py +262 -0
- veny-0.2.2/src/veny/environment.py +312 -0
- veny-0.2.2/src/veny/last_used.py +188 -0
- veny-0.2.2/src/veny/pipeline.py +978 -0
- veny-0.2.2/src/veny/py.typed +0 -0
- veny-0.2.2/src/veny/pypi_client.py +314 -0
- veny-0.2.2/src/veny/settings.py +89 -0
- veny-0.2.2/src/veny/state.py +164 -0
- veny-0.2.2/src/veny/stdlib_index.py +233 -0
- veny-0.2.2/src/veny/venv_cache.py +465 -0
- veny-0.2.2/src/veny/verify.py +680 -0
- veny-0.2.2/tests/__init__.py +0 -0
- veny-0.2.2/tests/test_alias_index.py +662 -0
- veny-0.2.2/tests/test_cache_search.py +1425 -0
- veny-0.2.2/tests/test_call_graph.py +103 -0
- veny-0.2.2/tests/test_classify.py +924 -0
- veny-0.2.2/tests/test_cli_entry_point.py +1942 -0
- veny-0.2.2/tests/test_environment.py +263 -0
- veny-0.2.2/tests/test_import_collector.py +97 -0
- veny-0.2.2/tests/test_import_discovery.py +530 -0
- veny-0.2.2/tests/test_import_guard.py +77 -0
- veny-0.2.2/tests/test_imports.py +19 -0
- veny-0.2.2/tests/test_last_used.py +458 -0
- veny-0.2.2/tests/test_layering.py +384 -0
- veny-0.2.2/tests/test_literals.py +63 -0
- veny-0.2.2/tests/test_manifest_writing.py +501 -0
- veny-0.2.2/tests/test_pypi_client.py +320 -0
- veny-0.2.2/tests/test_rename_venv.py +80 -0
- veny-0.2.2/tests/test_split_imports.py +294 -0
- veny-0.2.2/tests/test_state_values.py +454 -0
- veny-0.2.2/tests/test_stdlib_index.py +150 -0
- veny-0.2.2/tests/test_uv_backend.py +786 -0
- veny-0.2.2/tests/test_venv_cache.py +305 -0
- veny-0.2.2/tests/test_venv_naming.py +45 -0
- veny-0.2.2/tests/test_verify.py +1506 -0
- veny-0.2.2/tests/test_wiring_4a.py +821 -0
- veny-0.2.2/tests/test_wiring_4b.py +869 -0
- veny-0.2.2/tests/wheels.py +47 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
|
|
3
|
+
updates:
|
|
4
|
+
# Keeps the SHA-pinned third-party action in release.yml current without
|
|
5
|
+
# anybody having to remember it exists. Dependabot rewrites the pin and
|
|
6
|
+
# updates the trailing version comment in the same PR.
|
|
7
|
+
- package-ecosystem: github-actions
|
|
8
|
+
directory: "/"
|
|
9
|
+
schedule:
|
|
10
|
+
interval: weekly
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v7
|
|
15
|
+
|
|
16
|
+
- uses: actions/setup-python@v7
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.13"
|
|
19
|
+
|
|
20
|
+
- name: Install build tooling
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --disable-pip-version-check --upgrade pip
|
|
23
|
+
python -m pip install --disable-pip-version-check build twine
|
|
24
|
+
|
|
25
|
+
- name: Build sdist and wheel
|
|
26
|
+
run: python -m build
|
|
27
|
+
|
|
28
|
+
# veny's version is a static string in src/veny/__init__.py, not derived
|
|
29
|
+
# from the tag, so the two can disagree: tag v0.2.3 while __init__.py
|
|
30
|
+
# still reads 0.2.2 and the build cheerfully produces veny-0.2.2. PyPI
|
|
31
|
+
# filenames are immutable, so publishing the wrong one burns that
|
|
32
|
+
# version number permanently. Fail here instead, before the publish job
|
|
33
|
+
# can run.
|
|
34
|
+
- name: Assert the tag matches __version__
|
|
35
|
+
run: |
|
|
36
|
+
set -euo pipefail
|
|
37
|
+
tag="${GITHUB_REF_NAME}"
|
|
38
|
+
version="$(python -c 'import sys; sys.path.insert(0, "src"); import veny; print(veny.__version__)')"
|
|
39
|
+
echo "tag=${tag} __version__=${version}"
|
|
40
|
+
if [ "${tag}" != "v${version}" ]; then
|
|
41
|
+
echo "::error::tag ${tag} does not match veny.__version__ ${version} (expected v${version})"
|
|
42
|
+
exit 1
|
|
43
|
+
fi
|
|
44
|
+
test -f "dist/veny-${version}.tar.gz"
|
|
45
|
+
test -f "dist/veny-${version}-py3-none-any.whl"
|
|
46
|
+
|
|
47
|
+
# veny is pure Python. A platform-tagged wheel here would mean something
|
|
48
|
+
# went wrong in the build, and would publish an artifact most users
|
|
49
|
+
# could not install.
|
|
50
|
+
- name: Assert the wheel is pure Python
|
|
51
|
+
run: |
|
|
52
|
+
set -euo pipefail
|
|
53
|
+
ls dist/
|
|
54
|
+
test -n "$(ls dist/*-py3-none-any.whl)"
|
|
55
|
+
|
|
56
|
+
- name: twine check
|
|
57
|
+
run: python -m twine check --strict dist/*
|
|
58
|
+
|
|
59
|
+
- uses: actions/upload-artifact@v7
|
|
60
|
+
with:
|
|
61
|
+
name: dist
|
|
62
|
+
path: dist/
|
|
63
|
+
if-no-files-found: error
|
|
64
|
+
|
|
65
|
+
publish:
|
|
66
|
+
needs: build
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
environment: pypi
|
|
69
|
+
permissions:
|
|
70
|
+
# Required for PyPI Trusted Publishing (OIDC). No API token exists.
|
|
71
|
+
id-token: write
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/download-artifact@v8
|
|
74
|
+
with:
|
|
75
|
+
name: dist
|
|
76
|
+
path: dist/
|
|
77
|
+
|
|
78
|
+
- name: Publish to PyPI
|
|
79
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: test-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v7
|
|
20
|
+
|
|
21
|
+
- uses: actions/setup-python@v7
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
|
|
25
|
+
# Pinned rather than floating. A new ruff minor can add rules that were
|
|
26
|
+
# not in the ruleset when main last went green, which would turn the
|
|
27
|
+
# default branch red without anybody changing any code. Bump this
|
|
28
|
+
# deliberately, alongside the pixi environment.
|
|
29
|
+
- name: Install ruff
|
|
30
|
+
run: python -m pip install --disable-pip-version-check ruff==0.16.1
|
|
31
|
+
|
|
32
|
+
- name: ruff check
|
|
33
|
+
run: ruff check .
|
|
34
|
+
|
|
35
|
+
- name: ruff format --check
|
|
36
|
+
run: ruff format --check .
|
|
37
|
+
|
|
38
|
+
# mypy is deliberately absent from this workflow. It does not currently pass
|
|
39
|
+
# on this tree, so gating CI on it would leave main permanently red and make
|
|
40
|
+
# every genuine failure invisible. Reinstate it as a job here once the
|
|
41
|
+
# outstanding errors are cleared.
|
|
42
|
+
|
|
43
|
+
test:
|
|
44
|
+
runs-on: ${{ matrix.os }}
|
|
45
|
+
strategy:
|
|
46
|
+
fail-fast: false
|
|
47
|
+
matrix:
|
|
48
|
+
# Every supported minor on Linux; the ceiling only on macOS.
|
|
49
|
+
#
|
|
50
|
+
# windows-latest is not in this matrix. environment.py resolves
|
|
51
|
+
# Scripts/python.exe correctly, but state.py builds its venv
|
|
52
|
+
# interpreter path as `bin/python` unconditionally, so the suite would
|
|
53
|
+
# not pass there. Adding Windows is a one-line change here once that
|
|
54
|
+
# is fixed -- leaving it out is honest, leaving it in would be red.
|
|
55
|
+
os: [ubuntu-latest]
|
|
56
|
+
python-version: ["3.12", "3.13"]
|
|
57
|
+
include:
|
|
58
|
+
- os: macos-latest
|
|
59
|
+
python-version: "3.13"
|
|
60
|
+
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@v7
|
|
63
|
+
|
|
64
|
+
- uses: actions/setup-python@v7
|
|
65
|
+
with:
|
|
66
|
+
python-version: ${{ matrix.python-version }}
|
|
67
|
+
|
|
68
|
+
# Installing the project (rather than only putting src/ on the path)
|
|
69
|
+
# brings in emmykit and uv, which the suite needs: the environment and
|
|
70
|
+
# verify tests drive a real uv, and cli.py's import-time guard reads
|
|
71
|
+
# emmykit.__version__.
|
|
72
|
+
- name: Install veny and pytest
|
|
73
|
+
run: |
|
|
74
|
+
python -m pip install --disable-pip-version-check --upgrade pip
|
|
75
|
+
python -m pip install --disable-pip-version-check -e .
|
|
76
|
+
python -m pip install --disable-pip-version-check pytest
|
|
77
|
+
|
|
78
|
+
- name: Run the test suite
|
|
79
|
+
run: python -m pytest
|
veny-0.2.2/.gitignore
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.claude-project-id
|
|
2
|
+
|
|
3
|
+
.sandbox_settings.json
|
|
4
|
+
|
|
5
|
+
# Python bytecode and caches
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*.egg-info/
|
|
9
|
+
|
|
10
|
+
# Tool caches
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.mypy_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
|
|
17
|
+
# pixi environment (recreate with `pixi install`; pixi.lock is the record)
|
|
18
|
+
.pixi/
|
|
19
|
+
|
|
20
|
+
# veny run byproducts: the custom-module cache it pickles into the working
|
|
21
|
+
# directory, and the log directory it creates. Both are per-run state.
|
|
22
|
+
.veny_custom_modules_*.pkl
|
|
23
|
+
logs/
|
|
24
|
+
|
|
25
|
+
# superpowers subagent-driven-development scratch workspace
|
|
26
|
+
.superpowers/
|
|
27
|
+
|
|
28
|
+
# Packaging build outputs
|
|
29
|
+
dist/
|
|
30
|
+
build/
|
|
31
|
+
|
|
32
|
+
# Local Claude Code harness config -- session hooks and settings for whoever
|
|
33
|
+
# happens to be driving the agent, not something this project ships. CLAUDE.md
|
|
34
|
+
# at the repo root IS tracked: it is the project's own instructions.
|
|
35
|
+
.claude/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# gitleaks allowlist.
|
|
2
|
+
#
|
|
3
|
+
# Every entry below is a confirmed false positive, affirmed individually
|
|
4
|
+
# during the repository's publication audit on 2026-08-23 (gitleaks 8.30.1).
|
|
5
|
+
#
|
|
6
|
+
# The first three are all the same string: a Python standard-library module
|
|
7
|
+
# name (the `pygram` submodule of `lib2to3`) appearing inside a hard-coded
|
|
8
|
+
# list of stdlib module names, next to its `pgen2.tokenize` sibling.
|
|
9
|
+
# gitleaks' generic-api-key rule flags it on Shannon entropy alone (3.807),
|
|
10
|
+
# with no credential-shaped context anywhere near it. It is not a secret and
|
|
11
|
+
# there is nothing to rotate.
|
|
12
|
+
#
|
|
13
|
+
# The fingerprints are commit-scoped, so they were generated after the
|
|
14
|
+
# git-filter-repo mailmap pass that rewrote every commit SHA. If history is
|
|
15
|
+
# ever rewritten again, re-run gitleaks and refresh these lines.
|
|
16
|
+
|
|
17
|
+
8e2b34fb1095b8c11c25835772746d069bbb3e69:veny.py:generic-api-key:486
|
|
18
|
+
29b95077d93d63f5db4d430801e0fb5b80d39d27:mypy.py:generic-api-key:476
|
|
19
|
+
380df7d401ceb83b77e9458329a80970ed6af02f:mypy.py:generic-api-key:447
|
|
20
|
+
|
|
21
|
+
# The fourth entry is this file flagging itself. The first version of this
|
|
22
|
+
# allowlist (commit 5722027) quoted the offending module names verbatim while
|
|
23
|
+
# explaining them, which gitleaks then detected as a fourth leak -- in the
|
|
24
|
+
# very file written to silence the first three. The comment above no longer
|
|
25
|
+
# spells the pair out, so nothing new triggers it, but that first commit's
|
|
26
|
+
# blob is immutable and a history scan still reaches it.
|
|
27
|
+
|
|
28
|
+
5722027ccf6ffb07f8c784af41fe19f57c94a2b3:.gitleaksignore:generic-api-key:9
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: local
|
|
3
|
+
hooks: # On macOS, pixi-installed tools (pytest, ruff, mypy) can fail due to shebang path resolution issues. Using python -m <tool> bypasses this reliably.
|
|
4
|
+
- id: ruff
|
|
5
|
+
name: ruff
|
|
6
|
+
entry: pixi run python -m ruff check --fix
|
|
7
|
+
language: system
|
|
8
|
+
types: [python]
|
|
9
|
+
- id: ruff-format
|
|
10
|
+
name: ruff-format
|
|
11
|
+
entry: pixi run python -m ruff format
|
|
12
|
+
language: system
|
|
13
|
+
types: [python]
|
|
14
|
+
- id: mypy
|
|
15
|
+
name: mypy
|
|
16
|
+
entry: pixi run python -m mypy .
|
|
17
|
+
language: system
|
|
18
|
+
types: [python]
|
|
19
|
+
pass_filenames: false
|
|
20
|
+
|
|
21
|
+
# Built-in pygrep — no remote pre-commit-hooks dep, no network.
|
|
22
|
+
# Real conflict markers: `<<<<<<< <ref>` and `>>>>>>> <ref>` (with
|
|
23
|
+
# trailing space) and `=======` *alone on a line*. The bare-`=======`
|
|
24
|
+
# form would otherwise false-positive on pytest's `======== … ========`
|
|
25
|
+
# header lines (>7 equals followed by text), so we anchor it $.
|
|
26
|
+
- id: check-merge-conflict
|
|
27
|
+
name: check-merge-conflict
|
|
28
|
+
entry: '^(<<<<<<< |>>>>>>> |={7}$)'
|
|
29
|
+
language: pygrep
|
|
30
|
+
|
|
31
|
+
# Local reimplementation of pre-commit-hooks' check-added-large-files
|
|
32
|
+
# (default maxkb=500 → 500000 bytes). System bash + wc only; bash's
|
|
33
|
+
# arithmetic context strips BSD-wc's leading whitespace so no tr needed.
|
|
34
|
+
- id: check-added-large-files
|
|
35
|
+
name: check-added-large-files (limit 500 KB)
|
|
36
|
+
entry: 'bash -c ''max=500000; rc=0; for f in "$@"; do sz=$(wc -c < "$f"); if (( sz > max )); then echo "$f: $sz bytes exceeds limit of $max" >&2; rc=1; fi; done; exit $rc'' --'
|
|
37
|
+
language: system
|
|
38
|
+
|
|
39
|
+
# Local reimplementation of pre-commit-hooks' check-toml. tomllib is
|
|
40
|
+
# stdlib in 3.11+; this template requires 3.12+. Routed through
|
|
41
|
+
# `pixi run python` so the env (and its Python) is the same one the
|
|
42
|
+
# other hooks use.
|
|
43
|
+
- id: check-toml
|
|
44
|
+
name: check-toml
|
|
45
|
+
entry: 'pixi run python -c ''import sys,tomllib;[tomllib.load(open(f,"rb")) for f in sys.argv[1:]]'''
|
|
46
|
+
language: system
|
|
47
|
+
types: [toml]
|
veny-0.2.2/CLAUDE.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Project: veny
|
|
2
|
+
|
|
3
|
+
## Session resume protocol (read this first, every session)
|
|
4
|
+
This project may be built across multiple sessions, and a session can die
|
|
5
|
+
mid-run. On **every** new or resumed session, before doing anything else:
|
|
6
|
+
|
|
7
|
+
1. Read `PROGRESS.md` at the repo root. It carries the index of the current
|
|
8
|
+
active work AND the project's running notebook of deferred items,
|
|
9
|
+
cross-cutting decisions, gotchas, and open questions. Read all of it.
|
|
10
|
+
2. Open the design doc and implementation plan that `PROGRESS.md` points to.
|
|
11
|
+
3. Run `git log --oneline -20` to see what is already committed.
|
|
12
|
+
4. Resume from the first unchecked task in the plan. **Do not** redo work
|
|
13
|
+
that is already committed.
|
|
14
|
+
|
|
15
|
+
If `PROGRESS.md` does not exist yet, you are at the very start of the
|
|
16
|
+
project; create it (with the headings described in the Durability rules
|
|
17
|
+
below, sections initially empty) as soon as a design or plan exists.
|
|
18
|
+
|
|
19
|
+
If Superpowers is installed and this project uses it, prefer its native
|
|
20
|
+
resume mechanism (`/superpowers-extended-cc:executing-plans <plan-path>`)
|
|
21
|
+
over reading `PROGRESS.md`'s **Current work** section by hand — that
|
|
22
|
+
command reads the plan's `.tasks.json` and picks up exactly where the
|
|
23
|
+
last session stopped. The other PROGRESS.md sections (deferred items,
|
|
24
|
+
decisions, gotchas, open questions) are NOT covered by Superpowers, so
|
|
25
|
+
read them either way.
|
|
26
|
+
|
|
27
|
+
## Durability rules (always)
|
|
28
|
+
- **Git is the source of truth, not the conversation.** Commit after every
|
|
29
|
+
completed task, with a clear message. Never end a step with completed
|
|
30
|
+
work left uncommitted.
|
|
31
|
+
- **Keep `PROGRESS.md` current.** The **Current work** block is an index
|
|
32
|
+
— point at the design doc, plan, and task tracker; do NOT duplicate the
|
|
33
|
+
task checklist into PROGRESS.md (link to the plan instead, so there's
|
|
34
|
+
one place to update task state). The other sections (deferred items,
|
|
35
|
+
cross-cutting decisions, gotchas, open questions) hold canonical content
|
|
36
|
+
that lives nowhere else; add to them as the project teaches you things
|
|
37
|
+
worth not forgetting. Refresh the "next action" line and commit
|
|
38
|
+
PROGRESS.md after each task.
|
|
39
|
+
- **Persist the brainstorm as it forms.** During brainstorming, append
|
|
40
|
+
each validated design section to the design doc and commit it — never
|
|
41
|
+
leave the agreed design only in the conversation.
|
|
42
|
+
- **Migrate, don't duplicate.** When a deferred item or open question
|
|
43
|
+
becomes active work, move it out of PROGRESS.md into the new design/plan
|
|
44
|
+
rather than leaving a copy behind.
|
|
45
|
+
|
|
46
|
+
## Environment & tools
|
|
47
|
+
|
|
48
|
+
- Use `rg` instead of `grep`, `fd` instead of `find`.
|
|
49
|
+
|
|
50
|
+
## Workspace scaffolding
|
|
51
|
+
|
|
52
|
+
This project has already been scaffolded. The following files
|
|
53
|
+
already exist and should NOT be recreated:
|
|
54
|
+
|
|
55
|
+
- `pyproject.toml` — project metadata + ruff/mypy/pytest/coverage config
|
|
56
|
+
- `pixi.toml` — pixi workspace with dev dependencies (ruff, mypy, pytest, pytest-cov, pre-commit)
|
|
57
|
+
- `.pre-commit-config.yaml` — pre-commit hooks (ruff, ruff-format, mypy, trailing-whitespace, end-of-file-fixer, etc.)
|
|
58
|
+
- `.gitignore` — standard Python ignores
|
|
59
|
+
|
|
60
|
+
**Do NOT run `pixi init` or `pre-commit sample-config`.**
|
|
61
|
+
|
|
62
|
+
## Project layout
|
|
63
|
+
|
|
64
|
+
Use a `src/` layout:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
src/
|
|
68
|
+
<package_name>/
|
|
69
|
+
__init__.py
|
|
70
|
+
__main__.py
|
|
71
|
+
...
|
|
72
|
+
tests/
|
|
73
|
+
__init__.py
|
|
74
|
+
test_*.py
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
The package name should be the project name normalized to a valid Python identifier
|
|
78
|
+
(lowercase, spaces/hyphens replaced with underscores).
|
|
79
|
+
|
|
80
|
+
## Running tools
|
|
81
|
+
|
|
82
|
+
All dev tools are installed via pixi. Use `pixi run` to invoke them:
|
|
83
|
+
|
|
84
|
+
- `pixi run test` — run tests (pytest)
|
|
85
|
+
- `pixi run lint` — lint (ruff check .)
|
|
86
|
+
- `pixi run format` — format (ruff format .)
|
|
87
|
+
- `pixi run typecheck` — type check (mypy .)
|
|
88
|
+
- `pixi run pre-commit run` — run pre-commit on staged files
|
|
89
|
+
- `pixi run pre-commit run --files <path>` — run pre-commit on specific files
|
|
90
|
+
- `pixi run pre-commit run --all-files` — run pre-commit on every file
|
|
91
|
+
- `pixi run pre-commit install` — install the git pre-commit hook
|
|
92
|
+
(`pre-commit` is only available via `pixi run` — no system binary)
|
|
93
|
+
|
|
94
|
+
To add a new dependency: `pixi add <package>`
|
|
95
|
+
To add a PyPI-only dependency: `pixi add --pypi <package>`
|
|
96
|
+
|
|
97
|
+
## Cross-platform conda gotchas
|
|
98
|
+
|
|
99
|
+
This project's `pixi.toml` lists `platforms = ["linux-64", "linux-aarch64", "osx-arm64", "osx-64"]`,
|
|
100
|
+
so `pixi install` must solve cleanly on macOS even when the actual run happens in
|
|
101
|
+
the Linux container. Some conda-forge packages have no `osx-arm64` build and will
|
|
102
|
+
fail resolution on macOS with `No candidates were found`. Move them into
|
|
103
|
+
`[target.linux-64.dependencies]` (already scaffolded into your `pixi.toml`)
|
|
104
|
+
instead of `[dependencies]`.
|
|
105
|
+
|
|
106
|
+
Symptom: `pixi add <pkg>` (or `pixi install`) fails with
|
|
107
|
+
`No candidates were found for <pkg>` while the package clearly exists on
|
|
108
|
+
conda-forge for linux-64.
|
|
109
|
+
|
|
110
|
+
Fix: edit `pixi.toml` to add the package under `[target.linux-64.dependencies]`,
|
|
111
|
+
then `pixi install`. Or use `pixi add --platform linux-64 <pkg>`.
|
|
112
|
+
|
|
113
|
+
Known offenders (non-exhaustive):
|
|
114
|
+
|
|
115
|
+
- `pngquant` — pulled in by `ocrmypdf`; together they force linux-64-only.
|
|
116
|
+
- `pytorch-cuda` — CUDA runtime, linux-only by design.
|
|
117
|
+
|
|
118
|
+
If you can swap to a lighter cross-platform alternative, prefer that
|
|
119
|
+
(e.g. `tesseract` + `pytesseract` + `pypdfium2` instead of `ocrmypdf`).
|
|
120
|
+
|
|
121
|
+
## First-time setup
|
|
122
|
+
|
|
123
|
+
Already done by the container entrypoint — git repo
|
|
124
|
+
initialized, git identity configured, dependencies
|
|
125
|
+
installed, pre-commit hooks active, initial scaffold
|
|
126
|
+
committed.
|
veny-0.2.2/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2024 Emmy Killett
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|