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

chore(docs): autogeneration of NoirJS docs #3349

Merged
merged 12 commits into from
Nov 6, 2023
Merged

Conversation

signorecello
Copy link
Contributor

@signorecello signorecello commented Oct 29, 2023

Description

This PR adds autogenerated docs for NoirJS packages, using Typedoc

Problem*

We're spending way too much time changing function signatures and similar stuff. We should be able to rely on autogeneration for that.

Resolves #3199

Summary*

  • Adds and configures two plugins to docusaurus in order to generate sidebars, and make the return of typedoc be formatted in markdown
  • Exports types from noir_js and backend_barretenberg so they are documented, apparently this is the only way of documenting the types. I find Typedoc too opinionated, but afaik there's no better tool

Additional context

I hacked around a bunch of ignores here and there, they'd tipically be made private but for some reason they aren't so I'm manually ignoring them. Again, Typedoc expects code to be written in a certain format in order to be documented in a certain way

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Oct 29, 2023
@socket-security
Copy link

socket-security bot commented Oct 29, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
typedoc-plugin-merge-modules 5.1.0 network +14 36.8 MB krisztianb
typedoc-plugin-frontmatter 0.0.2 None +0 13.4 kB tgreyuk
docusaurus-plugin-typedoc 1.0.0-next.18 network +16 37.2 MB tgreyuk
typedoc-plugin-markdown 4.0.0-next.25 network +14 36.9 MB tgreyuk
typedoc 0.25.3 network, filesystem +12 35.4 MB typedoc-bot

@signorecello signorecello changed the title Zpedro/autogen noirjs chore(docs): autogeneration of NoirJS docs Oct 29, 2023
@signorecello
Copy link
Contributor Author

These docs builds fail and will continue to fail because they depend on other package's build processes. Unfortunately netlify doesn't really provide a way to define a better CI process.

However #3296 already solves this by building with the Github CI. So let's block this one until we merge that, and I'll figure out then

@noir-lang noir-lang deleted a comment from github-actions bot Nov 3, 2023
Copy link
Contributor

github-actions bot commented Nov 3, 2023

@signorecello signorecello marked this pull request as ready for review November 3, 2023 13:34
@signorecello
Copy link
Contributor Author

gtg @Savio-Sou

@critesjosh
Copy link
Contributor

Is it possible to autogenerate links to the source code on github?

Copy link
Collaborator

@Savio-Sou Savio-Sou left a comment

Choose a reason for hiding this comment

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

This is incredible. Thank you @signorecello!

@Savio-Sou Savio-Sou added this pull request to the merge queue Nov 6, 2023
Merged via the queue into master with commit fab9970 Nov 6, 2023
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-generate NoirJS docs
3 participants