wrenchroom 0.1.0__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.
Files changed (137) hide show
  1. wrenchroom-0.1.0/.gitattributes +4 -0
  2. wrenchroom-0.1.0/.github/dependabot.yml +20 -0
  3. wrenchroom-0.1.0/.github/rulesets/main.json +89 -0
  4. wrenchroom-0.1.0/.github/workflows/ci.yml +98 -0
  5. wrenchroom-0.1.0/.github/workflows/nightly.yml +52 -0
  6. wrenchroom-0.1.0/.github/workflows/release.yml +94 -0
  7. wrenchroom-0.1.0/.gitignore +52 -0
  8. wrenchroom-0.1.0/.python-version +1 -0
  9. wrenchroom-0.1.0/LICENSE +202 -0
  10. wrenchroom-0.1.0/PKG-INFO +552 -0
  11. wrenchroom-0.1.0/README.md +522 -0
  12. wrenchroom-0.1.0/SECURITY.md +61 -0
  13. wrenchroom-0.1.0/docs/images/bracket-view.png +0 -0
  14. wrenchroom-0.1.0/docs/reference.md +299 -0
  15. wrenchroom-0.1.0/docs/releasing.md +66 -0
  16. wrenchroom-0.1.0/examples/bracket.py +88 -0
  17. wrenchroom-0.1.0/pyproject.toml +219 -0
  18. wrenchroom-0.1.0/scripts/golden.py +61 -0
  19. wrenchroom-0.1.0/scripts/lanes.py +124 -0
  20. wrenchroom-0.1.0/scripts/perf.py +119 -0
  21. wrenchroom-0.1.0/scripts/release.py +193 -0
  22. wrenchroom-0.1.0/scripts/three-entry.js +26 -0
  23. wrenchroom-0.1.0/scripts/vendor_three.py +135 -0
  24. wrenchroom-0.1.0/src/wrenchroom/__init__.py +42 -0
  25. wrenchroom-0.1.0/src/wrenchroom/assembly.py +317 -0
  26. wrenchroom-0.1.0/src/wrenchroom/checker.py +1751 -0
  27. wrenchroom-0.1.0/src/wrenchroom/cli.py +340 -0
  28. wrenchroom-0.1.0/src/wrenchroom/config.py +495 -0
  29. wrenchroom-0.1.0/src/wrenchroom/detect/__init__.py +237 -0
  30. wrenchroom-0.1.0/src/wrenchroom/detect/geometry.py +548 -0
  31. wrenchroom-0.1.0/src/wrenchroom/detect/names.py +550 -0
  32. wrenchroom-0.1.0/src/wrenchroom/detect/sidecar.py +151 -0
  33. wrenchroom-0.1.0/src/wrenchroom/engine/__init__.py +55 -0
  34. wrenchroom-0.1.0/src/wrenchroom/engine/exact.py +126 -0
  35. wrenchroom-0.1.0/src/wrenchroom/engine/mesh.py +493 -0
  36. wrenchroom-0.1.0/src/wrenchroom/engine/scene.py +209 -0
  37. wrenchroom-0.1.0/src/wrenchroom/fasteners.py +623 -0
  38. wrenchroom-0.1.0/src/wrenchroom/py.typed +0 -0
  39. wrenchroom-0.1.0/src/wrenchroom/pytest_plugin.py +109 -0
  40. wrenchroom-0.1.0/src/wrenchroom/report.py +645 -0
  41. wrenchroom-0.1.0/src/wrenchroom/solids.py +259 -0
  42. wrenchroom-0.1.0/src/wrenchroom/terminal.py +35 -0
  43. wrenchroom-0.1.0/src/wrenchroom/tools/__init__.py +6 -0
  44. wrenchroom-0.1.0/src/wrenchroom/tools/ball_end.py +158 -0
  45. wrenchroom-0.1.0/src/wrenchroom/tools/custom.py +447 -0
  46. wrenchroom-0.1.0/src/wrenchroom/tools/drivers.py +73 -0
  47. wrenchroom-0.1.0/src/wrenchroom/tools/hex_keys.py +211 -0
  48. wrenchroom-0.1.0/src/wrenchroom/tools/kits.py +293 -0
  49. wrenchroom-0.1.0/src/wrenchroom/tools/nut_drivers.py +119 -0
  50. wrenchroom-0.1.0/src/wrenchroom/tools/sizes.py +143 -0
  51. wrenchroom-0.1.0/src/wrenchroom/tools/sockets.py +166 -0
  52. wrenchroom-0.1.0/src/wrenchroom/tools/spanners.py +414 -0
  53. wrenchroom-0.1.0/src/wrenchroom/tools/sweep.py +361 -0
  54. wrenchroom-0.1.0/src/wrenchroom/tools/torx_keys.py +71 -0
  55. wrenchroom-0.1.0/src/wrenchroom/view/__init__.py +364 -0
  56. wrenchroom-0.1.0/src/wrenchroom/view/template.html +50 -0
  57. wrenchroom-0.1.0/src/wrenchroom/view/vendor/three.LICENSE +21 -0
  58. wrenchroom-0.1.0/src/wrenchroom/view/vendor/three.json +6 -0
  59. wrenchroom-0.1.0/src/wrenchroom/view/vendor/three.min.js +4221 -0
  60. wrenchroom-0.1.0/src/wrenchroom/view/viewer.css +75 -0
  61. wrenchroom-0.1.0/src/wrenchroom/view/viewer.js +388 -0
  62. wrenchroom-0.1.0/tests/conftest.py +31 -0
  63. wrenchroom-0.1.0/tests/fastener_models.py +88 -0
  64. wrenchroom-0.1.0/tests/fixture_models.py +124 -0
  65. wrenchroom-0.1.0/tests/golden/bench.detected.snapshot.json +2871 -0
  66. wrenchroom-0.1.0/tests/golden/bench.py +296 -0
  67. wrenchroom-0.1.0/tests/golden/bench.snapshot.json +2869 -0
  68. wrenchroom-0.1.0/tests/golden/bench.snapshot.md +87 -0
  69. wrenchroom-0.1.0/tests/golden/cells.py +1544 -0
  70. wrenchroom-0.1.0/tests/golden/conftest.py +38 -0
  71. wrenchroom-0.1.0/tests/golden/parts.py +98 -0
  72. wrenchroom-0.1.0/tests/golden/test_bench.py +260 -0
  73. wrenchroom-0.1.0/tests/golden/test_detected.py +200 -0
  74. wrenchroom-0.1.0/tests/golden/test_hand_room_bench.py +101 -0
  75. wrenchroom-0.1.0/tests/golden/test_kits_bench.py +133 -0
  76. wrenchroom-0.1.0/tests/golden/test_names_bench.py +60 -0
  77. wrenchroom-0.1.0/tests/golden/test_narrowed.py +32 -0
  78. wrenchroom-0.1.0/tests/golden/test_scale.py +121 -0
  79. wrenchroom-0.1.0/tests/golden/test_shapes_bench.py +118 -0
  80. wrenchroom-0.1.0/tests/golden/test_snapshot.py +37 -0
  81. wrenchroom-0.1.0/tests/golden/test_view_bench.py +140 -0
  82. wrenchroom-0.1.0/tests/golden/test_view_browser.py +389 -0
  83. wrenchroom-0.1.0/tests/golden/viewer_harness.cjs +146 -0
  84. wrenchroom-0.1.0/tests/test_agreement.py +214 -0
  85. wrenchroom-0.1.0/tests/test_api.py +78 -0
  86. wrenchroom-0.1.0/tests/test_assembly.py +103 -0
  87. wrenchroom-0.1.0/tests/test_ball_end.py +116 -0
  88. wrenchroom-0.1.0/tests/test_ball_end_only.py +130 -0
  89. wrenchroom-0.1.0/tests/test_candidates.py +272 -0
  90. wrenchroom-0.1.0/tests/test_check.py +202 -0
  91. wrenchroom-0.1.0/tests/test_clash.py +315 -0
  92. wrenchroom-0.1.0/tests/test_cli.py +296 -0
  93. wrenchroom-0.1.0/tests/test_config.py +163 -0
  94. wrenchroom-0.1.0/tests/test_corner_sweep.py +173 -0
  95. wrenchroom-0.1.0/tests/test_custom_tools.py +402 -0
  96. wrenchroom-0.1.0/tests/test_deciding.py +283 -0
  97. wrenchroom-0.1.0/tests/test_detect.py +332 -0
  98. wrenchroom-0.1.0/tests/test_detect_command.py +218 -0
  99. wrenchroom-0.1.0/tests/test_engine.py +287 -0
  100. wrenchroom-0.1.0/tests/test_fast_paths.py +100 -0
  101. wrenchroom-0.1.0/tests/test_fasteners.py +43 -0
  102. wrenchroom-0.1.0/tests/test_free_face.py +160 -0
  103. wrenchroom-0.1.0/tests/test_gland_dome.py +193 -0
  104. wrenchroom-0.1.0/tests/test_graze.py +281 -0
  105. wrenchroom-0.1.0/tests/test_hand_room.py +314 -0
  106. wrenchroom-0.1.0/tests/test_head_outline.py +178 -0
  107. wrenchroom-0.1.0/tests/test_hex_bands.py +296 -0
  108. wrenchroom-0.1.0/tests/test_imperial.py +182 -0
  109. wrenchroom-0.1.0/tests/test_inserts.py +285 -0
  110. wrenchroom-0.1.0/tests/test_kits.py +273 -0
  111. wrenchroom-0.1.0/tests/test_m2.py +209 -0
  112. wrenchroom-0.1.0/tests/test_markdown.py +403 -0
  113. wrenchroom-0.1.0/tests/test_mates.py +115 -0
  114. wrenchroom-0.1.0/tests/test_measure_cache.py +88 -0
  115. wrenchroom-0.1.0/tests/test_names.py +351 -0
  116. wrenchroom-0.1.0/tests/test_nut_drivers.py +133 -0
  117. wrenchroom-0.1.0/tests/test_only_pairs.py +94 -0
  118. wrenchroom-0.1.0/tests/test_open_end.py +156 -0
  119. wrenchroom-0.1.0/tests/test_pieces.py +187 -0
  120. wrenchroom-0.1.0/tests/test_pytest_plugin.py +234 -0
  121. wrenchroom-0.1.0/tests/test_readme.py +292 -0
  122. wrenchroom-0.1.0/tests/test_release.py +216 -0
  123. wrenchroom-0.1.0/tests/test_shape_reading.py +223 -0
  124. wrenchroom-0.1.0/tests/test_short_lines.py +111 -0
  125. wrenchroom-0.1.0/tests/test_shoulder.py +202 -0
  126. wrenchroom-0.1.0/tests/test_shoulder_outline.py +247 -0
  127. wrenchroom-0.1.0/tests/test_small_things.py +222 -0
  128. wrenchroom-0.1.0/tests/test_solids.py +179 -0
  129. wrenchroom-0.1.0/tests/test_spanner_lengths.py +199 -0
  130. wrenchroom-0.1.0/tests/test_sweeps.py +229 -0
  131. wrenchroom-0.1.0/tests/test_tables.py +161 -0
  132. wrenchroom-0.1.0/tests/test_terminal.py +230 -0
  133. wrenchroom-0.1.0/tests/test_torx.py +117 -0
  134. wrenchroom-0.1.0/tests/test_undersize.py +580 -0
  135. wrenchroom-0.1.0/tests/test_version.py +9 -0
  136. wrenchroom-0.1.0/tests/test_view.py +510 -0
  137. wrenchroom-0.1.0/uv.lock +1353 -0
