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

[pull] master from gnolang:master #16

Open
wants to merge 1,180 commits into
base: master
Choose a base branch
from
Open

[pull] master from gnolang:master #16

wants to merge 1,180 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Sep 22, 2023

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

@pull pull bot requested a review from moul as a code owner September 22, 2023 14:52
@trafico-bot trafico-bot bot added the 🔍 Ready for Review Pull Request is not reviewed yet label Sep 22, 2023
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #16 (28455d8) into master (61f3ada) will decrease coverage by 0.04%.
Report is 12 commits behind head on master.
The diff coverage is 85.00%.

@@            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     
Flag Coverage Δ
gno.land-_test.gnokey 0.00% <ø> (ø)
gno.land-_test.gnoland 88.14% <ø> (ø)
gno.land-_test.pkgs 27.88% <ø> (ø)
gnovm-_test.cmd 45.89% <ø> (ø)
gnovm-_test.gnolang.pkg0 17.98% <ø> (ø)
gnovm-_test.gnolang.pkg1 8.21% <ø> (ø)
gnovm-_test.gnolang.pkg2 9.87% <ø> (ø)
gnovm-_test.gnolang.stdlibs 53.53% <ø> (ø)
tm2-_test.flappy ∅ <ø> (?)
tm2-_test.pkg.amino 58.32% <ø> (ø)
tm2-_test.pkg.bft 63.43% <ø> (-0.19%) ⬇️
tm2-_test.pkg.others 59.26% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
gnovm/pkg/gnolang/machine.go 39.60% <100.00%> (-0.23%) ⬇️
tm2/pkg/iavl/proof.go 92.98% <100.00%> (+0.12%) ⬆️
gnovm/pkg/gnolang/values_string.go 10.62% <0.00%> (-0.13%) ⬇️

... 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.
Closes [3768](#3768), closes
[3758](#3758)

---------

Co-authored-by: Morgan Bazalgette <morgan@morganbaz.com>
jefft0 and others added 2 commits February 28, 2025 11:28
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
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.