forked from gnolang/gno
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from gnolang:master #16
Open
pull
wants to merge
1,180
commits into
moul:master
Choose a base branch
from
gnolang:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+280,182
−61,673
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #16 +/- ##
==========================================
- Coverage 47.02% 46.98% -0.04%
==========================================
Files 365 365
Lines 61156 61156
==========================================
- Hits 28757 28735 -22
- Misses 30047 30060 +13
- Partials 2352 2361 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
closes: #3800 . see comments below.
Addresses #522 (comment) by adding a query for `vm/qdoc` that uses a similar code path to `gno doc` which includes comments. For example, `gnokey query vm/qdoc -data "gno.land/r/gnoland/valopers/v2" -remote tcp://127.0.0.1:26657` returns the following JSON doc for [valopers](https://github.com/gnolang/gno/blob/master/examples/gno.land/r/gnoland/valopers/v2/valopers.gno). ``` { "package_path": "gno.land/r/gnoland/valopers/v2", "package_line": "package valopers // import \"valopers\"", "package_doc": "Package valopers is designed around the permissionless lifecycle of valoper profiles. It also includes parts designed for govdao to propose valset changes based on registered valopers.\n", "values": [ { "signature": "const (\n\terrValoperExists = \"valoper already exists\"\n\terrValoperMissing = \"valoper does not exist\" // Valoper is missing\n\terrInvalidAddressUpdate = \"valoper updated address exists\"\n\terrValoperNotCaller = \"valoper is not the caller\"\n)", "const": true, "values": [ { "name": "errValoperExists", "doc": "", "type": "" }, { "name": "errValoperMissing", "doc": "", "type": "" }, { "name": "errInvalidAddressUpdate", "doc": "", "type": "" }, { "name": "errValoperNotCaller", "doc": "", "type": "" } ], "doc": "" }, { "signature": "var valopers *avl.Tree // Address -> Valoper\n", "const": false, "values": [ { "name": "valopers", "doc": "// Address -> Valoper\n", "type": "*avl.Tree" } ], "doc": "valopers keeps track of all the active validator operators\n" } ], "funcs": [ { "type": "", "name": "GovDAOProposal", "signature": "func GovDAOProposal(address std.Address)", "doc": "GovDAOProposal creates a proposal to the GovDAO for adding the given valoper to the validator set. This function is meant to serve as a helper for generating the govdao proposal\n", "params": [ { "Name": "address", "Type": "std.Address" } ], "results": [] }, { "type": "", "name": "Register", "signature": "func Register(v Valoper)", "doc": "Register registers a new valoper\n", "params": [ { "Name": "v", "Type": "Valoper" } ], "results": [] }, { "type": "", "name": "Render", "signature": "func Render(_ string) string", "doc": "Render renders the current valoper set\n", "params": [ { "Name": "_", "Type": "string" } ], "results": [ { "Name": "", "Type": "string" } ] }, { "type": "", "name": "Update", "signature": "func Update(address std.Address, v Valoper)", "doc": "Update updates an existing valoper\n", "params": [ { "Name": "address", "Type": "std.Address" }, { "Name": "v", "Type": "Valoper" } ], "results": [] }, { "type": "", "name": "init", "signature": "func init()", "doc": "", "params": [], "results": [] }, { "type": "", "name": "isValoper", "signature": "func isValoper(address std.Address) bool", "doc": "isValoper checks if the valoper exists\n", "params": [ { "Name": "address", "Type": "std.Address" } ], "results": [ { "Name": "", "Type": "bool" } ] }, { "type": "", "name": "GetByAddr", "signature": "func GetByAddr(address std.Address) Valoper", "doc": "GetByAddr fetches the valoper using the address, if present\n", "params": [ { "Name": "address", "Type": "std.Address" } ], "results": [ { "Name": "", "Type": "Valoper" } ] }, { "type": "Valoper", "name": "Render", "signature": "func (v Valoper) Render() string", "doc": "Render renders a single valoper with their information\n", "params": [], "results": [ { "Name": "", "Type": "string" } ] } ], "types": [ { "name": "Valoper", "signature": "type Valoper struct {\n\tName string // the display name of the valoper\n\tMoniker string // the moniker of the valoper\n\tDescription string // the description of the valoper\n\n\tAddress std.Address // The bech32 gno address of the validator\n\tPubKey string // the bech32 public key of the validator\n\tP2PAddresses []string // the publicly reachable P2P addresses of the validator\n\tActive bool // flag indicating if the valoper is active\n}", "doc": "Valoper represents a validator operator profile\n" } ] } ``` --------- Signed-off-by: Jeff Thompson <jeff@thefirst.org> Signed-off-by: D4ryl00 <d4ryl00@gmail.com> Co-authored-by: D4ryl00 <d4ryl00@gmail.com> Co-authored-by: Morgan <morgan@morganbaz.com>
This adds some doc and tests to `tm2/pkg/amino` to address the following in amino_test.go: fixed #2326 `// XXX Test registering duplicate names or concrete types not in a package.` - **chore(docs): document frequent functions in tm2/pkg/amino** - **chore(amino): add some tests** ## To run tests ``` cd tm2/pkg/amino go test -v --run=WithPanic\$ ``` Tests have uncovered a potential bug however in `TestDupNamesMustPanic`. Opening an issue now to document this, with a possible fix. ```go // The following does NOT panic, but it should. // assert.Panics(t, func() { // myPkg.WithTypes( // tests.EmptyStruct{}, "A", // tests.PrimitivesStruct{}, "B", // tests.ShortArraysStruct{}, "A", // Same name // ) // }) ``` <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> --------- Co-authored-by: grepsuzette <grepsuzette@users.noreply.github.com> Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
This issue improves the user experience (UX) of GnoWeb by: - Replacing `Docs` with `Actions` in the navigation bar. If the goal was to provide documentation for the realm similar to what [pkg.go.dev](https://pkg.go.dev/) offers (in conjunction with #3459), that feature is not yet available and causes confusion. - Updating navigation icons to make each entry more understandable. - Promoting `Secure Mode` in the Helper page. Secure Mode is now enabled by default instead of Fast Mode, which currently displays a security message. - Replacing X with Twitter in the footer navigation. - Removing `Actions` (current Docs menu) for `/p` contents. ## Captures <img width="1724" alt="Capture d’écran 2025-02-28 à 17 32 42" src="https://github.com/user-attachments/assets/78afd15f-0ec6-4c47-882e-e22e5578cb62" />
- simplify - make it more loop-friendly (PRs are easier) - cleanup html and invalid markdown - retained the current content to allow for PRs that focus on updating it --------- Signed-off-by: moul <94029+moul@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )