Skip to content

Modernize GitHub Action to auto-generate DIRECTORY.md #6308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

DenizAltunkapan
Copy link
Collaborator

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Refactored the workflow to automatically generate and commit DIRECTORY.md on each push. All classes and tests are now listed in a modern and readable format.

Example:

image

@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.16%. Comparing base (981d73d) to head (b111d44).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6308   +/-   ##
=========================================
  Coverage     74.16%   74.16%           
  Complexity     5362     5362           
=========================================
  Files           678      678           
  Lines         18686    18686           
  Branches       3625     3625           
=========================================
  Hits          13858    13858           
  Misses         4273     4273           
  Partials        555      555           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DenizAltunkapan
Copy link
Collaborator Author

If desired, the generator can be configured to show only Java files in the main directory, excluding tests. Let me know!

@siriak
Copy link
Member

siriak commented Jun 25, 2025

Is there an example of diff between old and new DIRECTORY?
Is it possible to include directory tree generator script directly into workflow?

@DenizAltunkapan
Copy link
Collaborator Author

Is there an example of diff between old and new DIRECTORY? Is it possible to include directory tree generator script directly into workflow?

Old Version:
image

My Version:
image

yes, technically i think it might be possible to include the directory tree generator script directly into the workflow. However, I’ve chosen to reference it from my own repository to keep things modular and maintainable — plus, it’s more fun that way 🙂

@siriak
Copy link
Member

siriak commented Jun 25, 2025

Ok, just please remove .java extension from file names, everyting else looks good

@DenizAltunkapan DenizAltunkapan force-pushed the feature/update-directory-generator-workflow branch from 5bab59c to dc40e6b Compare June 26, 2025 17:43
@DenizAltunkapan DenizAltunkapan force-pushed the feature/update-directory-generator-workflow branch from dc40e6b to d682f6b Compare June 26, 2025 18:06
@TheAlgorithms TheAlgorithms deleted a comment from siriak Jun 28, 2025
@DenizAltunkapan
Copy link
Collaborator Author

@siriak - Done. Previously, it seemed that the old python-workflow didn’t run reliably, as some files were missing. However, it is now guaranteed that the DIRECTORY.md is updated on every push as wished

image

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

Nice, let's see how it works!

@siriak siriak enabled auto-merge (squash) June 29, 2025 07:03
@siriak siriak merged commit 67ccb62 into TheAlgorithms:master Jun 29, 2025
6 of 7 checks passed
@DenizAltunkapan DenizAltunkapan deleted the feature/update-directory-generator-workflow branch June 29, 2025 08:48
@DenizAltunkapan DenizAltunkapan restored the feature/update-directory-generator-workflow branch June 29, 2025 08:48
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.

3 participants