BatchSlicer 0.9.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.
Files changed (100) hide show
  1. batchslicer-0.9.2/CHANGELOG.md +311 -0
  2. batchslicer-0.9.2/CONTRIBUTING.md +241 -0
  3. batchslicer-0.9.2/LICENSE +21 -0
  4. batchslicer-0.9.2/MANIFEST.in +5 -0
  5. batchslicer-0.9.2/PKG-INFO +1095 -0
  6. batchslicer-0.9.2/README.md +1062 -0
  7. batchslicer-0.9.2/config/config.example.yaml +44 -0
  8. batchslicer-0.9.2/docs/Architecture.md +460 -0
  9. batchslicer-0.9.2/docs/CodingStandards.md +59 -0
  10. batchslicer-0.9.2/docs/DataModel.md +41 -0
  11. batchslicer-0.9.2/docs/Modules.md +80 -0
  12. batchslicer-0.9.2/docs/Roadmap.md +106 -0
  13. batchslicer-0.9.2/docs/Startup.md +84 -0
  14. batchslicer-0.9.2/docs/Vision.md +55 -0
  15. batchslicer-0.9.2/pyproject.toml +78 -0
  16. batchslicer-0.9.2/requirements.txt +6 -0
  17. batchslicer-0.9.2/setup.cfg +4 -0
  18. batchslicer-0.9.2/src/BatchSlicer.egg-info/PKG-INFO +1095 -0
  19. batchslicer-0.9.2/src/BatchSlicer.egg-info/SOURCES.txt +98 -0
  20. batchslicer-0.9.2/src/BatchSlicer.egg-info/dependency_links.txt +1 -0
  21. batchslicer-0.9.2/src/BatchSlicer.egg-info/entry_points.txt +2 -0
  22. batchslicer-0.9.2/src/BatchSlicer.egg-info/requires.txt +7 -0
  23. batchslicer-0.9.2/src/BatchSlicer.egg-info/top_level.txt +1 -0
  24. batchslicer-0.9.2/src/batchslicer/__init__.py +1 -0
  25. batchslicer-0.9.2/src/batchslicer/__main__.py +6 -0
  26. batchslicer-0.9.2/src/batchslicer/app.py +1111 -0
  27. batchslicer-0.9.2/src/batchslicer/application/__init__.py +1 -0
  28. batchslicer-0.9.2/src/batchslicer/backends/__init__.py +1 -0
  29. batchslicer-0.9.2/src/batchslicer/backends/backend.py +14 -0
  30. batchslicer-0.9.2/src/batchslicer/backends/detection.py +175 -0
  31. batchslicer-0.9.2/src/batchslicer/backends/opc.py +345 -0
  32. batchslicer-0.9.2/src/batchslicer/backends/orca.py +407 -0
  33. batchslicer-0.9.2/src/batchslicer/backends/presets.py +319 -0
  34. batchslicer-0.9.2/src/batchslicer/backends/profiles.py +189 -0
  35. batchslicer-0.9.2/src/batchslicer/backends/slicers.py +104 -0
  36. batchslicer-0.9.2/src/batchslicer/banner.py +33 -0
  37. batchslicer-0.9.2/src/batchslicer/cli/__init__.py +1 -0
  38. batchslicer-0.9.2/src/batchslicer/cli/arguments.py +420 -0
  39. batchslicer-0.9.2/src/batchslicer/cli/commands/__init__.py +1 -0
  40. batchslicer-0.9.2/src/batchslicer/cli/doctor.py +269 -0
  41. batchslicer-0.9.2/src/batchslicer/cli/file_prompt.py +254 -0
  42. batchslicer-0.9.2/src/batchslicer/cli/menu.py +141 -0
  43. batchslicer-0.9.2/src/batchslicer/cli/output_prompt.py +104 -0
  44. batchslicer-0.9.2/src/batchslicer/cli/preset_prompt.py +161 -0
  45. batchslicer-0.9.2/src/batchslicer/cli/profile_prompt.py +45 -0
  46. batchslicer-0.9.2/src/batchslicer/cli/send_prompt.py +61 -0
  47. batchslicer-0.9.2/src/batchslicer/cli/setup.py +191 -0
  48. batchslicer-0.9.2/src/batchslicer/cli/slicer_prompt.py +58 -0
  49. batchslicer-0.9.2/src/batchslicer/core/__init__.py +1 -0
  50. batchslicer-0.9.2/src/batchslicer/core/config.py +240 -0
  51. batchslicer-0.9.2/src/batchslicer/core/environment.py +215 -0
  52. batchslicer-0.9.2/src/batchslicer/core/locations.py +49 -0
  53. batchslicer-0.9.2/src/batchslicer/core/logging.py +84 -0
  54. batchslicer-0.9.2/src/batchslicer/domain/__init__.py +1 -0
  55. batchslicer-0.9.2/src/batchslicer/domain/options.py +71 -0
  56. batchslicer-0.9.2/src/batchslicer/domain/presets.py +43 -0
  57. batchslicer-0.9.2/src/batchslicer/domain/printers.py +119 -0
  58. batchslicer-0.9.2/src/batchslicer/domain/profiles.py +162 -0
  59. batchslicer-0.9.2/src/batchslicer/infrastructure/__init__.py +1 -0
  60. batchslicer-0.9.2/src/batchslicer/infrastructure/moonraker.py +177 -0
  61. batchslicer-0.9.2/src/batchslicer/infrastructure/profiles.py +238 -0
  62. batchslicer-0.9.2/src/batchslicer/plugins/__init__.py +1 -0
  63. batchslicer-0.9.2/src/batchslicer/py.typed +0 -0
  64. batchslicer-0.9.2/src/batchslicer/services/__init__.py +1 -0
  65. batchslicer-0.9.2/src/batchslicer/services/gcode_stats.py +158 -0
  66. batchslicer-0.9.2/src/batchslicer/services/report.py +134 -0
  67. batchslicer-0.9.2/src/batchslicer/services/sending.py +163 -0
  68. batchslicer-0.9.2/src/batchslicer/services/slicing.py +656 -0
  69. batchslicer-0.9.2/src/batchslicer/services/thumbnails.py +480 -0
  70. batchslicer-0.9.2/src/batchslicer/version.py +44 -0
  71. batchslicer-0.9.2/src/batchslicer/web/__init__.py +1 -0
  72. batchslicer-0.9.2/tests/conftest.py +147 -0
  73. batchslicer-0.9.2/tests/test_app.py +1639 -0
  74. batchslicer-0.9.2/tests/test_arguments.py +205 -0
  75. batchslicer-0.9.2/tests/test_banner.py +40 -0
  76. batchslicer-0.9.2/tests/test_config.py +200 -0
  77. batchslicer-0.9.2/tests/test_detection.py +76 -0
  78. batchslicer-0.9.2/tests/test_doctor.py +166 -0
  79. batchslicer-0.9.2/tests/test_environment.py +308 -0
  80. batchslicer-0.9.2/tests/test_file_prompt.py +273 -0
  81. batchslicer-0.9.2/tests/test_gcode_stats.py +102 -0
  82. batchslicer-0.9.2/tests/test_logging.py +103 -0
  83. batchslicer-0.9.2/tests/test_menu.py +36 -0
  84. batchslicer-0.9.2/tests/test_opc.py +271 -0
  85. batchslicer-0.9.2/tests/test_orca_backend.py +670 -0
  86. batchslicer-0.9.2/tests/test_output_prompt.py +141 -0
  87. batchslicer-0.9.2/tests/test_preset_prompt.py +191 -0
  88. batchslicer-0.9.2/tests/test_presets.py +409 -0
  89. batchslicer-0.9.2/tests/test_profile_prompt.py +64 -0
  90. batchslicer-0.9.2/tests/test_profiles.py +254 -0
  91. batchslicer-0.9.2/tests/test_profiles_store.py +319 -0
  92. batchslicer-0.9.2/tests/test_report.py +69 -0
  93. batchslicer-0.9.2/tests/test_send_prompt.py +69 -0
  94. batchslicer-0.9.2/tests/test_sending.py +235 -0
  95. batchslicer-0.9.2/tests/test_setup.py +155 -0
  96. batchslicer-0.9.2/tests/test_slicer_prompt.py +84 -0
  97. batchslicer-0.9.2/tests/test_slicers.py +69 -0
  98. batchslicer-0.9.2/tests/test_slicing_service.py +769 -0
  99. batchslicer-0.9.2/tests/test_thumbnails.py +184 -0
  100. batchslicer-0.9.2/tests/test_version.py +61 -0
