Skip to content

Major Refactor to Codebase Directory #615

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

Merged
merged 17 commits into from
Feb 25, 2025

Conversation

EdwardJXLi
Copy link
Contributor

Existing Implementation:

  • Mirrors how codebase.files operates
  • dir.files returns a recursive list of all source files
  • dir.subdirectories returns a recursive list of all directories
  • A reference between the file and directory is built during parse time (files hold a reference to dir, and dirs hold references to files)

New Implementation:

  • Mirrors more closely to the conceptual idea of a directory
  • dir.files returns all top level source files
  • dir.files now has a extensions argument just like codebase
  • dir.subdirectories returns all top level directories
  • Both dir.files and dir.subdirectories have a recursive=True flag to get everything (similar to old behaviour)
  • Introduces a dir.tree api to recursively list everything
  • dir.items is now a list
  • Directories and files are grabbed on the fly instead of being linked during parse time (file grabs directories using ctx.get_directory on the fly and vice versa)

@EdwardJXLi EdwardJXLi requested review from codegen-team and a team as code owners February 22, 2025 00:17
Copy link

codecov bot commented Feb 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files

@EdwardJXLi EdwardJXLi requested a review from bagel897 February 25, 2025 01:21
@EdwardJXLi EdwardJXLi dismissed bagel897’s stale review February 25, 2025 01:21

Addressed changes

@EdwardJXLi EdwardJXLi merged commit 3f33909 into develop Feb 25, 2025
25 of 26 checks passed
@EdwardJXLi EdwardJXLi deleted the eli-cg-10855-refactor-directory-parsing branch February 25, 2025 01:22
Copy link
Contributor

🎉 This PR is included in version 0.34.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants