Skip to content

Conversation

@kutumia
Copy link
Contributor

@kutumia kutumia commented Mar 23, 2025

This PR addresses Issue #1820 by automating the generation of PEcAn's directory structure documentation.

  1. Changes Made:
    Added a new script: scripts/generate_dir_structure.sh

  2. Recursively lists all folders in the project
    Outputs results to documentation/directory_structure.md in a clean Markdown format

  3. Updated scripts/README.md
    Included description of the new script under Documentation and Dependencies

  4. Updated the root Makefile
    Introduced a new target: generate-dir-doc
    This target runs the script automatically as part of the documentation workflow

How to Use:
To regenerate the directory documentation manually, run in bash: make generate-dir-doc

This will update documentation/directory_structure.md with the latest folder structure.

.PHONY: generate-dir-doc

generate-dir-doc:
@bash scripts/generate_dir_structure.sh
Copy link
Member

Choose a reason for hiding this comment

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

@infotroph should this be added to the doc target instead of a separate target?

@infotroph
Copy link
Member

Thank you, @kutumia, for the work on this, and my apologies for the long wait for a review. I had thought this PR contained useful updates to scripts/README.md that we should consider adopting, but I now see those were already merged as part of #3494.

The core functionality proposed here does indeed implement what #1820 specifies, but speaking for myself I don't need or want the feature that #1820 requested. I'll wait for other team members to weigh in before taking any action, but my sense is that an automatically compiled list of directories will only be useful if it provides some additional explanation/metadata/context that can't be gotten from simply looking at the folders. Since the directory_structure.md created here shows nothing but folder names, personally I'd rather look at that in my file browser than in a Markdown document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants