mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-23 00:42:33 +00:00
Check preset names against the conventions during profile review
This commit is contained in:
@@ -35,9 +35,10 @@ toolhead, a multi-material build) may drop the suffix — still an exact referen
|
||||
## `process`
|
||||
|
||||
`<layer height>mm <quality> @<target>` — [process-profiles.md](process-profiles.md#naming) has the
|
||||
quality ladder and the `fdm_process_*` base names. The `@<target>` is a human label, not a reference: it
|
||||
usually does not equal a real variant, and compatibility comes from the resolved `compatible_printers`
|
||||
list or condition.
|
||||
quality ladder and the `fdm_process_*` base names. The quality label stays before `@` and the printer
|
||||
target after it: a printer model in the quality slot leaves the tier undescribed. The `@<target>` is a
|
||||
human label, not a reference: it usually does not equal a real variant, and compatibility comes from the
|
||||
resolved `compatible_printers` list or condition.
|
||||
|
||||
## `filament`
|
||||
|
||||
@@ -58,6 +59,30 @@ to the first `@`; the target half is a label except for reserved forms:
|
||||
chosen at runtime
|
||||
([color is a runtime property](filament-profiles.md#color-is-a-runtime-property)).
|
||||
|
||||
## Checking names
|
||||
|
||||
Check every newly added profile's `name` against its type and role: model, selectable preset or base.
|
||||
Apply the same checks to an intentional name change. The human-readable naming shapes are not enforced
|
||||
by `check`: inspect the added or renamed profiles in the diff, using neighbouring names as context and
|
||||
following the bundle's established style where the type-specific conventions allow variation.
|
||||
|
||||
For bases (`instantiation: "false"`), use the type-specific conventions:
|
||||
|
||||
| Type | Base names |
|
||||
| --- | --- |
|
||||
| `machine` | `fdm_machine_common`, `fdm_<vendor>_common`, or an established machine-family base name |
|
||||
| `process` | `fdm_process_*`, including shared roots and per-layer-height / per-nozzle bases such as `fdm_process_single_0.20` |
|
||||
| `filament` | `fdm_filament_*` material roots or `<Product> @base` product roots |
|
||||
|
||||
Shared base names across bundles are intentional, including product roots such as `Fiberon PA6-CF @base`.
|
||||
Investigate a newly authored base that retains an unrelated selectable preset's name from a copy.
|
||||
|
||||
**Name uniqueness is checked by CI.** `check_preset_name_uniqueness` checks type + name within each
|
||||
bundle. `check_machine_model_name_uniqueness` checks model names across the entire tree, even with
|
||||
`--vendor`: `Preset::get_printer_type` matches `printer_model` against all vendors' models and returns
|
||||
the first match, so a duplicate makes lookup depend on vendor order. Both run as part of
|
||||
`python3 scripts/orca_profile_tool.py check`.
|
||||
|
||||
## Not the same as the filename
|
||||
|
||||
The loader keys off `name`, and a filename that disagrees usually still loads. Index `name` must equal the
|
||||
|
||||
@@ -17,6 +17,7 @@ The table highlights gaps that need human review. What CI *does* run:
|
||||
| A `renamed_from` whose old name is still a live preset | The redirect is inert while a live preset carries that name |
|
||||
| A preset differentiated only by color, or an all-printer library preset without `@System` | Per-color presets split one product across ids and the selector fills with near-duplicates; CI stays green |
|
||||
| Per-extruder vector length on a multi-nozzle printer | Silently padded (with the **first** value) or truncated |
|
||||
| A name that ignores its type's convention — a model in a `process` quality slot, or an unrelated target label left in a copied preset | The selector misrepresents the preset's quality or intended printer |
|
||||
|
||||
## 1. Was the vendor `version` bumped?
|
||||
|
||||
@@ -169,6 +170,15 @@ vendor, and a filename that disagrees with the preset's `name` (common; the load
|
||||
Check for Windows-invalid characters, reserved device names, trailing path-component spaces/dots,
|
||||
and case mismatches in `sub_path` or asset paths. See [cross-platform paths](validation.md#cross-platform-paths).
|
||||
|
||||
## 16. Do the preset names follow the conventions?
|
||||
|
||||
Check **every newly added profile and intentional name change**, including models and bases,
|
||||
against [the naming conventions](naming.md#checking-names). Preserve shipped names during
|
||||
ordinary tuning; renaming a shipped selectable preset requires the migration in item 4.
|
||||
|
||||
*Why:* CI checks name uniqueness, but does not enforce the naming conventions. Catch naming
|
||||
mistakes before the names ship and existing projects depend on them.
|
||||
|
||||
---
|
||||
|
||||
## Reporting the review
|
||||
|
||||
Reference in New Issue
Block a user