Skip to content

Feature/buildtool package publish#153

Open
slahoti1 wants to merge 8 commits into
piermorel:masterfrom
slahoti1:feature/buildtool-package-publish
Open

Feature/buildtool package publish#153
slahoti1 wants to merge 8 commits into
piermorel:masterfrom
slahoti1:feature/buildtool-package-publish

Conversation

@slahoti1

Copy link
Copy Markdown
Contributor

This PR adds package and publish tasks to the buildfile, replacing the standalone createMLTBX.m approach with proper buildtool integration.

Summary:

  • package task replaces the standalone createMLTBX.m script with a proper buildtool task. Instead of passing the version as a
    function argument, it reads from the CI_COMMIT_TAG environment variable. The release workflow sets a git tag (ex - v3.0.2) and the package task picks it up automatically.
  • publish task leverages MATLAB's publish to convert example .m files into self-contained HTML pages. MATLAB's Rich text editing format (%% Section, % * bullet, % ) embedded directly in .m files produces beautifully formatted documentation without requiring Live Scripts (.mlx). This replaces the old approach of manually exporting each .mlx file and shuffling images around. Inputs/outputs are declared so the task is skipped entirely when sources haven't changed.
  • "index.m" solves the discoverability problem: with 27 example files generating HTML, navigation can be difficult. index.m is a single table-of-contents file organized by topic (Getting Started, Distributions, Faceting, Colors, Geom Layers, Stat Layers, Advanced). Running publish on it produces index.html, a landing page that links to every example, letting users browse it seamlessly without remembering file names.
  • Generated HTML should not be source-controlled. In the main branch HTML pages are pushed in source control, this leads to noisy diffs and stale artifacts. Instead, HTML is produced on demand via buildtool publish and deployed to GitHub Pages through CI. The gramm/examples/html/ directory is meant to be gitignored.

Note: The example .m files included here are provided as a reference structure. They have not been modified with rich-text formatting yet. We encourage individually enhancing each example_*.m with MATLAB's markup syntax to produce polished, narrated HTML documentation when published.

Issue
Fixes #144

slahoti1 and others added 7 commits May 13, 2026 14:53
Replace createMLTBX.m with buildtool tasks: packageTask reads version
from CI_COMMIT_TAG env var (falls back to .prj default), publishTask
converts edited examples to HTML with auto-generated index.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…i1/gramm into feature/buildtool-package-publish

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@piermorel

Copy link
Copy Markdown
Owner

Hi @slahoti1 Thanks for the pull request ! Here I see that the check has failed. Is it normal due to the changes you did clashing with what is existing ?

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.

Leverage Buildtool task to publish documentation and package the toolbox.

2 participants