Skip to content

build-collection.sh: Rename base README.md to make it invisible for AAH#1411

Open
t-woerner wants to merge 1 commit intofreeipa:masterfrom
t-woerner:build_collection_update_for_aah
Open

build-collection.sh: Rename base README.md to make it invisible for AAH#1411
t-woerner wants to merge 1 commit intofreeipa:masterfrom
t-woerner:build_collection_update_for_aah

Conversation

@t-woerner
Copy link
Copy Markdown
Member

@t-woerner t-woerner commented Feb 10, 2026

AAH and also Galaxy are automatically trying to render the base README.md file in the collection even if "readme" is set to another file in galaxy.yml.

Fixes:

  1. README.md is renamed to README-COLLECTION.md
  2. New README.md is generated with information about the rename and also
    pointing to the README-COLLECTION.md file in the collection and also
    the upstream documentation (versioned and latest).
  3. Upstream "documentation" in galaxy.yml set to new README.md file.

Summary by Sourcery

Adjust collection build script to rename the original README to an internal collection README and generate a new top-level README to satisfy AAH/Galaxy rendering behavior while updating galaxy.yml metadata accordingly.

Enhancements:

  • Rename the original collection README.md to README-COLLECTION.md and update references so that AAH/Galaxy render the new wrapper README instead of the internal documentation file.
  • Update galaxy.yml metadata to point both readme and documentation fields to the new README.md file.

Documentation:

  • Generate a new user-facing README.md that explains the renamed collection README and links to versioned and latest upstream documentation.

AAH and also Galaxy are automatically trying to render the base README.md
file in the collection even if "readme" is set to another file in galaxy.yml.

Fixes:
1) README.md is renamed to README-COLLECTION.md
2) New README.md is generated with information about the rename and also
   pointing to the README-COLLECTION.md file in the collection and also
   the upstream documentation (versioned and latest).
3) Upstream "documentation" in galaxy.yml set to new README.md file.
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The mv README.md README-COLLECTION.md call assumes README.md is always present; consider guarding it with a file existence check or failing with a clearer error to avoid unexpected build-time errors in edge cases.
  • Updating readme and documentation in galaxy.yml with sed -i 's/.../...' will silently do nothing if the keys are missing or formatted differently; consider a more robust approach (e.g., anchoring on ^readme: / ^documentation: or using a YAML-aware tool) to avoid partially updated metadata.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `mv README.md README-COLLECTION.md` call assumes `README.md` is always present; consider guarding it with a file existence check or failing with a clearer error to avoid unexpected build-time errors in edge cases.
- Updating `readme` and `documentation` in `galaxy.yml` with `sed -i 's/.../...'` will silently do nothing if the keys are missing or formatted differently; consider a more robust approach (e.g., anchoring on `^readme:` / `^documentation:` or using a YAML-aware tool) to avoid partially updated metadata.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@t-woerner t-woerner added Needs Review Candidate Good candidate for next minor release. labels Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Candidate Good candidate for next minor release. Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant