🎨 Palette: Correct metadata escaping in project initialization script#107
Conversation
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.
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- 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".
- 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`.
- 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`.
The
scripts/rename.pyscript was escaping project metadata (like description and author) for TOML format and then reusing those escaped strings when updatingdocs/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:
pyproject.tomlreplacements.docs/README.mdreplacements.This ensures a polished and correct initialization experience for users of the template.
PR created automatically by Jules for task 17798956751637777407 started by @amrabed