nc-gcode-interpreter 0.1.10__tar.gz → 0.1.12__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 (73) hide show
  1. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/.github/workflows/build-and-release.yml +30 -15
  2. nc_gcode_interpreter-0.1.12/Cargo.lock +3754 -0
  3. nc_gcode_interpreter-0.1.12/Cargo.toml +20 -0
  4. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/Development.md +6 -6
  5. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/PKG-INFO +1 -1
  6. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/TODO.md +3 -2
  7. nc_gcode_interpreter-0.1.12/examples/axis_index_assignment.csv +5 -0
  8. nc_gcode_interpreter-0.1.12/examples/axis_index_assignment.mpf +7 -0
  9. nc_gcode_interpreter-0.1.12/examples/function_calls.csv +3 -0
  10. nc_gcode_interpreter-0.1.12/examples/r_param.csv +3 -0
  11. nc_gcode_interpreter-0.1.12/examples/r_param.mpf +4 -0
  12. nc_gcode_interpreter-0.1.12/examples/repeat.csv +9 -0
  13. nc_gcode_interpreter-0.1.12/examples/repeat.mpf +6 -0
  14. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/variables.csv +1 -0
  15. nc_gcode_interpreter-0.1.12/examples/variables.mpf +6 -0
  16. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/pyproject.toml +1 -1
  17. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/nc_gcode_interpreter/__init__.py +9 -0
  18. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/nc_gcode_interpreter/_internal.pyi +6 -0
  19. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/tests/test_expected_output.py +5 -2
  20. nc_gcode_interpreter-0.1.12/python/tests/test_flags.py +18 -0
  21. nc_gcode_interpreter-0.1.12/src/errors.rs +150 -0
  22. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/grammar.pest +37 -26
  23. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/interpret_rules.rs +465 -114
  24. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/interpreter.rs +33 -21
  25. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/lib.rs +5 -1
  26. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/main.rs +51 -11
  27. nc_gcode_interpreter-0.1.12/src/state.rs +149 -0
  28. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/uv.lock +18 -106
  29. nc_gcode_interpreter-0.1.10/Cargo.lock +0 -2153
  30. nc_gcode_interpreter-0.1.10/Cargo.toml +0 -19
  31. nc_gcode_interpreter-0.1.10/examples/function_calls.csv +0 -3
  32. nc_gcode_interpreter-0.1.10/examples/variables.mpf +0 -4
  33. nc_gcode_interpreter-0.1.10/src/errors.rs +0 -59
  34. nc_gcode_interpreter-0.1.10/src/state.rs +0 -77
  35. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/.gitignore +0 -0
  36. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/CONTRIBUTING.md +0 -0
  37. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/LICENSE +0 -0
  38. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/README.md +0 -0
  39. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/arrays.csv +0 -0
  40. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/arrays.mpf +0 -0
  41. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/basic_math.csv +0 -0
  42. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/basic_math.mpf +0 -0
  43. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/custom_vars.csv +0 -0
  44. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/custom_vars.mpf +0 -0
  45. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/defaults.csv +0 -0
  46. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/defaults.mpf +0 -0
  47. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/for_loop.csv +0 -0
  48. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/for_loop.mpf +0 -0
  49. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/function_calls.mpf +0 -0
  50. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/if_statement.csv +0 -0
  51. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/if_statement.mpf +0 -0
  52. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/increment.csv +0 -0
  53. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/increment.mpf +0 -0
  54. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/loop.csv +0 -0
  55. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/loop.mpf +0 -0
  56. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/multiple_m_codes.csv +0 -0
  57. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/multiple_m_codes.mpf +0 -0
  58. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/simple.csv +0 -0
  59. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/simple.mpf +0 -0
  60. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/tool.csv +0 -0
  61. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/tool.mpf +0 -0
  62. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/trans.csv +0 -0
  63. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/examples/trans.mpf +0 -0
  64. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/ggroups/generate_modal_ggroups.py +0 -0
  65. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/ggroups/generate_pest.py +0 -0
  66. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/ggroups/ggroups.pest +0 -0
  67. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/example/minimal.py +0 -0
  68. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/nc_gcode_interpreter/ggroups.json +0 -0
  69. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/nc_gcode_interpreter/py.typed +0 -0
  70. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/python/tests/test_g_groups.py +0 -0
  71. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/rustfmt.toml +0 -0
  72. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/modal_groups.rs +0 -0
  73. {nc_gcode_interpreter-0.1.10 → nc_gcode_interpreter-0.1.12}/src/types.rs +0 -0
@@ -69,7 +69,7 @@ jobs:
69
69
  - name: Upload wheels