@@ -0,0 +1,311 @@
1
+ # Changelog
2
+
3
+ All notable changes to BatchSlicer are recorded here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.9.2] - 2026-11-22
10
+
11
+ The first release on PyPI.
12
+
13
+ ### Added
14
+
15
+ - **Published on PyPI.** `pipx install batchslicer` installs it; each tagged
16
+ release is uploaded automatically through trusted publishing.
17
+
18
+ ## [0.9.1] - 2026-11-22
19
+
20
+ One failing part no longer splits a folder's plates.
21
+
22
+ ### Changed
23
+
24
+ - **One failing part no longer splits a folder's plates.** With `--plates`,
25
+ when a folder's parts cannot be sliced together, each is sliced on its own
26
+ to find the failing ones, and the rest are put back together on plates
27
+ (before, every part of the folder got its own plate). Parts that only slice
28
+ after an auto-orient retry keep their own plate. Tested with OrcaSlicer 2.5.2.
29
+
30
+ ## [0.9.0] - 2026-11-22
31
+
32
+ Copies of a part, arranged by the slicer.
33
+
34
+ ### Added
35
+
36
+ - **Copies of a single model.** `--copies N` slices N copies of one STL, OBJ
37
+ or STEP model; the slicer arranges them, adding plates when they don't fit
38
+ (one G-code file per plate). Interactive single-model runs ask "How many
39
+ copies?" (Enter for 1), profiles can save the number, and the summary and
40
+ report show it. Not for folders (see `--plates`), 3MF projects or Creality
41
+ Print. Tested with OrcaSlicer 2.5.2.
42
+
43
+ ## [0.8.0] - 2026-11-22
44
+
45
+ Kits on plates, and sending to the printer from interactive runs.
46
+
47
+ ### Added
48
+
49
+ - **Several models per plate.** When slicing a folder, the loose models (STL,
50
+ OBJ, STEP) of each folder can be sliced together: the slicer arranges them
51
+ on as few plates as fit, giving one G-code file per plate, named after the
52
+ folder. Interactive runs ask ("Put the models in each folder together on
53
+ plates?"); `--plates` / `--no-plates` decide on the command line, and
54
+ profiles can save it. If a part fails, the folder's models are sliced one
55
+ by one instead. 3MF projects keep their own plates. OrcaSlicer and Bambu
56
+ Studio (Creality Print cannot arrange from its command line). The report
57
+ lists each plate group's models. Tested with OrcaSlicer 2.5.2 and Bambu
58
+ Studio 2.9.1.
59
+ - **Interactive runs ask whether to send the G-code** to a printer, when one
60
+ is configured or the last run sent to one ("Enter keeps what the last run
61
+ did"; another address can be typed). Runs from a profile or with `--send` /
62
+ `--no-send` are not asked, and people who never send are never asked.
63
+
64
+ ## [0.7.1] - 2026-11-22
65
+
66
+ Preview pictures on the printer's screen, checked with a real K2 Plus.
67
+
68
+ ### Added
69
+
70
+ - **Preview pictures in the G-code.** Printer screens (such as the K2 Plus
71
+ touchscreen) now show a picture of each file. Slicers draw these only in
72
+ their windows, so BatchSlicer draws them from the G-code's toolpaths: the
73
+ part as it will print, shaded, in the filament's colour, at the sizes the
74
+ printer preset asks for (usually 300x300 and 96x96 PNG). About a second per
75
+ typical model; `--no-thumbnails` turns it off, and profiles can save it.
76
+ Checked on the Creality K2 Plus touchscreen.
77
+
78
+ ### Changed
79
+
80
+ - The README notes how sending works with the Creality K2 Plus (tested: ports
81
+ 7125 and 4408, no API key, folders shown on the touchscreen).
82
+
83
+ ## [0.7.0] - 2026-11-22
84
+
85
+ Leave unwanted files out of a batch, and send the results to the printer.
86
+
87
+ ### Added
88
+
89
+ - **`--exclude PATTERN`** leaves out folders or files when slicing a folder
90
+ (repeatable; `Cura-*` matches a name at any depth, `kits/old` a path; case is
91
+ ignored). BatchSlicer says how many it skipped, and profiles save the
92
+ patterns. In the soak test, `--exclude "Cura-*"` would have left out the 241
93
+ printer-bed meshes behind 99 of the 216 failures.
94
+ - **Sending G-code to a printer.** `--send PRINTER` uploads the G-code of every
95
+ model that sliced to a Klipper printer through Moonraker (Creality K1/K2,
96
+ Voron and others), keeping a batch's folder structure on the printer.
97
+ `--start` starts printing a single model. The printer is given by its
98
+ address (`--send 192.168.1.50`, port 7125 unless another is given) or by a
99
+ name from the new `printers` section of the configuration. Printers are
100
+ checked before slicing starts,
101
+ and are checked by `batchslicer doctor`. Profiles remember the printer
102
+ (`--no-send` skips it for one run) but never `--start`. `batchslicer setup`
103
+ keeps the `printers` section when it rewrites the configuration. Tested
104
+ with real slicing against a stand-in Moonraker; not yet with a real printer.
105
+
106
+ ### Changed
107
+
108
+ - The `--orient retry` hint also appears for OrcaSlicer 2.5's "empty first
109
+ layer" failures, and a failure's reason is no longer repeated when the
110
+ slicer's log only restates it.
111
+
112
+ ## [0.6.0] - 2026-11-22
113
+
114
+ Every supported slicer has preset selection, and the newest OrcaSlicer works.
115
+
116
+ ### Added
117
+
118
+ - **Bambu Studio preset selection.** Choose a printer, then a compatible
119
+ filament and process, as for the other slicers. Bambu Studio records the
120
+ printer models you added and their nozzle sizes, so BatchSlicer lists the
121
+ shipped printers for those, plus printers you created yourself. Tested with
122
+ Bambu Studio 2.9.1.
123
+ - The weekly "Latest slicers" job now also slices with Bambu Studio's presets.
124
+ - **OrcaSlicer 2.5 support.** OrcaSlicer 2.5 ships its built-in presets only as
125
+ packed `.opc` files; BatchSlicer now reads that format (following
126
+ OrcaSlicer's own source) and unpacks the presets it needs. Vendors that
127
+ OrcaSlicer 2.5 does not ship (it downloads them) are read from the `.opc`
128
+ files in its settings folder. Checked against 2.4.0 and 2.5.2: the presets
129
+ decode completely, and slicing the same model gives the same settings apart
130
+ from those 2.5 itself changed.
131
+
132
+ ### Fixed
133
+
134
+ - With OrcaSlicer 2.5, slicing for a printer you created yourself failed
135
+ ("can not resolve preset"), because 2.5 looks up the printer it is based on
136
+ itself. BatchSlicer now leaves that link out for 2.5 and later.
137
+ - `config/config.yaml.bak` (written by `batchslicer setup`) is no longer offered
138
+ for committing.
139
+
140
+ ## [0.5.0] - 2026-11-22
141
+
142
+ Large batches: found by slicing 1,719 real downloaded models.
143
+
144
+ ### Added
145
+
146
+ - **`--orient retry|always`** uses the slicer's auto-orient. `retry` slices a
147
+ model that fails once more with auto-orient; this fixed 97 of 115 "Failed
148
+ slicing the model" errors in the test. `always` auto-orients every model.
149
+ Models sliced this way are marked "auto-oriented". Not available for Creality
150
+ Print, whose command line has no auto-orient.
151
+ - **`--allow-newer-files`** lets the slicer open `.3mf` projects saved by a
152
+ newer slicer version (6 of 9 such projects then sliced).
153
+ - **`--jobs N`** slices N models at the same time; progress is shown as each
154
+ finishes. Ctrl+C stops every running slicer. The slicers are already
155
+ multi-threaded, so the gain varies: on a 4-core computer two jobs were 12%
156
+ faster and four were no faster.
157
+ - **Batch report**: every run writes `report.csv` and `report.json` with each
158
+ model's status, G-code, print time, filament weight, length and cost, and
159
+ failure reason. A batch's report is updated as it runs. The summary shows
160
+ total print time and filament.
161
+ - Hints after failures that `--orient retry` or `--allow-newer-files` may fix.
162
+ - The three new options can be saved in profiles.
163
+
164
+ ### Changed
165
+
166
+ - Result folders hold only G-code and presets: the slicer's `result.json` and
167
+ `NNNNN.log` are read and then removed, folders of failed models are removed,
168
+ and a model interrupted by Ctrl+C leaves no partial files.
169
+ - A batch's time is the time it took from start to finish, shown as minutes
170
+ and hours when long.
171
+ - Slicer processes are started and stopped by BatchSlicer itself, so Ctrl+C
172
+ always stops them.
173
+
174
+ ## [0.4.0] - 2026-11-20
175
+
176
+ Dependable in everyday use: a setup check, tidy logs, and weekly testing
177
+ against the newest slicers.
178
+
179
+ ### Added
180
+
181
+ - **`batchslicer doctor`** checks the configuration, folders and each
182
+ configured slicer (does it run, does it accept BatchSlicer's commands, how
183
+ many printers it offers) and saved profiles, and reports any problems with
184
+ what to do about them. Exit status 0 or 1.
185
+ - A weekly GitHub Actions job tests BatchSlicer against the newest release of
186
+ OrcaSlicer, Creality Print and Bambu Studio.
187
+ - `docs/Vision.md`, `docs/Roadmap.md` and `docs/Startup.md`.
188
+
189
+ ### Changed
190
+
191
+ - The log file is rotated at about 1 MB, keeping the three most recent old
192
+ logs.
193
+ - "One model file" mode also lists models in subfolders of the incoming folder.
194
+ Text containing `/` is now a search unless it names an existing file.
195
+
196
+ ## [0.3.0] - 2026-11-20
197
+
198
+ Reuse your choices and slice for several printers at once.
199
+
200
+ ### Added
201
+
202
+ - **Profiles**: save a run's choices with `--save-profile NAME`, reuse them with
203
+ `--profile NAME` (other options override the profile), and repeat the last
204
+ run with `--last`; every run is remembered automatically. Interactive runs
205
+ without options offer the saved profiles first. `--list-profiles` and
206
+ `--delete-profile` manage them; they are stored in
207
+ `~/.local/share/batchslicer/profiles.yaml`.
208
+ - **Several printers per run**: repeat `--profile` (or answer "yes" to "Slice
209
+ for another printer as well?") to slice the same models for more than one
210
+ printer, each with its own slicer and presets, into its own output subfolder,
211
+ with a summary at the end. Such runs can be saved as one profile (a `targets`
212
+ list) and repeated with `--last`.
213
+ - A failed slice's reason now includes the slicer's own validation message
214
+ (for example OrcaSlicer's "Too small line width").
215
+
216
+ ### Fixed
217
+
218
+ - Slicers run inside the job's output folder, so files they write on failure
219
+ (such as OrcaSlicer's `00000.log`) no longer appear in the current folder.
220
+
221
+ ## [0.2.0] - 2026-11-20
222
+
223
+ The first usable release: slice single models or whole folder trees with
224
+ OrcaSlicer, Creality Print or Bambu Studio, interactively or unattended.
225
+
226
+ ### Added
227
+
228
+ - **Three slicers.** OrcaSlicer, Creality Print and Bambu Studio, driven
229
+ through their command-line slicing. Creality Print is run in its `--cli`
230
+ mode with `--need-gcode-file`; options a slicer lacks are refused with a
231
+ clear message.
232
+ - **Preset selection** for OrcaSlicer and Creality Print: choose a printer,
233
+ then a compatible filament and process. Lists match the slicer's own menus
234
+ (printers you added, filaments you made visible); your own presets come
235
+ first, marked "(mine)"; type text to search. Chosen presets are combined
236
+ with everything they inherit from into complete files the slicer CLI
237
+ accepts. OrcaSlicer 2.4's built-in presets are extracted once from its
238
+ AppImage and cached.
239
+ - **Folder batches.** Slice every `.stl`, `.3mf` and `.obj` in a folder and its
240
+ subfolders, with per-file progress. Results mirror the source folders; a
241
+ failed model does not stop the batch, and the summary gives each failure's
242
+ reason as reported by the slicer.
243
+ - **Output folders.** Every run gets its own time-stamped folder that also
244
+ keeps the exact presets used. G-code is named after the model
245
+ (`bracket.stl` → `bracket.gcode`, multi-plate projects →
246
+ `<name>_plate_N.gcode`). Choose the default output folder, an existing one,
247
+ or create a new one.
248
+ - **Command-line options** for every choice: `--slicer`, `--printer`,
249
+ `--filament`, `--process`, `--input`, `--output`, `--config`. Anything left
250
+ out is asked for, unless `--no-prompt` is given for unattended runs.
251
+ `--list-presets` shows preset names, and mistyped names get suggestions.
252
+ - **`batchslicer setup`** finds installed slicers (AppImages in the usual
253
+ folders, programs on PATH), recommends the newest stable version, finds each
254
+ slicer's settings folder, and writes the configuration. An existing
255
+ configuration is only replaced after confirmation (or `--force`) and is kept
256
+ as a `.bak` copy.
257
+ - **Standard locations.** Configuration is found via `--config`,
258
+ `BATCHSLICER_CONFIG`, `./config/config.yaml`, then
259
+ `~/.config/batchslicer/config.yaml`. Paths may use `~` and are relative to
260
+ the configuration file. Models and results default to `~/BatchSlicer`, logs
261
+ to `~/.local/state/batchslicer`, caches to `~/.cache/batchslicer`.
262
+ - **Clean stopping and error reporting.** Ctrl+C stops with exit status 130; an
263
+ interrupted batch keeps the models already sliced and reports what was not
264
+ started. Unexpected errors print one line and the log location, with full
265
+ details in the log. Errors go to stderr. Exit statuses: 0 success,
266
+ 1 failure, 2 invalid option, 130 interrupted.
267
+ - **Configuration, logging and startup checks.** Startup verifies the Python
268
+ version, configuration, working folders and the chosen slicer, naming each
269
+ problem it finds. Every run is logged: choices made, slicer commands and
270
+ their results, and the slicer's error output when a model fails.
271
+ - **Continuous integration**: ruff, mypy and pytest run on Python 3.12 and 3.13
272
+ for every push and pull request, and pushing a version tag builds the
273
+ package and publishes a GitHub release.
274
+
275
+ ### Changed
276
+
277
+ - Renamed the project from OrcaBatch to BatchSlicer (package `batchslicer`,
278
+ command `batchslicer`).
279
+ - `config/config.yaml` is no longer part of the repository;
280
+ `config/config.example.yaml` is the documented template.
281
+ - The version number is written only in `src/batchslicer/version.py`.
282
+
283
+ ### Fixed
284
+
285
+ - OrcaSlicer slice commands now follow its command-line interface: `--slice`
286
+ takes a plate number, the model is the last argument, and settings files are
287
+ passed as one `;`-separated list. The unsupported `--version` call was
288
+ removed.
289
+ - Slicer runs that hang are stopped after a timeout (30 minutes by default).
290
+ - OrcaSlicer's `result.json` is no longer left in the working folder.
291
+ - Logs are written to the configured logs folder.
292
+ - Declared the PyYAML dependency so a clean install works.
293
+
294
+ ## [0.1.0] - 2026-08-11
295
+
296
+ - Initial project bootstrap: project structure, architecture and coding
297
+ documents, and version information.
298
+
299
+ [Unreleased]: https://github.com/drak42/batch_slicer/compare/v0.9.2...HEAD
300
+ [0.9.2]: https://github.com/drak42/batch_slicer/compare/v0.9.1...v0.9.2
301
+ [0.9.1]: https://github.com/drak42/batch_slicer/compare/v0.9.0...v0.9.1
302
+ [0.9.0]: https://github.com/drak42/batch_slicer/compare/v0.8.0...v0.9.0
303
+ [0.8.0]: https://github.com/drak42/batch_slicer/compare/v0.7.1...v0.8.0
304
+ [0.7.1]: https://github.com/drak42/batch_slicer/compare/v0.7.0...v0.7.1
305
+ [0.7.0]: https://github.com/drak42/batch_slicer/compare/v0.6.0...v0.7.0
306
+ [0.6.0]: https://github.com/drak42/batch_slicer/compare/v0.5.0...v0.6.0
307
+ [0.5.0]: https://github.com/drak42/batch_slicer/compare/v0.4.0...v0.5.0
308
+ [0.4.0]: https://github.com/drak42/batch_slicer/compare/v0.3.0...v0.4.0
309
+ [0.3.0]: https://github.com/drak42/batch_slicer/compare/v0.2.0...v0.3.0
310
+ [0.2.0]: https://github.com/drak42/batch_slicer/compare/v0.1.0-bootstrap...v0.2.0
311
+ [0.1.0]: https://github.com/drak42/batch_slicer/releases/tag/v0.1.0-bootstrap
@@ -0,0 +1,241 @@
1
+ # Contributing to BatchSlicer
2
+
3
+ First of all...
4
+
5
+ Thank you for taking the time to contribute.
6
+
7
+ BatchSlicer is built around one simple goal:
8
+
9
+ > Remove friction from the 3D printing workflow through reliable, maintainable automation.
10
+
11
+ Every contribution should move the project closer to that goal.
12
+
13
+ ---
14
+
15
+ # Before You Begin
16
+
17
+ Please read the following documents before making changes.
18
+
19
+ 1. README.md
20
+ 2. AGENTS.md
21
+ 3. docs/Vision.md
22
+ 4. docs/Architecture.md
23
+ 5. docs/CodingStandards.md
24
+
25
+ These documents describe how the project is designed and how development decisions are made.
26
+
27
+ ---
28
+
29
+ # Engineering Philosophy
30
+
31
+ We believe:
32
+
33
+ - Simple solutions are usually better.
34
+ - Readable code is more valuable than clever code.
35
+ - Architecture matters.
36
+ - Documentation is part of the implementation.
37
+ - Every feature must provide measurable value.
38
+
39
+ If a feature does not solve a real problem, it probably should not exist.
40
+
41
+ ---
42
+
43
+ # Development Setup
44
+
45
+ ```bash
46
+ python3 -m venv .venv
47
+ .venv/bin/pip install -e '.[dev]'
48
+ ```
49
+
50
+ Before committing, run the same checks as GitHub Actions:
51
+
52
+ ```bash
53
+ .venv/bin/ruff check src tests
54
+ .venv/bin/mypy
55
+ .venv/bin/pytest
56
+ ```
57
+
58
+ After changing anything that talks to a slicer, also run the real-slicer tests
59
+ against your installed slicers (see "Testing" in the README). After changing
60
+ sending, try it once with a real printer (sending a file without `--start`
61
+ is safe).
62
+ [docs/Modules.md](docs/Modules.md) says where things live, and
63
+ [docs/Startup.md](docs/Startup.md) what happens during a run.
64
+
65
+ ---
66
+
67
+ # Development Workflow
68
+
69
+ Every feature follows the same process.
70
+
71
+ 1. Identify the problem.
72
+ 2. Discuss the design.
73
+ 3. Implement the solution.
74
+ 4. Add tests.
75
+ 5. Update documentation.
76
+ 6. Submit for review.
77
+
78
+ We intentionally avoid implementing large features without first discussing the architecture.
79
+
80
+ ---
81
+
82
+ # Pull Requests
83
+
84
+ Please keep pull requests focused.
85
+
86
+ Small pull requests are much easier to review than large ones.
87
+
88
+ Where practical:
89
+
90
+ - One feature per pull request.
91
+ - One bug fix per pull request.
92
+ - One architectural change per pull request.
93
+
94
+ Avoid combining unrelated changes.
95
+
96
+ ---
97
+
98
+ # Coding Standards
99
+
100
+ The project uses:
101
+
102
+ - Python 3.12+
103
+ - pathlib
104
+ - dataclasses
105
+ - type hints
106
+ - logging
107
+ - pytest
108
+
109
+ Please avoid:
110
+
111
+ - global variables
112
+ - hidden dependencies
113
+ - duplicated logic
114
+ - circular imports
115
+ - generic utility modules
116
+
117
+ Every module should have one clearly defined responsibility.
118
+
119
+ ---
120
+
121
+ # Documentation
122
+
123
+ Documentation is considered part of the implementation.
124
+
125
+ New modules should include:
126
+
127
+ - module docstring
128
+ - public API documentation
129
+ - explanation of responsibilities
130
+
131
+ When changing behaviour, update the relevant documentation.
132
+
133
+ ---
134
+
135
+ # Testing
136
+
137
+ New functionality should include appropriate unit tests.
138
+
139
+ Bug fixes should include regression tests whenever practical.
140
+
141
+ A feature is not complete until tests pass.
142
+
143
+ ---
144
+
145
+ # Releasing
146
+
147
+ 1. Make sure `main` is green on GitHub Actions.
148
+ 2. Set the new version in `src/batchslicer/version.py` (`__version__`); it is
149
+ the only place the program reads it from. Update the **Version** line at the
150
+ top of `docs/Architecture.md` to match.
151
+ 3. In `CHANGELOG.md`, move the entries under `[Unreleased]` into a new
152
+ `## [X.Y.Z] - YYYY-MM-DD` section and update the comparison links at the
153
+ bottom. A test checks that the current version has a section. In
154
+ `docs/Roadmap.md`, move the release's items to **Done**.
155
+ 4. Commit (`chore(release): X.Y.Z`) and merge to `main`.
156
+ 5. Tag and push: `git tag -a vX.Y.Z -m "BatchSlicer X.Y.Z"` then
157
+ `git push origin vX.Y.Z`.
158
+
159
+ Pushing the tag runs `.github/workflows/release.yml`: it checks that the tag
160
+ matches the version, runs the full checks, builds the package, and publishes a
161
+ GitHub release with the wheel and source archive attached and that version's
162
+ changelog section as the release notes. A second job then uploads the same
163
+ files to PyPI (https://pypi.org/p/batchslicer) through trusted publishing; if
164
+ the `pypi` environment requires approval, approve it in the Actions tab. PyPI
165
+ never accepts the same version twice, so a failed upload is fixed with a new
166
+ version, not a re-run with changed files.
167
+
168
+ ---
169
+
170
+ # Commit Messages
171
+
172
+ Use Conventional Commits.
173
+
174
+ Examples:
175
+
176
+ feat(queue): add persistent queue
177
+
178
+ fix(config): validate missing file
179
+
180
+ docs(architecture): update startup sequence
181
+
182
+ refactor(logging): simplify logger configuration
183
+
184
+ test(queue): improve queue coverage
185
+
186
+ ---
187
+
188
+ # Code Reviews
189
+
190
+ Reviews should focus on improving the software.
191
+
192
+ Question ideas.
193
+
194
+ Never question people.
195
+
196
+ Constructive discussion is encouraged.
197
+
198
+ ---
199
+
200
+ # Project Values
201
+
202
+ Every contributor should aim to leave the project in a better state than they found it.
203
+
204
+ We value:
205
+
206
+ - clarity
207
+ - reliability
208
+ - maintainability
209
+ - consistency
210
+ - professionalism
211
+
212
+ over speed.
213
+
214
+ ---
215
+
216
+ # Definition of Done
217
+
218
+ A task is complete when:
219
+
220
+ - Code builds successfully.
221
+ - Tests pass.
222
+ - Documentation has been updated.
223
+ - Logging has been added where appropriate.
224
+ - Type hints are complete.
225
+ - The implementation follows the documented architecture.
226
+
227
+ ---
228
+
229
+ # Engineering Motto
230
+
231
+ > Build for today.
232
+
233
+ > Design for tomorrow.
234
+
235
+ > Every feature must earn its place.
236
+
237
+ > Reliability is a feature.
238
+
239
+ ---
240
+
241
+ Thank you for helping make BatchSlicer better.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Christopher Eslick
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,5 @@
1
+ # Extra files for the source distribution (the wheel only needs the package).
2
+ include CHANGELOG.md CONTRIBUTING.md requirements.txt
3
+ include config/config.example.yaml
4
+ recursive-include docs *.md
5
+ recursive-include tests *.py