-
Notifications
You must be signed in to change notification settings - Fork 76
Add docs to oz docsite #298
Add docs to oz docsite #298
Conversation
Hi @frangio! Can you please enable doc site previews through netlify on this PR? I've already configured the repo, I think that's the only thing pending, let me know if there's something else. Thank you. |
I've added the webhook as described in https://github.com/OpenZeppelin/docs.openzeppelin.com#adding-a-new-repo. Make sure to do the other half of the instructions listed there. |
Ok I think I've added deploy previews. We need to add a new commit to trigger the build. |
Thank you! let me check |
✅ Deploy Preview for silver-paletas-e6cbf6 ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
…s-to-oz-docsite-#157
@andrew-fleming @martriay, I need to add the rest of the commands to CLI and NRE References, but I think it would be good to receive some feedback already from the format and the content of the doc site (and the general refactor). |
docs/modules/ROOT/pages/api.adoc
Outdated
@@ -0,0 +1,216 @@ | |||
== API Reference | |||
|
|||
Here you can find a complete reference of the functions provided by the NileRuntimeEnvironment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't think the refactor implied huge changes to the docs (afaict interface changes aren't that big), but we can definitely ship without these, and add them later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're almost there!
docs/modules/ROOT/pages/scripts.adoc
Outdated
@@ -18,7 +56,7 @@ async def run(nre): | |||
|
|||
NOTE: This script assumes there is an link:https://github.com/OpenZeppelin/nile/tree/main/src/nile/artifacts[Account artifact] in your project. You can add the contract to the contracts folder, and compile with `nile compile` to get the artifact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a comment, an alternative thing is to declarer_account.declare("Account", nile_account=True)
and it will declare nile's account artifact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script updated.
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
…delo/nile into feat/add-docs-to-oz-docsite-#157
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getting there 🚀
|
||
(4) Create a tag for the release. | ||
|
||
```sh | ||
git tag v0.8.0 | ||
git tag v0.12.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually there's no need to update this, but no reason against either
docs/modules/ROOT/pages/cli.adoc
Outdated
+ | ||
Select network: one of ('localhost', 'integration', 'goerli', 'goerli2', 'mainnet'). | ||
Select network: one of (localhost, integration, goerli, goerli2, mainnet). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm starting to ask myself whether we should abstract this into its own subsection and link to it, instead of repeating it everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added snippets to handle these repetitions at least on code, but not sure about moving it into another section and linking, I think if I were going to check a command I would appreciate having the information right there (no extra click for UX).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like your snippets solution better 👍
* xref:#node[`++node++`] | ||
* xref:#compile[`++compile++`] | ||
* xref:#setup[`++setup++`] | ||
* xref:#declare[`++declare++`] | ||
* xref:#deploy[`++deploy++`] | ||
* xref:#call[`++call++`] | ||
* xref:#send[`++send++`] | ||
* xref:#counterfactual-address[`++counterfactual-address++`] | ||
* xref:#status[`++status++`] | ||
* xref:#debug[`++debug++`] | ||
* xref:#get-accounts[`++get-accounts++`] | ||
* xref:#get-nonce[`++get-nonce++`] | ||
* xref:#get-balance[`++get-balance++`] | ||
* xref:#run[`++run++`] | ||
* xref:#clean[`++clean++`] | ||
* xref:#init[`++init++`] | ||
* xref:#version[`++version++`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wasn't, just pointing out that write operations are the ones that require accounts. i think the grouping is good but not that convinced about the names.
maybe:
- transactions ("write" is possibly implied, maybe status ones there too?)
- queries
- project management
- utils
docs/modules/ROOT/pages/index.adoc
Outdated
|
||
[,sh] | ||
---- | ||
(env): pip install cairo-nile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiple command ones should work as they are. the mac and linux is one an acceptable exception, but the answer for all cases is that it they can be split up:
nile compile
🤖 Compiling all Cairo contracts in the contracts directory
🔨 Compiling contracts/contract.cairo
✅ Done
sudo apt install -y libgmp3-dev # linux
brew install gmp # mac
docs/modules/ROOT/pages/scripts.adoc
Outdated
@@ -13,12 +51,10 @@ Useful if you need to deploy an account in devnet, for previous declaration: | |||
async def run(nre): | |||
accounts = await nre.get_accounts(predeployed=True) | |||
declarer_account = accounts[0] | |||
print(await declarer_account.declare("Account")) | |||
print(await declarer_account.declare("Account", nile_account=True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd add a small note explaining what nile_account
is (it tells nile to use its pre-packed artifacts)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a comment in the script.
Co-authored-by: Martín Triay <martriay@gmail.com>
Co-authored-by: Martín Triay <martriay@gmail.com>
…delo/nile into feat/add-docs-to-oz-docsite-#157
docs/modules/ROOT/pages/cli.adoc
Outdated
* xref:#init[`++init++`] | ||
* xref:#node[`++node++`] | ||
* xref:#compile[`++compile++`] | ||
* xref:#setup[`++setup++`] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this shouldn't be in Transactions
?
docs/modules/ROOT/pages/cli.adoc
Outdated
+ | ||
Select network: one of ('localhost', 'integration', 'goerli', 'goerli2', 'mainnet'). | ||
Select network: one of (localhost, integration, goerli, goerli2, mainnet). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like your snippets solution better 👍
+ | ||
Select network: one of (`localhost`, `integration`, `goerli`, `goerli2`, `mainnet`). | ||
+ | ||
Default to localhost. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default to localhost. | |
Default to `localhost`. |
(env): python -m pip install nile-coverage | ||
---- | ||
+ | ||
. Use coverage command (from the plugin) to generate a coverage report. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pending comment
@martriay @andrew-fleming after the last update approved reviews were staled. Can you approve it again to merge it? Thank you! |
No description provided.