Skip to content

Automate generate_readme.py: remove manual input, fix file listing, restore CI workflow#1

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1776059704-automate-generate-readme
Open

Automate generate_readme.py: remove manual input, fix file listing, restore CI workflow#1
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1776059704-automate-generate-readme

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Converts generate_readme.py from an interactive script (requiring 3 input() calls) into a fully automated script that generates README.md without any manual input.

Key changes:

  • Removed all input() calls — project name is auto-detected from the directory name; description and author are set as constants.
  • Fixed file listing — uses os.path.dirname(os.path.abspath(__file__)) so the script works correctly regardless of the current working directory. The old version used os.listdir() which depended on cwd and could list incorrect files.
  • Sorted file listing and added an IGNORED_NAMES set to exclude generated/hidden files (.git, .github, __pycache__, etc.).
  • Fixed usage command — changed python main.pypython ocr_app.py to match the actual entry point.
  • Restored GitHub Actions workflow (.github/workflows/generate-readme.yml) so the README is automatically regenerated on every push to main.

Review & Testing Checklist for Human

  • Run python generate_readme.py locally and verify the generated README.md lists all expected files (currently: Screenshot 2025-05-13 183426.png, diagram.png, ocr_app.py, requirements.txt)
  • Verify the GitHub Actions workflow triggers on the next push to main and successfully commits an updated README

Notes

  • The script now uses structured functions (list_project_files, generate_readme) instead of top-level procedural code, making it easier to test and extend.
  • The IGNORED_NAMES set can be expanded if new generated/hidden files are added to the repo in the future.

Link to Devin session: https://app.devin.ai/sessions/85a46d32a67645a086fc02185942f999
Requested by: @liohnerd16

…estore CI workflow

Co-Authored-By: liohnerd16 <liohnerd16@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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