@@ -0,0 +1,4 @@
1
+ # The three.js bundle the HTML view embeds is built by scripts/vendor_three.py, not
2
+ # written by hand: collapsed in diffs and left out of the language count. Its bytes
3
+ # are checked against a fresh build by `scripts/lanes.py vendor-check`.
4
+ src/wrenchroom/view/vendor/three.min.js linguist-generated linguist-vendored
@@ -0,0 +1,20 @@
1
+ # Keep the pinned GitHub Actions from going stale silently.
2
+ #
3
+ # Every third-party action in the workflows is pinned to a commit SHA, because a floating
4
+ # tag is a mutable reference to somebody else's code. But a SHA cannot look outdated, so
5
+ # Dependabot opens a pull request when an action moves and rewrites the SHA and the
6
+ # trailing tag comment: the pin survives and the staleness becomes visible.
7
+ #
8
+ # Actions only. Python dependencies are resolved by `uv.lock`, whose updates go through
9
+ # `uv lock --upgrade`; a second updater on the same file would fight it.
10
+ version: 2
11
+ updates:
12
+ - package-ecosystem: github-actions
13
+ directory: /
14
+ schedule:
15
+ interval: weekly
16
+ groups:
17
+ actions:
18
+ patterns: ["*"]
19
+ commit-message:
20
+ prefix: ci
@@ -0,0 +1,89 @@
1
+ {
2
+ "bypass_actors": [],
3
+ "conditions": {
4
+ "ref_name": {
5
+ "exclude": [],
6
+ "include": [
7
+ "~DEFAULT_BRANCH"
8
+ ]
9
+ }
10
+ },
11
+ "enforcement": "active",
12
+ "name": "main",
13
+ "rules": [
14
+ {
15
+ "type": "deletion"
16
+ },
17
+ {
18
+ "type": "non_fast_forward"
19
+ },
20
+ {
21
+ "type": "required_linear_history"
22
+ },
23
+ {
24
+ "parameters": {
25
+ "allowed_merge_methods": [
26
+ "rebase"
27
+ ],
28
+ "dismiss_stale_reviews_on_push": false,
29
+ "require_code_owner_review": false,
30
+ "require_extra_approval_for_unattributed_changes": true,
31
+ "require_last_push_approval": false,
32
+ "required_approving_review_count": 0,
33
+ "required_review_thread_resolution": false,
34
+ "required_reviewers": []
35
+ },
36
+ "type": "pull_request"
37
+ },
38
+ {
39
+ "parameters": {
40
+ "do_not_enforce_on_create": false,
41
+ "required_status_checks": [
42
+ {
43
+ "context": "gates",
44
+ "integration_id": 15368
45
+ },
46
+ {
47
+ "context": "fast (ubuntu-latest, 3.13)",
48
+ "integration_id": 15368
49
+ },
50
+ {
51
+ "context": "fast (ubuntu-latest, 3.14)",
52
+ "integration_id": 15368
53
+ },
54
+ {
55
+ "context": "fast (macos-latest, 3.13)",
56
+ "integration_id": 15368
57
+ },
58
+ {
59
+ "context": "fast (macos-latest, 3.14)",
60
+ "integration_id": 15368
61
+ },
62
+ {
63
+ "context": "perf (ubuntu-latest)",
64
+ "integration_id": 15368
65
+ },
66
+ {
67
+ "context": "perf (macos-latest)",
68
+ "integration_id": 15368
69
+ }
70
+ ],
71
+ "strict_required_status_checks_policy": false
72
+ },
73
+ "type": "required_status_checks"
74
+ },
75
+ {
76
+ "parameters": {
77
+ "code_scanning_tools": [
78
+ {
79
+ "alerts_threshold": "errors",
80
+ "security_alerts_threshold": "high_or_higher",
81
+ "tool": "CodeQL"
82
+ }
83
+ ]
84
+ },
85
+ "type": "code_scanning"
86
+ }
87
+ ],
88
+ "target": "branch"
89
+ }
@@ -0,0 +1,98 @@
1
+ # Continuous integration for wrenchroom.
2
+ #
3
+ # Every lane is invoked through `scripts/lanes.py`, never by spelling out a tool's
4
+ # command here. Two spellings of "how this project runs its checks" is how a flag
5
+ # exists locally and not in CI, or the other way round.
6
+ #
7
+ # Third-party actions are pinned to a commit SHA with the tag in a trailing comment.
8
+ # A floating tag is a mutable reference to somebody else's code with a token in scope.
9
+ # Dependabot keeps the pins from going stale silently; re-pin deliberately, reading the
10
+ # diff, rather than by moving the tag.
11
+ #
12
+ # Both Pythons the project claims (3.13 the floor, 3.14 current) and both platforms the
13
+ # CAD stack has wheels for in CI (Linux x86_64, macOS arm64). The OCP wheel is the
14
+ # headless `cadquery-ocp-novtk`, which is what lets this run on a runner at all.
15
+
16
+ name: ci
17
+
18
+ on:
19
+ push:
20
+ branches: [main]
21
+ pull_request:
22
+ workflow_dispatch:
23
+
24
+ permissions:
25
+ contents: read
26
+
27
+ concurrency:
28
+ group: ci-${{ github.workflow }}-${{ github.ref }}
29
+ cancel-in-progress: true
30
+
31
+ jobs:
32
+ # Static gates: ruff lint, ruff format, ty. Linux only; nothing these tools check is
33
+ # platform-dependent.
34
+ gates:
35
+ timeout-minutes: 15
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
39
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
40
+ with:
41
+ enable-cache: true
42
+ - run: uv python install
43
+ - run: uv sync --frozen
44
+ - run: uv run --frozen python scripts/lanes.py gates
45
+
46
+ # The unit suite on every platform and Python the project claims. The HTML view's
47
+ # tests use the Node and Chrome the runner images come with; under CI a missing
48
+ # one fails the run instead of skipping (tests/golden/test_view_browser.py).
49
+ fast:
50
+ timeout-minutes: 20
51
+ runs-on: ${{ matrix.os }}
52
+ strategy:
53
+ fail-fast: false
54
+ matrix:
55
+ os: [ubuntu-latest, macos-latest]
56
+ python: ["3.13", "3.14"]
57
+ steps:
58
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
59
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
60
+ with:
61
+ enable-cache: true
62
+ - run: uv python install ${{ matrix.python }}
63
+ - run: uv sync --frozen --python ${{ matrix.python }}
64
+ - run: uv run --frozen python scripts/lanes.py fast
65
+ env:
66
+ WRENCHROOM_ARTIFACTS: ${{ runner.temp }}/view
67
+ # The golden bench's HTML report and what headless Chrome drew of it, to open
68
+ # or look at; one copy per platform.
69
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
70
+ if: always() && matrix.python == '3.13'
71
+ with:
72
+ name: bench-view-${{ matrix.os }}
73
+ path: ${{ runner.temp }}/view
74
+ if-no-files-found: warn
75
+ retention-days: 14
76
+
77
+ # The speed target: the golden bench scaled to 500 fasteners, read and checked
78
+ # inside 10 s. The timing REPORTS for now (the perf-report lane writes it to
79
+ # the run summary and doesn't gate on it): hosted runners are slower and
80
+ # noisier than the laptop the target is set for. The verdict counts DO gate,
81
+ # so this is also a 500-fastener correctness run on every push. Once a few
82
+ # weeks of numbers show where the runners sit, switch to the gating perf lane
83
+ # with the budget those numbers support.
84
+ perf:
85
+ timeout-minutes: 20
86
+ runs-on: ${{ matrix.os }}
87
+ strategy:
88
+ fail-fast: false
89
+ matrix:
90
+ os: [ubuntu-latest, macos-latest]
91
+ steps:
92
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
93
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
94
+ with:
95
+ enable-cache: true
96
+ - run: uv python install 3.13
97
+ - run: uv sync --frozen --python 3.13
98
+ - run: uv run --frozen python scripts/lanes.py perf-report
@@ -0,0 +1,52 @@
1
+ # The golden bench against tomorrow's dependencies.
2
+ #
3
+ # The per-push lanes run `uv sync --frozen`: they prove this code against the lock.
4
+ # This one syncs with `--upgrade` first, so a new OCP or build123d that moves a
5
+ # bench verdict shows up here before a Dependabot PR lands it. It opens nothing and
6
+ # pushes nothing; a failure is just a red run for a person to read.
7
+ #
8
+ # Same SHA-pinning rule as ci.yml.
9
+
10
+ name: nightly
11
+
12
+ on:
13
+ schedule:
14
+ - cron: "41 3 * * *"
15
+ workflow_dispatch:
16
+
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ golden-upgraded:
22
+ timeout-minutes: 30
23
+ runs-on: ubuntu-latest
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ python: ["3.13", "3.14"]
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
31
+ with:
32
+ enable-cache: true
33
+ - run: uv python install ${{ matrix.python }}
34
+ - run: uv lock --upgrade
35
+ - run: uv sync --python ${{ matrix.python }}
36
+ - run: uv run python scripts/lanes.py golden
37
+
38
+ # The three.js the HTML view embeds, rebuilt from its pinned npm tarball (checked
39
+ # against the registry's sha512) by its pinned esbuild, and compared byte for byte
40
+ # with the committed bundle. Node comes with the runner image. A red run means the
41
+ # committed file is not what it claims to be, or a pinned source changed under it.
42
+ three-bundle:
43
+ timeout-minutes: 15
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
48
+ with:
49
+ enable-cache: true
50
+ - run: uv python install 3.13
51
+ - run: uv sync --frozen --python 3.13
52
+ - run: uv run --frozen python scripts/lanes.py vendor-check
@@ -0,0 +1,94 @@
1
+ # Release: build, prove and publish wrenchroom when a version tag is pushed.
2
+ #
3
+ # Publishing is PyPI's Trusted Publishing. PyPI trusts this workflow, by its file
4
+ # name (release.yml), in this repository, running in the `pypi` environment, through
5
+ # a short-lived OIDC token: no API token is stored anywhere. Renaming this file or
6
+ # the environment breaks publishing until the publisher on PyPI is changed to match.
7
+ #
8
+ # The `pypi` environment deploys only from `v*` tags and waits for a maintainer's
9
+ # approval. That approval is the one step that can't be undone: PyPI never takes the
10
+ # same version twice, so a bad release is yanked and followed, never replaced.
11
+ #
12
+ # Run by hand (workflow_dispatch), only the build job runs: a dry run of everything
13
+ # but the upload. docs/releasing.md has the steps.
14
+ #
15
+ # Actions are pinned to a commit SHA with the tag in a trailing comment, as in ci.yml.
16
+
17
+ name: release
18
+
19
+ on:
20
+ push:
21
+ tags: ["v*"]
22
+ workflow_dispatch:
23
+
24
+ permissions: {}
25
+
26
+ concurrency:
27
+ group: release-${{ github.ref }}
28
+ cancel-in-progress: false
29
+
30
+ jobs:
31
+ # The tag names the version; the sdist and wheel are built, checked, and the wheel
32
+ # run on the README's example in a clean environment (scripts/release.py).
33
+ build:
34
+ timeout-minutes: 20
35
+ runs-on: ubuntu-latest
36
+ permissions:
37
+ contents: read
38
+ steps:
39
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
40
+ with:
41
+ persist-credentials: false
42
+ - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
43
+ - run: uv python install
44
+ - run: uv sync --frozen
45
+ - run: uv run --frozen python scripts/lanes.py release-check
46
+ - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
47
+ with:
48
+ name: dist
49
+ path: dist/
50
+ if-no-files-found: error
51
+ retention-days: 30
52
+
53
+ # The upload, after a maintainer approves the `pypi` deployment. The token PyPI
54
+ # trusts exists only in this job, and the action attaches the files' provenance
55
+ # (PEP 740 attestations) as it uploads.
56
+ publish:
57
+ if: github.ref_type == 'tag'
58
+ needs: build
59
+ timeout-minutes: 15
60
+ runs-on: ubuntu-latest
61
+ environment:
62
+ name: pypi
63
+ url: https://pypi.org/project/wrenchroom/
64
+ permissions:
65
+ id-token: write
66
+ steps:
67
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
68
+ with:
69
+ name: dist
70
+ path: dist/
71
+ - uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
72
+
73
+ # The GitHub release for the tag, once PyPI has the files: the same files, and
74
+ # notes made from the pull requests merged since the last release.
75
+ github-release:
76
+ if: github.ref_type == 'tag'
77
+ needs: publish
78
+ timeout-minutes: 10
79
+ runs-on: ubuntu-latest
80
+ permissions:
81
+ contents: write
82
+ steps:
83
+ - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
84
+ with:
85
+ name: dist
86
+ path: dist/
87
+ - env:
88
+ GH_TOKEN: ${{ github.token }}
89
+ TAG: ${{ github.ref_name }}
90
+ run: |
91
+ pre=""
92
+ if [[ "$TAG" =~ (a|b|rc)[0-9]+$ ]]; then pre="--prerelease"; fi
93
+ gh release create "$TAG" dist/* --repo "$GITHUB_REPOSITORY" --verify-tag \
94
+ --title "wrenchroom ${TAG#v}" --generate-notes $pre
@@ -0,0 +1,52 @@
1
+ # Plans, scratch, reviews — never committed
2
+ _plans/
3
+ _tmp/
4
+ _reviews/
5
+ _reports/
6
+ # examples/ ships with the package (it's part of the docs) — deliberately NOT ignored.
7
+
8
+ # Python
9
+ __pycache__/
10
+ *.py[cod]
11
+ *.egg-info/
12
+ .eggs/
13
+ build/
14
+ dist/
15
+ *.so
16
+
17
+ # Envs & tooling caches
18
+ .venv/
19
+ venv/
20
+ env/
21
+ .uv-cache/
22
+ .pytest_cache/
23
+ .ruff_cache/
24
+ .ty_cache/
25
+ .mypy_cache/
26
+ .hypothesis/
27
+ .coverage
28
+ .coverage.*
29
+ htmlcov/
30
+ coverage.xml
31
+ # mutation lane (mutmut 3.x): the mutants/ working copy + the per-run generated config
32
+ mutants/
33
+ setup.cfg
34
+ .mutmut-cache
35
+ .benchmarks/
36
+
37
+ # OS / editor
38
+ .DS_Store
39
+ *.swp
40
+ .idea/
41
+ .vscode/
42
+
43
+ # AI Files
44
+ CLAUDE.md
45
+ GEMINI.md
46
+ .claude/
47
+
48
+ # What examples/ writes when run: generated, never committed
49
+ examples/*.step
50
+ examples/*.html
51
+ examples/*.json
52
+ examples/*.md
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.