Skip to content

feat: include project root files in packaged toolbox - #61

Merged
ehennestad merged 2 commits into
mainfrom
codex/package-license-file
Jul 16, 2026
Merged

feat: include project root files in packaged toolbox#61
ehennestad merged 2 commits into
mainfrom
codex/package-license-file

Conversation

@ehennestad

Copy link
Copy Markdown
Owner

Summary

ToolboxOptions only packages files below the source folder, so files like LICENSE that conventionally live in the project root were left out of packaged .mltbx releases.

  • matbox.tasks.packageToolbox now stages selected project root files into the source folder before packaging and removes the copies afterwards (via onCleanup, so they are cleaned up even on error)
  • Which files to include is declared in a new top-level "RootFilesToPackage" list in MLToolboxInfo.json, e.g. "RootFilesToPackage": ["LICENSE", "THIRD_PARTY_NOTICES.md"]. When the field is absent, the default is LICENSE
  • Warning behavior is two-tier: a missing default LICENSE is skipped silently (avoids noise for projects using e.g. LICENSE.txt), while a missing explicitly listed file warns (MatBox:Package:RootFileNotFound). A root file shadowed by an identically named file in the source folder also warns (MatBox:Package:RootFileShadowed) and is not overwritten

Tests

TasksTest now verifies that the packaged .mltbx contains the root LICENSE by default (and that the staged copy is cleaned up), that an explicit RootFilesToPackage list packages the listed files and warns on missing ones, and that a shadowing source-folder file wins with a warning and survives cleanup.

Once #60 (third-party notices) is merged, MatBox's own MLToolboxInfo.json can list ["LICENSE", "THIRD_PARTY_NOTICES.md"] so the notices ship in the .mltbx, closing that PR's follow-up.

🤖 Generated with Claude Code

ToolboxOptions only packages files below the source folder, so files
like LICENSE that conventionally live in the project root were left
out of the .mltbx. Root files are now staged into the source folder
before packaging and cleaned up afterwards.

The files to include are declared in a top-level RootFilesToPackage
list in MLToolboxInfo.json, defaulting to LICENSE. Explicitly listed
files that are missing trigger a warning, as does a root file shadowed
by an identically named file in the source folder.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

23 tests   23 ✅  18s ⏱️
 5 suites   0 💤
 1 files     0 ❌

Results for commit dc8009b.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.29%. Comparing base (2519f3d) to head (dc8009b).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   42.02%   43.29%   +1.26%     
==========================================
  Files          59       61       +2     
  Lines        1468     1522      +54     
==========================================
+ Hits          617      659      +42     
- Misses        851      863      +12     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehennestad
ehennestad merged commit 5204edc into main Jul 16, 2026
5 checks passed
ehennestad added a commit that referenced this pull request Jul 16, 2026
Covers the feature merged in #61: project root files declared in
MLToolboxInfo.json (default LICENSE) are included in the packaged
toolbox.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ehennestad added a commit that referenced this pull request Jul 16, 2026
Uses the RootFilesToPackage mechanism from #61 so the license and
third-party notices ship inside packaged toolbox releases, covering
the binary-redistribution condition of the climatedatastore license.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ehennestad
ehennestad deleted the codex/package-license-file branch July 16, 2026 19:53
ehennestad added a commit that referenced this pull request Jul 16, 2026
* docs: add CI section to README and CI configuration guide

Document how to set up GitHub Actions CI for toolbox repositories
using the matbox-actions reusable workflows: testing, code analysis,
spell checking, the release pipeline, badge behavior, and coverage.

Closes #42

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: make README intro benefit-oriented

Lead with the problems MatBox solves (no package manager, CI report
formats, manual packaging) and pair each capability with the concrete
command and artifact, replacing the abstract feature list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: point to example repositories from README intro

Real repositories show MatBox-produced badges, CI runs, and releases
live, serving as concrete demonstrations of the toolbox in use.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update README.md

* docs: soften README problem statement re modern MATLAB tooling

MATLAB R2023b+ buildtool tasks can produce JUnit and Cobertura
reports, and R2025a integrates toolbox packaging with projects, so
'no standard way' overclaimed. The durable gaps are dependency
installation and the per-repository glue, which is what the intro
now claims.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: document RootFilesToPackage packaging option

Covers the feature merged in #61: project root files declared in
MLToolboxInfo.json (default LICENSE) are included in the packaged
toolbox.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update GitHub badges

* docs: restructure README intro as problem-solution statements

One-sentence factual summary, then a problem/solution bullet per
capability, with the example repositories as bullets instead of
inside a sentence. Drops the duplicate Example Repositories section
and the remaining marketing phrasing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: polish README summary and example-repo lead-in

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: use 'See' for example-repo lead-in

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ehennestad added a commit that referenced this pull request Jul 16, 2026
* docs: add third-party notices for climatedatastore-derived code

Several task and utility functions plus the release workflow were
adapted from mathworks/climatedatastore, whose license requires
retaining the copyright notice, conditions, and disclaimer with
redistributed source, and keeps derivatives under its own terms
rather than MIT.

- Add THIRD_PARTY_NOTICES.md listing the adapted files and
  reproducing the climatedatastore license verbatim
- Scope the MIT grant in LICENSE to exclude the adapted portions
- Normalize per-file attribution headers to name the specific source
  file and point at THIRD_PARTY_NOTICES.md, adding headers to
  codecheckToolbox.m and testToolbox.m which lacked them

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: package LICENSE and THIRD_PARTY_NOTICES.md into the mltbx

Uses the RootFilesToPackage mechanism from #61 so the license and
third-party notices ship inside packaged toolbox releases, covering
the binary-redistribution condition of the climatedatastore license.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update GitHub badges

* docs: make notices reference distribution-agnostic

'Repository root' is wrong for users who installed the .mltbx, where
THIRD_PARTY_NOTICES.md sits at the installed toolbox root instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Update GitHub badges

* Update GitHub badges

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

1 participant