safetygence-mad 0.1.0__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 (73) hide show
  1. safetygence_mad-0.1.0/.gitignore +11 -0
  2. safetygence_mad-0.1.0/.gitlab-ci.yml +44 -0
  3. safetygence_mad-0.1.0/AGENTS.md +27 -0
  4. safetygence_mad-0.1.0/CHANGELOG.md +27 -0
  5. safetygence_mad-0.1.0/LICENSE +14 -0
  6. safetygence_mad-0.1.0/NOTICE +14 -0
  7. safetygence_mad-0.1.0/PKG-INFO +561 -0
  8. safetygence_mad-0.1.0/README.md +531 -0
  9. safetygence_mad-0.1.0/ci/check_installation.py +76 -0
  10. safetygence_mad-0.1.0/docs/assets/mad-mascot.png +0 -0
  11. safetygence_mad-0.1.0/docs/assets/workflow.svg +51 -0
  12. safetygence_mad-0.1.0/docs/branding.md +32 -0
  13. safetygence_mad-0.1.0/packaging/conda-env.json +4 -0
  14. safetygence_mad-0.1.0/pixi.lock +905 -0
  15. safetygence_mad-0.1.0/pixi.toml +80 -0
  16. safetygence_mad-0.1.0/pyproject.toml +61 -0
  17. safetygence_mad-0.1.0/src/mad_cli/__init__.py +3 -0
  18. safetygence_mad-0.1.0/src/mad_cli/__main__.py +3 -0
  19. safetygence_mad-0.1.0/src/mad_cli/build.py +153 -0
  20. safetygence_mad-0.1.0/src/mad_cli/cli.py +579 -0
  21. safetygence_mad-0.1.0/src/mad_cli/data/slidev/package.json +12 -0
  22. safetygence_mad-0.1.0/src/mad_cli/data/slidev/pnpm-lock.yaml +7103 -0
  23. safetygence_mad-0.1.0/src/mad_cli/data/slidev/pnpm-workspace.yaml +5 -0
  24. safetygence_mad-0.1.0/src/mad_cli/files.py +139 -0
  25. safetygence_mad-0.1.0/src/mad_cli/git_templates.py +183 -0
  26. safetygence_mad-0.1.0/src/mad_cli/preview.py +118 -0
  27. safetygence_mad-0.1.0/src/mad_cli/project.py +241 -0
  28. safetygence_mad-0.1.0/src/mad_cli/publish.py +197 -0
  29. safetygence_mad-0.1.0/src/mad_cli/runtime.py +143 -0
  30. safetygence_mad-0.1.0/src/mad_cli/templates.py +154 -0
  31. safetygence_mad-0.1.0/src/mad_cli/worker.py +155 -0
  32. safetygence_mad-0.1.0/templates/report/.gitignore +3 -0
  33. safetygence_mad-0.1.0/templates/report/README.md +13 -0
  34. safetygence_mad-0.1.0/templates/report/mad.yml +21 -0
  35. safetygence_mad-0.1.0/templates/report/resources/README.md +1 -0
  36. safetygence_mad-0.1.0/templates/report/src/_extensions/report/_extension.yml +10 -0
  37. safetygence_mad-0.1.0/templates/report/src/_extensions/report/typst-show.typ +80 -0
  38. safetygence_mad-0.1.0/templates/report/src/_extensions/report/typst-template.typ +196 -0
  39. safetygence_mad-0.1.0/templates/report/src/_quarto.yml +27 -0
  40. safetygence_mad-0.1.0/templates/report/src/citations.yaml +8 -0
  41. safetygence_mad-0.1.0/templates/report/src/document-history.md +4 -0
  42. safetygence_mad-0.1.0/templates/report/src/ieee.csl +519 -0
  43. safetygence_mad-0.1.0/templates/report/src/images/example.svg +1 -0
  44. safetygence_mad-0.1.0/templates/report/src/index.md +5 -0
  45. safetygence_mad-0.1.0/templates/report/src/introduction.md +16 -0
  46. safetygence_mad-0.1.0/templates/report/src/references.md +8 -0
  47. safetygence_mad-0.1.0/templates/report/src/report-layout.lua +468 -0
  48. safetygence_mad-0.1.0/templates/report/src/style.css +5 -0
  49. safetygence_mad-0.1.0/templates/slides/.gitignore +3 -0
  50. safetygence_mad-0.1.0/templates/slides/README.md +13 -0
  51. safetygence_mad-0.1.0/templates/slides/mad.yml +9 -0
  52. safetygence_mad-0.1.0/templates/slides/resources/README.md +1 -0
  53. safetygence_mad-0.1.0/templates/slides/src/chapters/next-steps.md +7 -0
  54. safetygence_mad-0.1.0/templates/slides/src/chapters/overview.md +11 -0
  55. safetygence_mad-0.1.0/templates/slides/src/components/FeatureCard.vue +6 -0
  56. safetygence_mad-0.1.0/templates/slides/src/components/Frame.vue +7 -0
  57. safetygence_mad-0.1.0/templates/slides/src/fonts/OFL.txt +93 -0
  58. safetygence_mad-0.1.0/templates/slides/src/fonts/manrope-bold.ttf +0 -0
  59. safetygence_mad-0.1.0/templates/slides/src/fonts/manrope-extrabold.ttf +0 -0
  60. safetygence_mad-0.1.0/templates/slides/src/fonts/manrope-regular.ttf +0 -0
  61. safetygence_mad-0.1.0/templates/slides/src/images/example.svg +1 -0
  62. safetygence_mad-0.1.0/templates/slides/src/layouts/mad-content.vue +1 -0
  63. safetygence_mad-0.1.0/templates/slides/src/layouts/mad-cover.vue +1 -0
  64. safetygence_mad-0.1.0/templates/slides/src/slides.md +23 -0
  65. safetygence_mad-0.1.0/templates/slides/src/style.css +22 -0
  66. safetygence_mad-0.1.0/tests/browser.cjs +53 -0
  67. safetygence_mad-0.1.0/tests/conftest.py +13 -0
  68. safetygence_mad-0.1.0/tests/test_cli.py +286 -0
  69. safetygence_mad-0.1.0/tests/test_packaging.py +18 -0
  70. safetygence_mad-0.1.0/tests/test_projects.py +123 -0
  71. safetygence_mad-0.1.0/tests/test_publish.py +63 -0
  72. safetygence_mad-0.1.0/tests/test_render.py +129 -0
  73. safetygence_mad-0.1.0/tests/test_templates.py +253 -0