70
70
  uses: actions/upload-artifact@v4
71
71
  with:
72
- name: wheels-linux-${{ matrix.platform.target }}-py${{ matrix.python-version }}
72
+ name: wheels-${{ matrix.platform.runner }}-${{ matrix.platform.target }}-py${{ matrix.python-version }}-${{ github.sha }}
73
73
  path: dist
74
74
 
75
75
  test:
@@ -82,7 +82,7 @@ jobs:
82
82
  - uses: actions/checkout@v4
83
83
  - uses: actions/download-artifact@v4
84
84
  with:
85
- name: wheels-linux-x86_64-py${{ matrix.python-version }}
85
+ name: wheels-ubuntu-latest-x86_64-py${{ matrix.python-version }}-${{ github.sha }}
86
86
  path: dist
87
87
  - uses: actions/setup-python@v5
88
88
  with:
@@ -145,7 +145,7 @@ jobs:
145
145
  - name: Upload wheels
146
146
  uses: actions/upload-artifact@v4
147
147
  with:
148
- name: wheels-linux-${{ matrix.platform.target }}-py${{ matrix.python-version }}
148
+ name: wheels-${{ matrix.platform.runner }}-${{ matrix.platform.target }}-py${{ matrix.python-version }}-${{ github.sha }}
149
149
  path: dist
150
150
 
151
151
  windows:
@@ -202,7 +202,7 @@ jobs:
202
202
  - name: Upload wheels
203
203
  uses: actions/upload-artifact@v4
204
204
  with:
205
- name: wheels-windows-${{ matrix.platform.target }}-py${{ matrix.python-version }}
205
+ name: wheels-${{ matrix.platform.runner }}-${{ matrix.platform.target }}-py${{ matrix.python-version }}-${{ github.sha }}
206
206
  path: dist
207
207
 
208
208
  macos:
@@ -242,7 +242,7 @@ jobs:
242
242
  - name: Upload wheels
243
243
  uses: actions/upload-artifact@v4
244
244
  with:
245
- name: wheels-macos-${{ matrix.platform.target }}-py${{ matrix.python-version }}
245
+ name: wheels-${{ matrix.platform.runner }}-${{ matrix.platform.target }}-py${{ matrix.python-version }}-${{ github.sha }}
246
246
  path: dist
247
247
 
248
248
  sdist:
@@ -282,33 +282,48 @@ jobs:
282
282
  if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
283
283
  needs: [linux, linux-x64, windows, macos, sdist]
284
284
  permissions:
285
- # Use to sign the release artifacts
286
285
  id-token: write
287
- # Used to upload release artifacts
288
286
  contents: write
289
- # Used to generate artifact attestation
290
287
  attestations: write
291
288
  steps:
292
289
  - uses: actions/download-artifact@v4
290
+ with:
291
+ merge-multiple: true
292
+ path: dist
293
293
  - uses: actions/setup-python@v5
294
294
  with:
295
295
  python-version: 3.12
296
296
  - name: Generate artifact attestation
297
297
  uses: actions/attest-build-provenance@v1
298
298
  with:
299
- subject-path: 'wheels-*/*'
299
+ subject-path: 'dist/*'
300
300
  - name: Publish to PyPI
301
301
  if: startsWith(github.ref, 'refs/tags/')
302
302
  uses: PyO3/maturin-action@v1
303
303
  with:
304
304
  command: upload
305
- args: --non-interactive --skip-existing wheels-*/*
305
+ args: --non-interactive --skip-existing dist/*
306
+ - name: Prepare release assets
307
+ run: |
308
+ mkdir release-assets
309
+ cp dist/*.tar.gz release-assets/
310
+ cp dist/*.whl release-assets/
311
+ # Remove any duplicate files based on their content
312
+ cd release-assets
313
+ for f in *.whl; do
314
+ if [ -f "$f" ]; then
315
+ # Keep only one copy of each unique file
316
+ sha256sum "$f" | sort -u | while read -r sum file; do
317
+ others=$(sha256sum * | grep "$sum" | cut -d' ' -f2- | grep -v "^$file$" || true)
318
+ for other in $others; do
319
+ rm -f "$other"
320
+ done
321
+ done
322
+ fi
323
+ done
306
324
  - name: Upload to GitHub Release
307
325
  uses: softprops/action-gh-release@v2
308
326
  with:
309
- files: |
310
- wheels-sdist/*.tar.gz
311
- wheels-windows-*/*.whl
312
- wheels-linux-*/*.whl
313
- wheels-macos-*/*.whl
327
+ files: release-assets/*
328
+ fail_on_unmatched_files: false
314
329
  prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}