Skip to content

"Many changes" branch fixups/merge#16

Open
ndevenish wants to merge 19 commits intowjcarpenter:mainfrom
ndevenish:wjcarpenter-main-fixups
Open

"Many changes" branch fixups/merge#16
ndevenish wants to merge 19 commits intowjcarpenter:mainfrom
ndevenish:wjcarpenter-main-fixups

Conversation

@ndevenish
Copy link
Copy Markdown

This

  • Merges in the gflabel main branch
  • Runs formatting
  • Fixes a few typos/accidental formatting
  • Tries to sort out the mypy errors (fix annotation syntax, ignore some other things)

Essentially, this is the residual of stuff that should probably go onto this branch, as I am experimenting with this megaPR split into feature commits in ndevenish/gflabel@main...pr39-finalresult (WIP, I have yet to rewrite authors)

wjcarpenter and others added 19 commits January 14, 2026 22:32
Add three new command line arguments "--xscale", "--yscale", and "--zscale"
that can be used independently, all defaulting to 1.0, making them optional.
I corrected one of the links, but not the other.
One of the PR were missed; pre-commit.ci should prevent that now.
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)
- [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.14.13](astral-sh/ruff-pre-commit@v0.8.4...v0.14.13)
- [github.com/pre-commit/mirrors-mypy: v1.14.0 → v1.19.1](pre-commit/mirrors-mypy@v1.14.0...v1.19.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Replaces Poetry-specific config with standard [project] metadata and
[project.scripts] so that `uv run gflabel` works correctly.
## Add a new {qr(data)} fragment that generates QR codes on labels.

Features:
- Encode any text or URL as a QR code
- Configurable error correction level (L/M/Q/H)
- Auto-scales to fit available label height
- Uses segno library for QR generation

Usage:
  gflabel pred "{qr(https://example.com)} Part"
  gflabel pred "{qr(PART-12345,H)}"

The QR code is rendered as geometry via SVG import, matching
the existing pattern used for electronic symbols.

## Add {microqr(data)} / {mqr(data)} for small labels under 15mm.

Micro QR codes have only one position pattern instead of three,
making them significantly more compact:
- 11x11 to 17x17 modules (vs 21x21+ for regular QR)
- Supports up to 21 alphanumeric chars
- Error levels L, M, Q (no H)

Perfect for gridfinity labels with limited space.

## Fix bug preventing 2D barcode SVG

The mechanisms for scaling were still running, even if we weren't
extruding a model.

Co-authored-by: Nicholas Devenish <ndevenish@gmail.com>
Update examples and README.

Resolves #41

Co-authored-by: Nicholas Devenish <ndevenish@gmail.com>
- Add type: ignore comments for dynamic fragment_data attribute access
- Add type: ignore for list(Part) and list(str) return type annotations
- Add type: ignore for isinstance(Callable) check
- Add type annotations for face_sketches, current_xscale/yscale/zscale,
  fragment_data dict, child_parts, and y
- Fix clamp_channel param type to float | None (val can be None)
- Fix mesh_objects type annotation (lib3mf is untyped)
- Fix _args_to_dict allowed param to list[str] | None
- Replace bare except with except Exception
- Remove unused fragment_name local variable
- Remove undefined Shape type hint from frag_sketch param
@ndevenish
Copy link
Copy Markdown
Author

Also to note that I made this PR because I didn't seem to have push permissions on your branch to do it directly (possibly because you did the PR from main)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants