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

Update v3 natspec to 3.0.3 and add natspec documentation pipeline #474

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

rossgalloway
Copy link
Collaborator

Content changes

  • Updated the V3 docs to the newest version (3.0.3) and moved the old version (3.0.2) into the deprecated folder in that directory.
  • updated the README to better reflect the process for updating natspec docs. Tried to improve install instructions.

Backend changes

New flow and script for creating natspec documentation. This is complete for V3 repos but still needs to be implemented for V2 (if worthwhile).

  • added v3 repos as submodules in the repo. These only need to be installed if working on netspec documentation.
  • added a new json file smartContracts.json which determines which contracts will be included in the documentation. If you want to include a natspec file in the developers/smart-contracts/v3/ directory you need to add it here.
  • Updated the template file contract.ejs to make vydoc better match the forge doc output.
  • Changed the vydoc dependency to point to my fork as I made changes to improve the output.
  • Created a new script called natspec-generate.mjs that can be run with yarn v3-docs to automate the natspec documentation flow. Features:
    • Moves existing natspec files into a new folder in the deprecated folder with the old version number
    • Generates natspec markdown files from solidity files in all submodule repos
    • Generates natspec markdown files from vyper files in all submodule repos
    • Copies the files that pattern match smartContracts.json into the developers/smart-contracts/v3/ and lints them.
    • Updates the index.md file to show the correct version number.
    • Cleans up the temp folders.
    • Will unwind and revert gracefully if the script fails.

If needed, this flow can be adapted for v2 vaults. Although if they don't use forge then I will have to play with getting solidity-docgen working.

Copy link

vercel bot commented Oct 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yearn-docs ❌ Failed (Inspect) Oct 15, 2024 3:03pm

clean up smartContracts.json
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.

1 participant