Skip to content

fix: remove redundant force-include that breaks newer hatchling#141

Merged
coketaste merged 4 commits into
developfrom
gargrahul/fix_force_include
Jun 3, 2026
Merged

fix: remove redundant force-include that breaks newer hatchling#141
coketaste merged 4 commits into
developfrom
gargrahul/fix_force_include

Conversation

@gargrahul
Copy link
Copy Markdown
Collaborator

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.

…adengine/. The force-include was causing 'duplicate file' errors with newer hatchling versions that are stricter about this.
Copilot AI review requested due to automatic review settings June 2, 2026 19:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Hatchling wheel build configuration to avoid newer Hatchling “duplicate file” errors by removing redundant force-include entries for paths that are already included via the src/ layout under src/madengine/.

Changes:

  • Removed tool.hatch.build.targets.wheel.force-include mappings for src/madengine/scripts and src/madengine/deployment/templates.
  • Added an inline note documenting why those force-includes should not be reintroduced.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml Outdated
coketaste and others added 2 commits June 2, 2026 19:06
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 3, 2026 00:43
@coketaste coketaste merged commit 1bd8ec6 into develop Jun 3, 2026
1 check passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread CHANGELOG.md

- **`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.
Comment thread CHANGELOG.md

- **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.
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.

3 participants