Skip to content
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

feat(graindoc)!: Support docblocks on submodules #1684

Merged
merged 3 commits into from
Feb 20, 2023

Conversation

phated
Copy link
Member

@phated phated commented Feb 20, 2023

This updates graindoc to support submodules. Since modules need to be processed recursively, I needed to refactor most of the graindoc internals. This was a really good refactor because it makes a clear separation between the attribute parsing, the docblock data types, and the markdown generation phase. Both the docblock collection and markdown generation are recursive so we can start at the top of the program tree and call Docblock.for_signature_items and the Docblock.to_markdown on the results and everything gets printed.

Since we don't have any submodules in the stdlib at the moment, I've run this against #1479 and pushed the updated docs as 4dfc7c5

Closes #1621

Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

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

This looks really good, and I appreciate the example. Great work!

@phated phated added this pull request to the merge queue Feb 20, 2023
Merged via the queue into main with commit bc13017 Feb 20, 2023
@phated phated deleted the phated/graindoc-submodules branch February 20, 2023 18:49
av8ta pushed a commit to av8ta/grain that referenced this pull request Apr 11, 2023
* chore(graindoc): Refactor separation between attributes & docblock

* feat(graindoc)!: Support docblocks on submodules

* chore(stdlib): Regenerate markdown docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Graindoc: Support new module system
2 participants