Skip to content

Conversation

msadowski
Copy link
Contributor

@msadowski msadowski commented Jul 1, 2025

This PR adds a GitHub action that checks that the main README.md file is up to date. If someone forgets to autogenerate the files or modifies the file by hand, the action will fail.

@msadowski msadowski changed the title Autogenerate README on PR Create an action to check README.md was regenerated on PR Jul 1, 2025
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .utils/requirements.txt || true
Copy link
Contributor

Choose a reason for hiding this comment

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

Why || true here? Should we let it error here if install fails?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, let's fail if this fails for any reason

CONTRIBUTING Outdated
- `visualize_url` - the url to Foxglove visualization (optional)

When creating a merge request, a GitHub action should automatically regenerate the README based on your metadata. To test it yourself, you can run the python script `.utils/generate_readme.py` in the root of this repo.
4. Regenerate the main README.md by running `python .utils/generate_readme.py` from the root of the repo (install `.utils/requirements.txt` if needed).
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth fleshing out the "install requirements" in a separate section, though I know there are multiple ways to do it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a new section with the pip command I use for installing requirements


on:
pull_request:
paths:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is limiting the action to only run when these files have changed, right? But we want to check that the readme is up-to-date whenever content is added, so we should probably remove these.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this and made it run on all pull requests

@msadowski msadowski merged commit e97dc3c into main Jul 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants