Skip to content

🎨 Palette: Correct metadata escaping in project initialization script#107

Merged
amrabed merged 4 commits into
mainfrom
fix-metadata-escaping-rename-script-17798956751637777407
Jun 26, 2026
Merged

🎨 Palette: Correct metadata escaping in project initialization script#107
amrabed merged 4 commits into
mainfrom
fix-metadata-escaping-rename-script-17798956751637777407

Conversation

@google-labs-jules

Copy link
Copy Markdown
Contributor

The scripts/rename.py script was escaping project metadata (like description and author) for TOML format and then reusing those escaped strings when updating docs/README.md. This resulted in unnecessary backslashes appearing in the project's README header if the description contained double quotes or other characters requiring TOML escaping.

This PR fixes the issue by:

  1. Storing both raw and TOML-escaped versions of the metadata.
  2. Using the TOML-escaped versions specifically for pyproject.toml replacements.
  3. Using the raw versions for the CLI summary and docs/README.md replacements.

This ensures a polished and correct initialization experience for users of the template.


PR created automatically by Jules for task 17798956751637777407 started by @amrabed

Metadata (description, author, email) was being escaped for TOML and then
reused for Markdown, leading to incorrect backslashes appearing in
docs/README.md. This change maintains separate raw and escaped versions
to ensure correct formatting in both pyproject.toml and README.md.
@google-labs-jules

Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Comment thread scripts/init.py
- Renamed `scripts/rename.py` to `scripts/init.py` for better clarity.
- Updated `pyproject.toml` and `mise.toml` to reflect the rename.
- Fixed metadata escaping in the initialization script to ensure correct
  formatting in both `pyproject.toml` (escaped) and `README.md` (raw).
- Updated documentation to use "Initialize" instead of "Rename".
Comment thread mise.toml Outdated
Comment thread AGENTS.md Outdated
Comment thread docs/README.md Outdated
- Removed redundant `tasks.project` and `tasks.rename` in favor of `tasks.init`.
- Set `p` as the alias for `tasks.init` to avoid conflict with `i` (install).
- Updated all documentation references to use `mise run init`.
- Ensured consistency across `mise.toml`, `AGENTS.md`, and `docs/README.md`.
Comment thread AGENTS.md Outdated
Comment thread mise.toml Outdated
- Removed the `p` alias for the `init` task in `mise.toml`.
- Updated `AGENTS.md` to remove the alias reference.
- Kept the command as `mise run init`.
@amrabed amrabed marked this pull request as ready for review June 26, 2026 10:00
@amrabed amrabed merged commit a997b90 into main Jun 26, 2026
3 checks passed
@amrabed amrabed deleted the fix-metadata-escaping-rename-script-17798956751637777407 branch June 26, 2026 10:01
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