Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Add docs to oz docsite #298

Merged

Conversation

ericnordelo
Copy link
Member

No description provided.

@ericnordelo ericnordelo linked an issue Nov 18, 2022 that may be closed by this pull request
@ericnordelo
Copy link
Member Author

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.

@frangio
Copy link

frangio commented Nov 22, 2022

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.

@frangio
Copy link

frangio commented Nov 22, 2022

Ok I think I've added deploy previews. We need to add a new commit to trigger the build.

@ericnordelo
Copy link
Member Author

Ok I think I've added deploy previews. We need to add a new commit to trigger the build.

Thank you! let me check

@netlify
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for silver-paletas-e6cbf6 ready!

Name Link
🔨 Latest commit 0487852
🔍 Latest deploy log https://app.netlify.com/sites/silver-paletas-e6cbf6/deploys/637cf0aafc5c8800090e32ab
😎 Deploy Preview https://deploy-preview-298--silver-paletas-e6cbf6.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ericnordelo ericnordelo marked this pull request as ready for review November 23, 2022 18:29
@ericnordelo
Copy link
Member Author

@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/testing.adoc Outdated Show resolved Hide resolved
@@ -0,0 +1,216 @@
== API Reference

Here you can find a complete reference of the functions provided by the NileRuntimeEnvironment.
Copy link
Contributor

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.

Copy link
Contributor

@martriay martriay left a 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/nre.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/index.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/index.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/scripts.adoc Outdated Show resolved Hide resolved
@@ -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.
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Script updated.

ericnordelo and others added 12 commits December 28, 2022 16:04
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>
Copy link
Contributor

@martriay martriay left a 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
Copy link
Contributor

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 Show resolved Hide resolved
docs/modules/ROOT/pages/cli.adoc Outdated Show resolved Hide resolved
+
Select network: one of ('localhost', 'integration', 'goerli', 'goerli2', 'mainnet').
Select network: one of (localhost, integration, goerli, goerli2, mainnet).
Copy link
Contributor

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

Copy link
Member Author

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).

Copy link
Contributor

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 👍

Comment on lines 13 to 29
* 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++`]
Copy link
Contributor

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


[,sh]
----
(env): pip install cairo-nile
Copy link
Contributor

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/index.adoc Outdated Show resolved Hide resolved
docs/modules/ROOT/pages/plugins.adoc Outdated Show resolved Hide resolved
@@ -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))
Copy link
Contributor

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)

Copy link
Member Author

@ericnordelo ericnordelo Dec 29, 2022

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.

martriay
martriay previously approved these changes Jan 2, 2023
* xref:#init[`++init++`]
* xref:#node[`++node++`]
* xref:#compile[`++compile++`]
* xref:#setup[`++setup++`]
Copy link
Contributor

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?

+
Select network: one of ('localhost', 'integration', 'goerli', 'goerli2', 'mainnet').
Select network: one of (localhost, integration, goerli, goerli2, mainnet).
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Default to localhost.
Default to `localhost`.

(env): python -m pip install nile-coverage
----
+
. Use coverage command (from the plugin) to generate a coverage report.
Copy link
Contributor

Choose a reason for hiding this comment

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

pending comment

@ericnordelo
Copy link
Member Author

@martriay @andrew-fleming after the last update approved reviews were staled. Can you approve it again to merge it? Thank you!

@ericnordelo ericnordelo merged commit 56a9037 into OpenZeppelin:main Jan 2, 2023
@ericnordelo ericnordelo deleted the feat/add-docs-to-oz-docsite-#157 branch January 2, 2023 22:35
@ericnordelo ericnordelo mentioned this pull request Jan 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Nile docs to OZ docsite
4 participants