From 2ce5b324aa3104cc890f22b727f43c7a4cecc016 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Tue, 2 Jun 2026 14:50:24 -0500 Subject: [PATCH 1/4] The scripts directory is already auto-included since it's under src/madengine/. The force-include was causing 'duplicate file' errors with newer hatchling versions that are stricter about this. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 41ef7b0c..2dea5d79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -78,8 +78,8 @@ all = [ [tool.hatch.build.targets.wheel] [tool.hatch.build.targets.wheel.force-include] -"src/madengine/scripts" = "madengine/scripts" -"src/madengine/deployment/templates" = "madengine/deployment/templates" +# Note: scripts directory is auto-included since it's under src/madengine/ +# Do NOT add force-include for it - causes duplicate file errors in newer hatchling [tool.hatch.version] source = "versioningit" From aa4dedc53413f1d11ba8c0adba0c3e909679248f Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Tue, 2 Jun 2026 15:54:03 -0400 Subject: [PATCH 2/4] Update pyproject.toml --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2dea5d79..595cd2fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,8 +76,6 @@ all = [ ] [tool.hatch.build.targets.wheel] - -[tool.hatch.build.targets.wheel.force-include] # Note: scripts directory is auto-included since it's under src/madengine/ # Do NOT add force-include for it - causes duplicate file errors in newer hatchling From fd749c0814684f9ba2b34ab1b88458c95e24b971 Mon Sep 17 00:00:00 2001 From: Stephen Shao Date: Tue, 2 Jun 2026 19:06:08 -0500 Subject: [PATCH 3/4] fix: use hatch artifacts to include scripts/ excluded by .gitignore Co-Authored-By: Claude Sonnet 4 --- pyproject.toml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 595cd2fc..5ec8f129 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,8 +76,11 @@ all = [ ] [tool.hatch.build.targets.wheel] -# Note: scripts directory is auto-included since it's under src/madengine/ -# Do NOT add force-include for it - causes duplicate file errors in newer hatchling +# scripts/ is listed in .gitignore (to exclude external MAD project scripts/ dirs during dev). +# artifacts bypasses VCS exclusion without risk of duplicate-file errors from force-include. +artifacts = [ + "src/madengine/scripts/**", +] [tool.hatch.version] source = "versioningit" From e74a0b2ea4ff34eaaa3ed38fcd0f1619e91d23cf Mon Sep 17 00:00:00 2001 From: Stephen Shao Date: Tue, 2 Jun 2026 19:42:45 -0500 Subject: [PATCH 4/4] chore: add v2.1.1 changelog entry Co-Authored-By: Claude Sonnet 4 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75c63679..657a868f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.1.1] - 2026-06-02 + +### Fixed + +- **`tools/` build context conditionally included**: `docker build` now only passes `--build-context tools=./scripts/common/tools` when the `tools` directory actually exists, preventing build failures in environments where the directory is absent (e.g. clean checkouts before `madengine run` populates `scripts/common/`). + +- **SLURM env var escaping**: Switched from `shlex.quote()` to double-quote escaping for env var values in generated SBATCH wrapper scripts. `shlex.quote()` produced single-quoted strings that broke paths with spaces and special characters (e.g. directories with embedded variables); double-quoting is more portable for shell assignment in SLURM batch contexts. + +- **Hatch package artifacts include `scripts/`**: `pyproject.toml` now uses `[tool.hatch.build.artifacts]` to force-include the `scripts/` directory in the built wheel, ensuring pre/post scripts and tools bundled under `src/madengine/scripts/` are present in installed environments even though `.gitignore` excludes them from source tracking. Removes the previous `force-include` directive that caused `duplicate file` errors with newer hatchling versions. + ## [2.1.0] - 2026-05-28 ### Added