@@ -0,0 +1,11 @@
1
+ .pixi/*
2
+ !.pixi/config.toml
3
+ __pycache__/
4
+ *.py[cod]
5
+ *.egg-info/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ .idea/
9
+ /dist/
10
+ /output/
11
+ /templates/*/output/
@@ -0,0 +1,44 @@
1
+ image: ghcr.io/prefix-dev/pixi:0.80.0@sha256:4cb073300e2c5eaee287bb3bcbadd3ddb7bce4ce36b27c41a19aad74c297c2f3
2
+
3
+ stages:
4
+ - test
5
+ - publish
6
+
7
+ verify:
8
+ stage: test
9
+ before_script:
10
+ # Pixi needs Git to fetch source packages; this minimal image omits it.
11
+ - apt-get update && apt-get install -y --no-install-recommends git
12
+ script:
13
+ - pixi run --locked lint
14
+ - pixi run --locked test
15
+ - pixi run --locked package
16
+ - pixi exec --spec uv==0.12.19 -- uvx --from twine==7.0.0 twine check --strict output/packages/*.whl output/packages/*.tar.gz
17
+ - pixi run --locked python -m venv "$HOME/.cache/mad-ci/wheel"
18
+ - pixi exec --spec uv==0.12.19 -- uv pip install --python "$HOME/.cache/mad-ci/wheel/bin/python" output/packages/*.whl
19
+ - '"$HOME/.cache/mad-ci/wheel/bin/python" -I ci/check_installation.py --command "$HOME/.cache/mad-ci/wheel/bin/mad"'
20
+ - pixi exec --spec uv==0.12.19 -- uv pip install --reinstall --python "$HOME/.cache/mad-ci/wheel/bin/python" output/packages/*.tar.gz
21
+ - '"$HOME/.cache/mad-ci/wheel/bin/python" -I ci/check_installation.py --command "$HOME/.cache/mad-ci/wheel/bin/mad"'
22
+ - pixi publish --target-dir output/packages --build-dir "$HOME/.cache/mad-ci/build"
23
+ - PIXI_HOME="$HOME/.cache/mad-ci/global" pixi global install --git "file://$CI_PROJECT_DIR" --rev "$CI_COMMIT_SHA"
24
+ - '"$HOME/.cache/mad-ci/global/envs/safetygence-mad/bin/python" -I ci/check_installation.py --command "$HOME/.cache/mad-ci/global/bin/mad"'
25
+ artifacts:
26
+ paths:
27
+ - output/packages/
28
+ expire_in: 1 week
29
+
30
+ publish-pypi:
31
+ stage: publish
32
+ needs:
33
+ - job: verify
34
+ artifacts: true
35
+ rules:
36
+ - if: '$CI_PROJECT_PATH == "exida-oss/stig/mad" && $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/ && $CI_COMMIT_REF_PROTECTED == "true"'
37
+ environment:
38
+ name: pypi
39
+ url: https://pypi.org/project/safetygence-mad/
40
+ id_tokens:
41
+ PYPI_ID_TOKEN:
42
+ aud: pypi
43
+ script:
44
+ - pixi exec --spec uv==0.12.19 -- uv publish --trusted-publishing always output/packages/*.whl output/packages/*.tar.gz
@@ -0,0 +1,27 @@
1
+ # MAD
2
+
3
+ Read README.md for the public command and project contracts.
4
+
5
+ - The command is `mad`, the distribution is `safetygence-mad`, and project branding
6
+ belongs to SAFETYGENCE. Keep the actual hosting URL when linking the repository.
7
+ - Keep a single Typer API for documents and presentations.
8
+ - Use `report` and `slides` as project types and bundled template names. Keep
9
+ paths as operands and type, format, provider and behavior choices as options.
10
+ - Documents use Quarto and its embedded Typst; never add a LaTeX backend or a
11
+ second Typst installation.
12
+ - Authored projects contain sources and configuration. All environments,
13
+ dependencies, browser binaries and intermediates belong in shared user caches.
14
+ - Keep the tool's location independent from the selected authored project's path.
15
+ - Preserve source edits and previously released artifacts. Clean only MAD-owned
16
+ generated output; publishing uses a temporary worktree and normal Git pushes.
17
+ - Keep public templates neutral and synthetic. Never import private customer
18
+ content, company artwork without suitable redistribution rights, or credentials.
19
+ - Pin native dependencies in pixi.toml/pixi.lock and Node dependencies in the
20
+ bundled Slidev package manifest and pnpm lockfile.
21
+ - Run `pixi run --locked lint` and `pixi run --locked test`. For renderer, path,
22
+ staging or dependency changes, also run `pixi run --locked integration` and
23
+ inspect real HTML/PDF renders. Check packaging after resource changes.
24
+ - Preview releases do not promise API stability; maintain one coherent
25
+ implementation and update its callers, templates and documentation together.
26
+ - Published release tags and package versions are immutable. Use a new version
27
+ for changes to a published distribution.
@@ -0,0 +1,27 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 — 2026-10-16
4
+
5
+ First public preview of MAD — Markdown Authoring and Delivery, by SAFETYGENCE.
6
+
7
+ - One CLI for Markdown reports and Vue presentations: create, build, serve,
8
+ publish, clean and manage templates.
9
+ - Professional PDF documents through Quarto and its embedded Typst, with HTML
10
+ output from the same project.
11
+ - Slidev/Vue presentations as HTML slides and PDF exports, with single-file or
12
+ chapter-based sources and reusable components.
13
+ - Pixi-managed runtimes and shared caches outside authored projects; no
14
+ project-local virtual environments or Node installations.
15
+ - Incremental HTML/PDF builds with input and output tracking, explicit cleanup,
16
+ and preservation of the last successful output when rendering fails.
17
+ - Local and Git templates, configurable metadata, version history and a common
18
+ `src/` structure for both project types.
19
+ - GitLab Pages and GitHub Pages publishing with configurable deployment branches
20
+ and paths.
21
+ - Installation directly from a Git tag with Pixi; Python wheel and source archive
22
+ distributed as `safetygence-mad`, exposing the `mad` command.
23
+
24
+ Rendering currently supports Linux x86-64. macOS and native Windows renderer
25
+ lockfiles are not yet supported. Live preview rebuilds production HTML after
26
+ changes; it does not provide Slidev's editor or Vue component hot replacement.
27
+ External URLs and host fonts are outside the local build dependency graph.
@@ -0,0 +1,14 @@
1
+ Zero-Clause BSD
2
+
3
+ Copyright (C) 2026 SAFETYGENCE
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,14 @@
1
+ MAD source code and original generic template adaptations: Copyright 2026 SAFETYGENCE, licensed under 0BSD (LICENSE).
2
+
3
+ Bundled third-party assets:
4
+
5
+ * templates/report/src/ieee.csl is the IEEE citation style from the Citation
6
+ Style Language styles project (https://github.com/citation-style-language/styles).
7
+ Its author and contributor list, attribution, and Creative Commons
8
+ Attribution-ShareAlike 3.0 license URL are preserved in its <info> element.
9
+ The citation style has not been modified.
10
+ * templates/slides/src/fonts contains Manrope fonts. Their copyright and
11
+ SIL Open Font License 1.1 text are in that directory's OFL.txt.
12
+
13
+ Quarto, Typst, Slidev, Vue, Chromium and other dependencies are downloaded by the
14
+ locked toolchain. They remain subject to their respective upstream licenses.