merrow 0.1.1__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 (164) hide show
  1. merrow-0.1.1/.githooks/commit-msg +12 -0
  2. merrow-0.1.1/.githooks/pre-push +18 -0
  3. merrow-0.1.1/.github/workflows/ci.yml +84 -0
  4. merrow-0.1.1/.github/workflows/install.yml +54 -0
  5. merrow-0.1.1/.github/workflows/sources.yml +75 -0
  6. merrow-0.1.1/.gitignore +59 -0
  7. merrow-0.1.1/.hyperi-ci.yaml +28 -0
  8. merrow-0.1.1/.python-version +1 -0
  9. merrow-0.1.1/CONTRIBUTING.md +116 -0
  10. merrow-0.1.1/LICENSE +73 -0
  11. merrow-0.1.1/Makefile +41 -0
  12. merrow-0.1.1/PKG-INFO +110 -0
  13. merrow-0.1.1/README.md +86 -0
  14. merrow-0.1.1/VERSION +1 -0
  15. merrow-0.1.1/converters/README.md +3 -0
  16. merrow-0.1.1/docs/README.md +9 -0
  17. merrow-0.1.1/docs/architecture.md +194 -0
  18. merrow-0.1.1/docs/diagrams/context.yaml +13 -0
  19. merrow-0.1.1/docs/diagrams/services.yaml +25 -0
  20. merrow-0.1.1/docs/diagrams-research.md +176 -0
  21. merrow-0.1.1/docs/examples/README.md +18 -0
  22. merrow-0.1.1/docs/examples/aws-commerce/commerce-dark.svg +1 -0
  23. merrow-0.1.1/docs/examples/aws-commerce/commerce-light.svg +1 -0
  24. merrow-0.1.1/docs/examples/aws-commerce/commerce.mmd +84 -0
  25. merrow-0.1.1/docs/examples/aws-commerce/commerce.yaml +41 -0
  26. merrow-0.1.1/docs/examples/aws-web-app/web-app-dark.svg +1 -0
  27. merrow-0.1.1/docs/examples/aws-web-app/web-app-light.svg +1 -0
  28. merrow-0.1.1/docs/examples/aws-web-app/web-app.mmd +89 -0
  29. merrow-0.1.1/docs/examples/aws-web-app/web-app.yaml +39 -0
  30. merrow-0.1.1/docs/examples/bpmn-order/create-invoice-dark.svg +1 -0
  31. merrow-0.1.1/docs/examples/bpmn-order/create-invoice-light.svg +1 -0
  32. merrow-0.1.1/docs/examples/bpmn-order/create-invoice.mmd +72 -0
  33. merrow-0.1.1/docs/examples/bpmn-order/create-invoice.yaml +15 -0
  34. merrow-0.1.1/docs/examples/bpmn-order/order-dark.svg +1 -0
  35. merrow-0.1.1/docs/examples/bpmn-order/order-light.svg +1 -0
  36. merrow-0.1.1/docs/examples/bpmn-order/order.mmd +73 -0
  37. merrow-0.1.1/docs/examples/bpmn-order/order.yaml +18 -0
  38. merrow-0.1.1/docs/examples/c4-big-bank/containers-dark.svg +1 -0
  39. merrow-0.1.1/docs/examples/c4-big-bank/containers-light.svg +1 -0
  40. merrow-0.1.1/docs/examples/c4-big-bank/containers.mmd +85 -0
  41. merrow-0.1.1/docs/examples/c4-big-bank/containers.yaml +22 -0
  42. merrow-0.1.1/docs/examples/c4-big-bank/context-dark.svg +1 -0
  43. merrow-0.1.1/docs/examples/c4-big-bank/context-light.svg +1 -0
  44. merrow-0.1.1/docs/examples/c4-big-bank/context.mmd +71 -0
  45. merrow-0.1.1/docs/examples/c4-big-bank/context.yaml +11 -0
  46. merrow-0.1.1/docs/examples/c4-big-bank/reference/merrow.yaml +10 -0
  47. merrow-0.1.1/docs/examples/campus-network/campus-dark.svg +1 -0
  48. merrow-0.1.1/docs/examples/campus-network/campus-light.svg +1 -0
  49. merrow-0.1.1/docs/examples/campus-network/campus.mmd +85 -0
  50. merrow-0.1.1/docs/examples/campus-network/campus.yaml +22 -0
  51. merrow-0.1.1/docs/examples/flink-platform/flink-dark.svg +1 -0
  52. merrow-0.1.1/docs/examples/flink-platform/flink-light.svg +1 -0
  53. merrow-0.1.1/docs/examples/flink-platform/flink.mmd +80 -0
  54. merrow-0.1.1/docs/examples/flink-platform/flink.yaml +23 -0
  55. merrow-0.1.1/docs/examples/kubernetes/components-dark.svg +1 -0
  56. merrow-0.1.1/docs/examples/kubernetes/components-light.svg +1 -0
  57. merrow-0.1.1/docs/examples/kubernetes/components.mmd +91 -0
  58. merrow-0.1.1/docs/examples/kubernetes/components.yaml +21 -0
  59. merrow-0.1.1/docs/examples/kubernetes/reference/merrow.yaml +15 -0
  60. merrow-0.1.1/docs/examples/oidc-login/login-1-dark.svg +1 -0
  61. merrow-0.1.1/docs/examples/oidc-login/login-1-light.svg +1 -0
  62. merrow-0.1.1/docs/examples/oidc-login/login.md +46 -0
  63. merrow-0.1.1/docs/examples/openshift-platform/openshift-dark.svg +1 -0
  64. merrow-0.1.1/docs/examples/openshift-platform/openshift-light.svg +1 -0
  65. merrow-0.1.1/docs/examples/openshift-platform/openshift.mmd +83 -0
  66. merrow-0.1.1/docs/examples/openshift-platform/openshift.yaml +30 -0
  67. merrow-0.1.1/docs/examples/pipeline/pipeline-dark.svg +1 -0
  68. merrow-0.1.1/docs/examples/pipeline/pipeline-light.svg +1 -0
  69. merrow-0.1.1/docs/examples/pipeline/pipeline.mmd +68 -0
  70. merrow-0.1.1/docs/examples/pipeline/pipeline.yaml +9 -0
  71. merrow-0.1.1/docs/icon-sources.md +29 -0
  72. merrow-0.1.1/docs/source-register.md +200 -0
  73. merrow-0.1.1/install.sh +37 -0
  74. merrow-0.1.1/pyproject.toml +117 -0
  75. merrow-0.1.1/reference/README.md +5 -0
  76. merrow-0.1.1/src/merrow/__init__.py +1 -0
  77. merrow-0.1.1/src/merrow/apply.py +116 -0
  78. merrow-0.1.1/src/merrow/archive.py +79 -0
  79. merrow-0.1.1/src/merrow/browser.py +72 -0
  80. merrow-0.1.1/src/merrow/bundle.py +69 -0
  81. merrow-0.1.1/src/merrow/cli.py +418 -0
  82. merrow-0.1.1/src/merrow/compose.py +148 -0
  83. merrow-0.1.1/src/merrow/config.py +110 -0
  84. merrow-0.1.1/src/merrow/convert/__init__.py +11 -0
  85. merrow-0.1.1/src/merrow/convert/opc.py +42 -0
  86. merrow-0.1.1/src/merrow/convert/pdf.py +136 -0
  87. merrow-0.1.1/src/merrow/convert/pptx.py +201 -0
  88. merrow-0.1.1/src/merrow/convert/svg.py +285 -0
  89. merrow-0.1.1/src/merrow/convert/visio.py +556 -0
  90. merrow-0.1.1/src/merrow/defaults.yaml +171 -0
  91. merrow-0.1.1/src/merrow/graph.py +174 -0
  92. merrow-0.1.1/src/merrow/lint/__init__.py +1 -0
  93. merrow-0.1.1/src/merrow/lint/diagram_check.py +807 -0
  94. merrow-0.1.1/src/merrow/lint/icons.py +32 -0
  95. merrow-0.1.1/src/merrow/model.py +115 -0
  96. merrow-0.1.1/src/merrow/naming.py +79 -0
  97. merrow-0.1.1/src/merrow/npm/package-lock.json +1156 -0
  98. merrow-0.1.1/src/merrow/npm/package.json +7 -0
  99. merrow-0.1.1/src/merrow/objects.py +143 -0
  100. merrow-0.1.1/src/merrow/objects.yaml +54 -0
  101. merrow-0.1.1/src/merrow/packs/starter.LICENSE +201 -0
  102. merrow-0.1.1/src/merrow/packs/starter.json +1 -0
  103. merrow-0.1.1/src/merrow/patterns.py +119 -0
  104. merrow-0.1.1/src/merrow/patterns.yaml +32 -0
  105. merrow-0.1.1/src/merrow/post.py +115 -0
  106. merrow-0.1.1/src/merrow/proc.py +58 -0
  107. merrow-0.1.1/src/merrow/profile.py +348 -0
  108. merrow-0.1.1/src/merrow/profiles/aws-dark.tokens.json +8 -0
  109. merrow-0.1.1/src/merrow/profiles/aws.tokens.json +13 -0
  110. merrow-0.1.1/src/merrow/profiles/house-dark.tokens.json +6 -0
  111. merrow-0.1.1/src/merrow/profiles/house.tokens.json +51 -0
  112. merrow-0.1.1/src/merrow/profiles.yaml +219 -0
  113. merrow-0.1.1/src/merrow/read/__init__.py +27 -0
  114. merrow-0.1.1/src/merrow/read/dot.py +81 -0
  115. merrow-0.1.1/src/merrow/read/drawio.py +198 -0
  116. merrow-0.1.1/src/merrow/read/excalidraw.py +88 -0
  117. merrow-0.1.1/src/merrow/read/pdf.py +693 -0
  118. merrow-0.1.1/src/merrow/read/pptx.py +155 -0
  119. merrow-0.1.1/src/merrow/read/structurizr.py +78 -0
  120. merrow-0.1.1/src/merrow/read/visio.py +174 -0
  121. merrow-0.1.1/src/merrow/render.py +147 -0
  122. merrow-0.1.1/src/merrow/skill/SKILL.md +46 -0
  123. merrow-0.1.1/src/merrow/sources/__init__.py +1 -0
  124. merrow-0.1.1/src/merrow/sources/detect.py +169 -0
  125. merrow-0.1.1/src/merrow/sources/fetch.py +77 -0
  126. merrow-0.1.1/src/merrow/sources/lock.py +58 -0
  127. merrow-0.1.1/src/merrow/sources.lock.yaml +87 -0
  128. merrow-0.1.1/src/merrow/sources.yaml +432 -0
  129. merrow-0.1.1/src/merrow/spec.py +123 -0
  130. merrow-0.1.1/src/merrow/write.py +289 -0
  131. merrow-0.1.1/style/README.md +3 -0
  132. merrow-0.1.1/style/diagram-templates.md +266 -0
  133. merrow-0.1.1/style/diagrams.md +539 -0
  134. merrow-0.1.1/tests/conftest.py +29 -0
  135. merrow-0.1.1/tests/fixtures/smoke.mmd +2 -0
  136. merrow-0.1.1/tests/test_apply.py +115 -0
  137. merrow-0.1.1/tests/test_aws_profile.py +188 -0
  138. merrow-0.1.1/tests/test_bundle.py +85 -0
  139. merrow-0.1.1/tests/test_config.py +93 -0
  140. merrow-0.1.1/tests/test_convert_pdf.py +76 -0
  141. merrow-0.1.1/tests/test_convert_pptx.py +137 -0
  142. merrow-0.1.1/tests/test_convert_svg.py +385 -0
  143. merrow-0.1.1/tests/test_convert_visio.py +168 -0
  144. merrow-0.1.1/tests/test_diagram_check.py +793 -0
  145. merrow-0.1.1/tests/test_examples.py +48 -0
  146. merrow-0.1.1/tests/test_graph.py +136 -0
  147. merrow-0.1.1/tests/test_lint_icons.py +48 -0
  148. merrow-0.1.1/tests/test_neutral.py +52 -0
  149. merrow-0.1.1/tests/test_objects.py +239 -0
  150. merrow-0.1.1/tests/test_one_look.py +61 -0
  151. merrow-0.1.1/tests/test_patterns.py +213 -0
  152. merrow-0.1.1/tests/test_proc.py +32 -0
  153. merrow-0.1.1/tests/test_profile.py +244 -0
  154. merrow-0.1.1/tests/test_read_dot.py +49 -0
  155. merrow-0.1.1/tests/test_read_drawio.py +98 -0
  156. merrow-0.1.1/tests/test_read_excalidraw.py +82 -0
  157. merrow-0.1.1/tests/test_read_pdf.py +190 -0
  158. merrow-0.1.1/tests/test_read_pptx.py +81 -0
  159. merrow-0.1.1/tests/test_read_structurizr.py +79 -0
  160. merrow-0.1.1/tests/test_read_visio.py +83 -0
  161. merrow-0.1.1/tests/test_render.py +101 -0
  162. merrow-0.1.1/tests/test_sources.py +173 -0
  163. merrow-0.1.1/tests/test_spec.py +209 -0
  164. merrow-0.1.1/uv.lock +1201 -0
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env bash
2
+ # Conventional commit validation hook
3
+ # Install: git config core.hooksPath .githooks
4
+
5
+ if command -v hyperi-ci >/dev/null 2>&1; then
6
+ hyperi-ci check-commit "$1"
7
+ elif command -v uvx >/dev/null 2>&1; then
8
+ uvx --python 3.14 hyperi-ci check-commit "$1"
9
+ else
10
+ echo "Warning: hyperi-ci not found -- skipping commit validation" >&2
11
+ exit 0
12
+ fi
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # Enforce hyperi-ci push instead of bare git push
3
+ # hyperi-ci push sets HYPERCI_PUSH=1 before calling git push
4
+
5
+ if [ "${HYPERCI_PUSH:-}" = "1" ]; then
6
+ exit 0
7
+ fi
8
+
9
+ echo ''
10
+ echo ' Push blocked. Use hyperi-ci push instead of git push.'
11
+ echo ''
12
+ echo ' hyperi-ci push # normal push with pre-checks'
13
+ echo ' hyperi-ci push --release # push + auto-publish if CI passes'
14
+ echo ' hyperi-ci push --no-ci # push, skip CI'
15
+ echo ''
16
+ echo ' To bypass (emergency): HYPERCI_PUSH=1 git push'
17
+ echo ''
18
+ exit 1
@@ -0,0 +1,84 @@
1
+ # Project: merrow
2
+ # File: .github/workflows/ci.yml
3
+ # Purpose: CI pipeline
4
+ #
5
+ # License: Apache-2.0
6
+ # Copyright: (c) 2026 HYPERI PTY LIMITED
7
+
8
+ name: CI
9
+
10
+ "on":
11
+ push:
12
+ branches: ["**", "!gh-readonly-queue/**"]
13
+ pull_request:
14
+ branches: [main]
15
+ merge_group:
16
+ types: [checks_requested]
17
+ workflow_dispatch:
18
+ inputs:
19
+ tag:
20
+ type: string
21
+ required: false
22
+ default: ""
23
+ description: "Tag to re-publish (existing tag). Omit + set from-head to release HEAD."
24
+ from-head:
25
+ type: string
26
+ required: false
27
+ default: ""
28
+ description: "'true' to release/retry the current HEAD -- the CI creates the tag (issue #35)."
29
+ bump:
30
+ type: string
31
+ required: false
32
+ default: "auto"
33
+ description: "Version resolution for from-head: auto | patch | minor (forced -- release even with no release-worthy commit) | X.Y.Z (exact version)."
34
+ skip-optimize:
35
+ type: string
36
+ required: false
37
+ default: ""
38
+ description: "'true' to skip the optimisation stage for this run (Rust: no PGO, no BOLT). Empty = optimisation on."
39
+ release-unoptimized:
40
+ type: string
41
+ required: false
42
+ default: ""
43
+ description: "'true' to consent, for this run only, to shipping a skipped-optimisation build under a release tag."
44
+ optimize-tier:
45
+ type: string
46
+ required: false
47
+ default: ""
48
+ description: "'release' to build the release optimisation tier on a run that publishes nothing (Rust: PGO + BOLT)."
49
+ test-tier:
50
+ type: choice
51
+ required: false
52
+ default: "core"
53
+ options: [core, full]
54
+ description: "full runs the full test tier on this run. core never lowers a tier."
55
+ schedule:
56
+ - cron: '24 14 * * *'
57
+
58
+ permissions:
59
+ contents: write
60
+ packages: write
61
+ issues: write
62
+ pull-requests: write
63
+
64
+ jobs:
65
+ ci:
66
+ uses: hyperi-io/hyperi-ci/.github/workflows/python-ci.yml@main
67
+ with:
68
+ tag: ${{ inputs.tag || '' }}
69
+ from-head: ${{ inputs.from-head || '' }}
70
+ bump: ${{ inputs.bump || 'auto' }}
71
+ skip-optimize: ${{ inputs.skip-optimize || '' }}
72
+ release-unoptimized: ${{ inputs.release-unoptimized || '' }}
73
+ optimize-tier: ${{ inputs.optimize-tier || '' }}
74
+ test-tier: ${{ inputs.test-tier || 'core' }}
75
+ secrets:
76
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
77
+ ALERT_BRIDGE_TOKEN: ${{ secrets.ALERT_BRIDGE_TOKEN }}
78
+ GITLEAKS_GH_ACTIONS_KEY: ${{ secrets.GITLEAKS_GH_ACTIONS_KEY }}
79
+ R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
80
+ R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
81
+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
82
+ DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
83
+ CONTAINER_MGT_APP_PRIVATE_KEY: ${{ secrets.CONTAINER_MGT_APP_PRIVATE_KEY }}
84
+ GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }}
@@ -0,0 +1,54 @@
1
+ # Installs merrow as a CLI the way a user does, on each OS, and runs it.
2
+ name: Install
3
+
4
+ "on":
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ branches: [main]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ install:
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ include:
20
+ - os: ${{ vars.GH_RUNNER_PYTHON || vars.GH_RUNNER_DEFAULT || 'ubuntu-latest' }}
21
+ required: true
22
+ - os: macos-latest
23
+ required: true
24
+ - os: windows-latest
25
+ required: false
26
+ runs-on: ${{ matrix.os }}
27
+ continue-on-error: ${{ !matrix.required }}
28
+ steps:
29
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
30
+ with:
31
+ persist-credentials: false
32
+ # Linux and macOS: the installer, from no uv, as a new user runs it.
33
+ - name: Install (Linux, macOS)
34
+ if: runner.os != 'Windows'
35
+ shell: bash
36
+ run: |
37
+ ./install.sh
38
+ echo "${HOME}/.local/bin" >> "$GITHUB_PATH"
39
+ # Windows, best effort: the README's manual steps.
40
+ - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
41
+ if: runner.os == 'Windows'
42
+ - name: Install (Windows)
43
+ if: runner.os == 'Windows'
44
+ shell: bash
45
+ run: uv tool install --python "$(cat .python-version)" .
46
+ - name: Run it
47
+ shell: bash
48
+ run: |
49
+ merrow --version
50
+ merrow config get
51
+ merrow tools ensure
52
+ merrow diagram render tests/fixtures/smoke.mmd --out out
53
+ test -s out/smoke-light.svg
54
+ test -s out/smoke-dark.svg
@@ -0,0 +1,75 @@
1
+ # Weekly: detect new vendor releases, re-pin the lock, rebuild every pack from
2
+ # it, and open a PR when anything moved. A human only reviews the PR.
3
+ name: Sources
4
+
5
+ "on":
6
+ schedule:
7
+ - cron: "17 16 * * 0"
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ update:
15
+ runs-on: ${{ vars.GH_RUNNER_PYTHON || vars.GH_RUNNER_DEFAULT || 'ubuntu-latest' }}
16
+ steps:
17
+ # An App token, because a PR opened with GITHUB_TOKEN triggers no CI.
18
+ - id: app
19
+ uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0
20
+ with:
21
+ client-id: ${{ vars.GH_APP_CLIENT_ID }}
22
+ private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
23
+ owner: ${{ github.repository_owner }}
24
+ repositories: ${{ github.event.repository.name }}
25
+ permission-contents: write
26
+ permission-pull-requests: write
27
+ # The PR step pushes with this credential. The job uploads no artifacts.
28
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 # zizmor: ignore[artipacked]
29
+ with:
30
+ token: ${{ steps.app.outputs.token }}
31
+ - uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
32
+ - name: Detect and re-pin
33
+ id: update
34
+ env:
35
+ GITHUB_TOKEN: ${{ steps.app.outputs.token }}
36
+ # One vendor failing must not hold back the others' PR: record, carry on.
37
+ run: |
38
+ status=0
39
+ uv run merrow source update --lock src/merrow/sources.lock.yaml > changes.jsonl || status=$?
40
+ cat changes.jsonl
41
+ echo "status=$status" >> "$GITHUB_OUTPUT"
42
+ echo "moved=$(git status --porcelain src/merrow/sources.lock.yaml | wc -l)" >> "$GITHUB_OUTPUT"
43
+ - name: Rebuild every pack from the new lock
44
+ if: steps.update.outputs.moved != '0'
45
+ run: |
46
+ for source in $(uv run merrow source list --quiet); do
47
+ uv run merrow pack build "$source" | tee -a builds.jsonl
48
+ done
49
+ - name: Open the PR
50
+ if: steps.update.outputs.moved != '0'
51
+ env:
52
+ GH_TOKEN: ${{ steps.app.outputs.token }}
53
+ run: |
54
+ branch="sources/update-$(date -u +%Y%m%d)"
55
+ git config user.name "merrow sources"
56
+ git config user.email "dev@hyperi.io"
57
+ git switch -c "$branch"
58
+ git add src/merrow/sources.lock.yaml
59
+ git commit -m "fix(sources): re-pin vendor sources that published a new release"
60
+ git push origin "$branch"
61
+ {
62
+ echo "New vendor releases, re-pinned and rebuilt."
63
+ echo
64
+ echo '```json'
65
+ cat changes.jsonl builds.jsonl
66
+ echo '```'
67
+ echo
68
+ echo "Check builds for unmatched files, broken aliases and failed icons before merging."
69
+ } > body.md
70
+ gh pr create --title "fix(sources): re-pin vendor sources" --body-file body.md
71
+ - name: Fail on any source that could not be checked or fetched
72
+ if: steps.update.outputs.status != '0'
73
+ run: |
74
+ echo "::error::a source failed detection or download, see changes.jsonl in the update step"
75
+ exit 1
@@ -0,0 +1,59 @@
1
+ # Built icon packs and downloads. Publisher terms bar redistribution, so no
2
+ # pack or source file is ever committed. Rendered diagrams are fine. The one
3
+ # exception is the starter pack merrow ships, Apache-2.0 with its licence.
4
+ packs/
5
+ !src/merrow/packs/
6
+ .cache/
7
+ *.vssx
8
+ *.vsdx
9
+ *.vstx
10
+ *.pptx
11
+ *.drawio
12
+ *.excalidraw
13
+
14
+ # Python build artefacts
15
+ __pycache__/
16
+ *.py[cod]
17
+ build/
18
+ dist/
19
+ *.egg-info/
20
+ .eggs/
21
+
22
+ # Python virtual envs and tool caches
23
+ .venv/
24
+ venv/
25
+ .pytest_cache/
26
+ .ruff_cache/
27
+ .mypy_cache/
28
+ .ty_cache/
29
+ .coverage
30
+ .coverage.*
31
+ coverage.xml
32
+ htmlcov/
33
+ # hyperi-ci's JUnit report
34
+ test-results/
35
+
36
+ # npm, if someone installs the Mermaid lock by hand. merrow downloads the
37
+ # bundle into its cache, never the repo.
38
+ node_modules/
39
+
40
+ # Render output from a local run
41
+ out/
42
+ *.png
43
+
44
+ # Local environment files (never commit -- contain secrets)
45
+ .env
46
+ .env.*
47
+
48
+ # Git worktrees
49
+ .worktrees/
50
+
51
+ # OS junk
52
+ .DS_Store
53
+ Thumbs.db
54
+
55
+ # Local working files (not committed). Mirrored in .git/info/exclude.
56
+ .hyperi-ai
57
+ .claude/settings.local.json
58
+ .playwright-mcp/
59
+ CLAUDE.local.md
@@ -0,0 +1,28 @@
1
+ # Project: merrow
2
+ # File: .hyperi-ci.yaml
3
+ # Purpose: HyperI CI configuration
4
+ #
5
+ # License: Apache-2.0
6
+ # Copyright: (c) 2026 HYPERI PTY LIMITED
7
+ #
8
+ # Override defaults with HYPERCI_* env vars.
9
+ # Reference: config/defaults.yaml in hyperi-ci.
10
+
11
+ language: python
12
+ classification: general-oss
13
+ project:
14
+ status: experimental
15
+ quality:
16
+ enabled: true
17
+ test:
18
+ enabled: true
19
+ python:
20
+ # Every fixture lives in tmp_path or on a port the OS picks.
21
+ parallel: auto
22
+ build:
23
+ enabled: true
24
+ strategies:
25
+ - native
26
+ release:
27
+ enabled: true
28
+ channel: alpha
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,116 @@
1
+ # Contributing to merrow
2
+
3
+ Two audiences, two paths.
4
+
5
+ ## External contributors - the short path
6
+
7
+ **You do NOT need to install `hyperi-ci` or activate any
8
+ repo-local git hooks.** Standard tooling is enough.
9
+
10
+ 1. Fork the repository, clone your fork, create a topic branch.
11
+ 2. Make your change. Run the project's tests with whatever the
12
+ language ecosystem provides (`pytest`, `cargo test`,
13
+ `npm test`, `go test ./...`). Lint via the standard tools
14
+ the project declares in its manifest (`ruff`, `clippy`,
15
+ `eslint`, `golangci-lint`, etc.). The project's pyproject /
16
+ Cargo.toml / package.json has the lint config, and your IDE
17
+ picks it up without further setup.
18
+ 3. Commit with whatever message format your workflow uses.
19
+ Open a PR against `main`.
20
+
21
+ **What happens to your PR's CI checks:**
22
+
23
+ PRs from forks intentionally do not auto-trigger this repo's
24
+ full CI pipeline. You will see green checks because all jobs
25
+ are skipped, not because they ran and passed. A maintainer
26
+ will pull your PR locally to validate it against the full
27
+ pipeline. This avoids exposing internal CI credentials and
28
+ self-hosted runners to fork-originated workflows, which is the
29
+ standard GitHub-side security recommendation.
30
+
31
+ If a maintainer requests changes, push to the same branch on
32
+ your fork. They will re-validate.
33
+
34
+ ## Maintainers - the strict path
35
+
36
+ Maintainers opt in to the project's stricter tooling:
37
+
38
+ ```bash
39
+ # install the CLI
40
+ uv tool install hyperi-ci # or: pipx install hyperi-ci
41
+
42
+ # activate the repo-local git hooks (commit-msg validation +
43
+ # pre-push enforcement of `hyperi-ci push` over bare `git push`)
44
+ git config core.hooksPath .githooks
45
+
46
+ # verify
47
+ hyperi-ci --version
48
+ hyperi-ci check # quality + test, pre-push gate
49
+ ```
50
+
51
+ Maintainer workflow:
52
+
53
+ 1. Land changes on `main` via PR or direct push (your call).
54
+ 2. `hyperi-ci push` instead of `git push`. The pre-push hook
55
+ enforces this. Bypass it with `HYPERCI_PUSH=1 git push` if you
56
+ know what you are doing.
57
+ 3. `hyperi-ci push --release` when you want to ship a release.
58
+ It amends a `Release: true` trailer to HEAD. The CI pipeline
59
+ picks that up, predicts the next version, stamps it, and
60
+ publishes.
61
+
62
+ ## What happens when you push commits to your fork
63
+
64
+ Nothing on this repo's side. Your fork has a separate GitHub
65
+ Actions context, and this repo's workflows are not triggered until
66
+ you open a PR. Your fork's CI (if you enabled it) runs in
67
+ your namespace.
68
+
69
+ ## Commit message conventions
70
+
71
+ Maintainers follow Conventional Commits and the hooks enforce
72
+ it. External contributors do not need to follow this format --
73
+ the maintainer who merges your PR rewrites the merge commit
74
+ as needed.
75
+
76
+ ## Security disclosures
77
+
78
+ Do NOT open a public issue or PR for security vulnerabilities.
79
+ See the repository's `SECURITY.md` (if present) or the
80
+ organisation's security contact for the disclosure process.
81
+
82
+ ## Context
83
+
84
+ ### What this is
85
+
86
+ merrow is a CLI that turns a diagram file or hand-written Mermaid into Mermaid in a profile's look, renders it to SVG and lints it. It is company-neutral: no company's objects, colours or names live here, and a test fails if one creeps in. Those belong in a reference repo, loaded as a config layer.
87
+
88
+ ### Where things live
89
+
90
+ | Path | Holds |
91
+ |---|---|
92
+ | `src/merrow/cli.py` | Every command, `merrow <noun> <verb>` |
93
+ | `src/merrow/*.yaml` | The base config layer: defaults, sources, profiles, patterns, objects |
94
+ | `src/merrow/write.py`, `compose.py` | Graph to Mermaid: labels, classes, rows, stacked boundaries, stages |
95
+ | `src/merrow/render.py`, `bundle.py`, `browser.py` | Mermaid to SVG in a playwright page |
96
+ | `src/merrow/lint/diagram_check.py` | The standard's checks |
97
+ | `style/` | The diagram standard and templates lint holds diagrams to |
98
+ | `docs/diagrams/` | Sources for the diagrams in `docs/architecture.md` |
99
+
100
+ ### Commands that test a change
101
+
102
+ `hyperi-ci check` runs the quality gates and the tests. `uv run pytest -n 2` alone misses ruff, ty, semgrep and the docs checks. Render tests launch playwright's headless shell, which `merrow tools ensure` installs. On Debian and Ubuntu it needs Chrome's system libraries: `merrow tools ensure --install-deps` asks sudo for them.
103
+
104
+ ### What tends to bite
105
+
106
+ | Don't | Do | Why |
107
+ |---|---|---|
108
+ | Commit an icon pack, a publisher download or a render with publisher icons in a test fixture | Build packs into the cache, fake them in tests | Publisher terms bar redistribution |
109
+ | Name a company or product in merrow | Put it in a reference repo | `tests/test_neutral.py` fails the build |
110
+ | Hard-code a value | Add it to the YAML config | Every tunable goes through the cascade |
111
+ | Type `classDef` or `style` lines in a diagram | Use a profile and objects | Lint fails any styling inside a diagram |
112
+ | Lock a dependency right after its release with a warm uv cache | `uv lock --refresh` | uv serves the old index from its cache |
113
+
114
+ ### Where this sits
115
+
116
+ merrow depends on scalo-py (config, logging, HTTP) and on hyperi-ci for its CI. Reference repos are read by merrow as config layers and depend on its profile and object formats. Nothing else depends on merrow yet.
merrow-0.1.1/LICENSE ADDED
@@ -0,0 +1,73 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
12
+
13
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
14
+
15
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
16
+
17
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
18
+
19
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
20
+
21
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
22
+
23
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
24
+
25
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
26
+
27
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
28
+
29
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
30
+
31
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
32
+
33
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
34
+
35
+ (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
36
+
37
+ (b) You must cause any modified files to carry prominent notices stating that You changed the files; and
38
+
39
+ (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
+
41
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
42
+
43
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
+
45
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
+
47
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
+
49
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
+
51
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
+
53
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
+
55
+ END OF TERMS AND CONDITIONS
56
+
57
+ APPENDIX: How to apply the Apache License to your work.
58
+
59
+ To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
60
+
61
+ Copyright [yyyy] [name of copyright owner]
62
+
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
66
+
67
+ http://www.apache.org/licenses/LICENSE-2.0
68
+
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
merrow-0.1.1/Makefile ADDED
@@ -0,0 +1,41 @@
1
+ # Project: merrow
2
+ # File: Makefile
3
+ # Purpose: CI targets wrapping hyperi-ci
4
+ #
5
+ # License: Apache-2.0
6
+ # Copyright: (c) 2026 HYPERI PTY LIMITED
7
+
8
+ .PHONY: quality test build check starter examples
9
+
10
+ quality:
11
+ hyperi-ci run quality
12
+
13
+ test:
14
+ hyperi-ci run test
15
+
16
+ build:
17
+ hyperi-ci run build
18
+
19
+ check:
20
+ hyperi-ci check
21
+
22
+ # Rebuild the starter pack merrow ships, after a Carbon bump.
23
+ starter:
24
+ env MERROW_PACKS_DIR=src/merrow/packs uv run merrow pack build starter-icons
25
+
26
+ # Regenerate every worked example's Mermaid and SVGs. The AWS cases need
27
+ # `merrow pack build aws-icons aws-groups` first, the Kubernetes one
28
+ # `merrow pack build kubernetes-icons`, the Flink one `carbon-icons` and the
29
+ # OpenShift one `redhat-icons`.
30
+ examples:
31
+ uv run merrow graph render docs/examples/pipeline/pipeline.yaml --out docs/examples/pipeline
32
+ uv run merrow graph render --profile aws docs/examples/aws-web-app/web-app.yaml --out docs/examples/aws-web-app
33
+ uv run merrow graph render --profile aws docs/examples/aws-commerce/commerce.yaml --out docs/examples/aws-commerce
34
+ env MERROW_REFERENCES='["docs/examples/kubernetes/reference"]' uv run merrow graph render --profile k8s docs/examples/kubernetes/components.yaml --out docs/examples/kubernetes
35
+ env MERROW_REFERENCES='["docs/examples/c4-big-bank/reference"]' uv run merrow graph render docs/examples/c4-big-bank/context.yaml docs/examples/c4-big-bank/containers.yaml --out docs/examples/c4-big-bank
36
+ uv run merrow graph render docs/examples/bpmn-order/order.yaml docs/examples/bpmn-order/create-invoice.yaml --out docs/examples/bpmn-order
37
+ uv run merrow diagram apply docs/examples/oidc-login/login.md
38
+ uv run merrow diagram render docs/examples/oidc-login/login.md --out docs/examples/oidc-login
39
+ uv run merrow graph render docs/examples/campus-network/campus.yaml --out docs/examples/campus-network
40
+ uv run merrow graph render docs/examples/flink-platform/flink.yaml --out docs/examples/flink-platform
41
+ uv run merrow graph render docs/examples/openshift-platform/openshift.yaml --out docs/examples/openshift-platform