From 2de74ef7da9a56a7bb2c662704a201e4b40a766d Mon Sep 17 00:00:00 2001 From: Simon Weiss Date: Thu, 22 Oct 2026 21:21:12 +0400 Subject: [PATCH 1/5] docs(docs): mention inkscape 1.5 test job in readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2826223..350e86a 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,10 @@ each pull request. The test job uses Ubuntu 24.04 and Inkscape 1.4.4 from the Inkscape PPA. The developer also runs the tests before each push of a version change. +A second workflow runs all tests with the nightly build of Inkscape 1.5 from +the Inkscape trunk PPA. It runs for each push to `main`, each pull request +and each Monday. Its result does not block a merge. + The coverage badge at the top of this file shows the part of the statements in the extension code that the tests run. The value comes from the last CI run on `main`. From 57f959fe00e8cfca31ad2e2119767daa51893ad9 Mon Sep 17 00:00:00 2001 From: Simon Weiss Date: Thu, 22 Oct 2026 21:36:57 +0400 Subject: [PATCH 2/5] ci(repo): add release workflow for version tags --- .github/workflows/release.yml | 49 +++++++++++++++++++++++++++++++++++ README.md | 5 ++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0f6d1d2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,49 @@ +name: Release + +# Makes a draft GitHub release with the extension zip for each version tag. +on: + push: + tags: ["v*"] + +permissions: {} + +jobs: + release: + runs-on: ubuntu-24.04 + permissions: + contents: write # Create the release and upload the zip + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + fetch-depth: 0 # The main check below needs the history + persist-credentials: false + - name: Check the tag against main and the version + run: | + git merge-base --is-ancestor "$GITHUB_SHA" origin/main || { echo "Tag $GITHUB_REF_NAME is not on main"; exit 1; } + version=$(python3 -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])') + test "$GITHUB_REF_NAME" = "v$version" || { echo "Tag $GITHUB_REF_NAME does not match version $version"; exit 1; } + echo "VERSION=$version" >> "$GITHUB_ENV" + # Same files as the zip of v0.1.1: no top folder, so users extract it into the extensions folder. + - name: Make the zip + run: git archive --format=zip -o "flatternpattern-$VERSION.zip" HEAD LICENSE flatternpattern.inx ./*.py + - name: Write the release notes + run: | + # Release pages show each line break, so join the wrapped lines of a list item. + # Leading blank lines are skipped, so a section with no text gives an empty file. + awk -v v="## [$VERSION]" ' + index($0, v) == 1 {on = 1; next} + /^## \[|^\[.*\]: / {on = 0} + !on || (!n && /^$/) {next} + /^ +[^ ]/ && !/^ *([-*+]|[0-9]+\.) / && n {sub(/^ +/, ""); line[n] = line[n] " " $0; next} + {line[++n] = $0} + END {for (i = 1; i <= n; i++) print line[i]} + ' CHANGELOG.md > notes.md + test -s notes.md || { echo "CHANGELOG.md has no section for $VERSION"; exit 1; } + # Link to the README so the install steps stay in one place. + printf '\n### Install\n\nDownload `flatternpattern-%s.zip`, then follow the [install steps](%s/blob/%s/README.md#install).\n' \ + "$VERSION" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_REF_NAME" >> notes.md + # A draft lets the maintainer read the notes before the release is public. + - name: Create the draft release + env: + GH_TOKEN: ${{ github.token }} + run: gh release create "$GITHUB_REF_NAME" "flatternpattern-$VERSION.zip" --draft --title "$GITHUB_REF_NAME" --notes-file notes.md diff --git a/README.md b/README.md index 350e86a..ef2a720 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,11 @@ another folder, set the `INKSCAPE_EXTENSIONS_DIR` environment variable. The render tests need the `inkscape` and `rsvg-convert` commands. If a command is not available, pytest skips the tests that need it. +To make a release, push a tag `vX.Y.Z` on a commit on `main`. The tag must +match the version in `pyproject.toml`, and `CHANGELOG.md` must have a section +for it. The release workflow then makes a draft release with the zip file. +Read the draft and publish it on GitHub. + `docs/spike-merged-mode.md` records the test of the Inkscape actions that the merged outlines mode uses. From 5db8a59fe89782c3022dfc1611c644367aa1b6e6 Mon Sep 17 00:00:00 2001 From: Simon Weiss Date: Thu, 22 Oct 2026 21:38:29 +0400 Subject: [PATCH 3/5] chore(repo): add bug report issue form --- .github/ISSUE_TEMPLATE/bug.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.yml diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..bc018d0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,40 @@ +name: Bug report +description: The extension gives a wrong result, an error or no result. +labels: [bug] +body: + - type: input + id: inkscape + attributes: + label: Inkscape version + description: Help > About Inkscape shows the version. + placeholder: 1.4.4 (dcaf3e7d9e) + validations: + required: true + - type: input + id: system + attributes: + label: Operating system + placeholder: Ubuntu 24.04, Windows 11, macOS 15 + validations: + required: true + - type: dropdown + id: mode + attributes: + label: Output mode + options: + - Clipped copies + - Merged outlines + validations: + required: true + - type: textarea + id: problem + attributes: + label: What happened + description: Tell what you expected and what you got. Copy the full text of an error message. + validations: + required: true + - type: textarea + id: file + attributes: + label: SVG file + description: Attach a small SVG file that shows the problem. Drag the file into this box. From 3ff10f87a0b85be05ece1157d76776b84cc0f45f Mon Sep 17 00:00:00 2001 From: Simon Weiss Date: Thu, 22 Oct 2026 21:39:00 +0400 Subject: [PATCH 4/5] ci(repo): add dependabot for pinned actions --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..409219a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + # Updates the SHA pins and their version comments in the workflows. + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + target-branch: develop + commit-message: + prefix: ci(repo) From 1d393aaf1dbcebc10180ad82c38d7694f6b70d6c Mon Sep 17 00:00:00 2001 From: Simon Weiss Date: Thu, 22 Oct 2026 21:42:08 +0400 Subject: [PATCH 5/5] docs(repo): add contributing guide --- CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..af0750b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contributing + +Thank you for your help. To report a problem, use the +[issue form](https://github.com/weiss-d/FlatternPattern/issues/new/choose). + +## Change the code + +1. Set up the tools and run the tests. The + [Development](README.md#development) section of the README gives the steps. +2. Make a branch from `develop`. +3. Add a test for each change in behavior. For a change in the output, also + add a small SVG file to `tests/data/flatten/`. The render tests compare + the input and the output of each file in this folder. +4. Open the pull request against `develop`, not `main`. + +CI runs the linters and all tests for each pull request. + +## Commit messages + +Use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) +format: `(): `. The pre-commit hook checks the +format. + +- Write the description in lowercase and in the imperative mood. +- Use one scope from this list: `inx`, `core`, `resolve`, `tiling`, + `clipped`, `merged`, `cleanup`, `tests`, `docs`, `repo`. + +Example: `fix(tiling): include stroke box in tile culling`.