docs: render orm and collections in docs (#15736)

This commit is contained in:
Julien Robert 2023-04-08 12:18:14 +02:00 committed by GitHub
parent 31c084f9f9
commit 117a4268df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 99 additions and 27 deletions

8
docs/.gitignore vendored
View File

@ -15,9 +15,11 @@ docs/docs/spec
docs/docs/architecture
docs/docs/rfc
docs/docs/tooling/01-cosmovisor.md
docs/docs/tooling/02-depinject.md
docs/docs/tooling/03-confix.md
docs/docs/tooling/04-hubl.md
docs/docs/tooling/02-confix.md
docs/docs/tooling/03-hubl.md
docs/docs/packages/01-depinject.md
docs/docs/packages/02-collections.md
docs/docs/packages/03-orm.md
docs/run-node/04-rosetta.md
docs/migrations/02-upgrading.md

View File

@ -1,5 +1,5 @@
{
"label": "ADRs",
"position": 10,
"position": 11,
"link": null
}
}

View File

@ -6,7 +6,7 @@ sidebar_position: 1
:::note Synopsis
The Cosmos SDK allows much easier wiring of an `app.go` thanks to App Wiring and [`depinject`](../tooling/02-depinject.md).
The Cosmos SDK allows much easier wiring of an `app.go` thanks to App Wiring and [`depinject`](../packages/01-depinject.md).
Learn more about the rationale of App Wiring in [ADR-057](../architecture/adr-057-app-wiring.md).
:::
@ -16,7 +16,8 @@ Learn more about the rationale of App Wiring in [ADR-057](../architecture/adr-05
### Pre-requisite Readings
* [ADR 057: App Wiring](../architecture/adr-057-app-wiring.md)
* [Depinject Documentation](../tooling/02-depinject.md)
* [Depinject Documentation](../packages/01-depinject.md)
* [Modules depinject-ready](../building-modules/15-depinject.md)
:::

View File

@ -2,17 +2,17 @@
sidebar_position: 1
---
# Dependency Injection
# Modules depinject-ready
:::note
### Pre-requisite Readings
* [Cosmos SDK Dependency Injection Framework](../tooling/02-depinject.md)
* [Depinject Documentation](../packages/01-depinject.md)
:::
[`depinject`](../tooling/02-depinject.md) is used to wire any module in `app.go`.
[`depinject`](../packages/01-depinject.md) is used to wire any module in `app.go`.
All core modules are already configured to support dependency injection.
To work with `depinject` a module must define its configuration and requirements so that `depinject` can provide the right dependencies.
@ -115,6 +115,6 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/group/module/module.go#L
The module is now ready to be used with `depinject` by a chain developer.
## App Wiring
## Integrate in an application
The App Wiring is done in `app_config.go` / `app.yaml` and `app_v2.go` and is explained in detail in the [overview of `app_v2.go`](../building-apps/01-app-go-v2.md).

View File

@ -86,7 +86,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/tests/integration/bank/kee
## Simulations
Simulations uses as well a minimal application, built with [`depinject`](../tooling/02-depinject.md):
Simulations uses as well a minimal application, built with [`depinject`](../packages/01-depinject.md):
:::note
You can as well use the `AppConfig` `configurator` for creating an `AppConfig` [inline](https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/x/slashing/app_test.go#L54-L62). There is no difference between those two ways, use whichever you prefer.

View File

@ -10,6 +10,11 @@ This section highlights some of the cosmos ecosystem tooling and where to find i
See the official [`ibc-go` documentation](https://ibc.cosmos.network).
### `x/capability`
The capability module was once a Cosmos SDK module. From SDK v0.48, this module is maintained by the IBC team.
Find out more on their [repository](https://github.com/cosmos/ibc-go/tree/fdd664698d79864f1e00e147f9879e58497b5ef1/modules/capability).
## CosmWasm smart contracts
>CosmWasm is a smart contracting platform built for the Cosmos ecosystem. Simply put, it's the Cosmos (Cosm) way of using WebAssembly (Wasm) hence the name.

View File

@ -0,0 +1,39 @@
---
sidebar_position: 0
---
# Packages
The Cosmos SDK is a collection of Go modules. This section provides documentation on various packages that can used when developing a Cosmos SDK chain.
It lists all standalone Go modules that are part of the Cosmos SDK.
:::tip
For more information on SDK modules, see the [SDK Modules](https://docs.cosmos.network/main/modules) section.
For more information on SDK tooling, see the [Tooling](https://docs.cosmos.network/main/tooling) section.
:::
## Core
* [Core](https://pkg.go.dev/cosmossdk.io/core) - Core library defining SDK interfaces ([ADR-063](https://docs.cosmos.network/main/architecture/adr-063-core-module-api))
* [API](https://pkg.go.dev/cosmossdk.io/api) - API library containing generated SDK Pulsar API
* [Store](https://pkg.go.dev/cosmossdk.io/store) - Implementation of the Cosmos SDK store
## State Management
* [Collections](./02-collections.md) - State management library
* [ORM](./03-orm.md) - State management library
## Automation
* [Depinject](./01-depinject.md) - Dependency injection framework
* [Client/v2](https://pkg.go.dev/cosmossdk.io/client/v2) - Library powering [AutoCLI](https://docs.cosmos.network/main/building-modules/autocli)
## Utilities
* [Log](https://pkg.go.dev/cosmossdk.io/log) - Logging library
* [Errors](https://pkg.go.dev/cosmossdk.io/errors) - Error handling library
* [Math](https://pkg.go.dev/cosmossdk.io/math) - Math library for SDK arithmetic operations
## Example
* [SimApp](https://pkg.go.dev/cosmossdk.io/simapp) - SimApp is **the** sample Cosmos SDK chain. This package should not be imported in your application.

View File

@ -0,0 +1,5 @@
{
"label": "Packages",
"position": 9,
"link": null
}

View File

@ -4,10 +4,16 @@ sidebar_position: 0
# Tools
This section provides documentation on various tooling used in development of a Cosmos SDK chain, operating a node and testing.
This section provides documentation on various tooling maintained by the SDK team.
This includes tools for development, operating a node, and ease of use of a Cosmos SDK chain.
## CLI Tools
* [Cosmovisor](./01-cosmovisor.md)
* [Confix](./02-confix.md)
* [Hubl](./03-hubl.md)
* [Rosetta](https://docs.cosmos.network/main/run-node/rosetta)
## Other Tools
* [Protocol Buffers](./00-protobuf.md)
* [Cosmovisor](./01-cosmovisor.md)
* [Depinject](./02-depinject.md)
* [Confix](./03-confix.md)
* [Hubl](./04-hubl.md)

View File

@ -1,5 +1,5 @@
{
"label": "Tooling",
"position": 9,
"position": 10,
"link": null
}

View File

@ -385,6 +385,10 @@ const config = {
],
to: "/main/modules/upgrade/",
},
{
from: ["/main/modules/capability"],
to: "/main/ecosystem",
},
{
from: ["/main/run-node/cosmovisor"],
to: "/main/tooling/cosmovisor",
@ -393,6 +397,10 @@ const config = {
from: ["/main/migrations/pre-upgrade"],
to: "/main/building-apps/app-upgrade",
},
{
from: ["/main/tooling/depinject"],
to: "/main/packages/depinject",
},
],
},
],

View File

@ -2,9 +2,11 @@
find docs/modules ! -name '_category_.json' -type f -exec rm -rf {} +
rm -rf docs/tooling/01-cosmovisor.md
rm -rf docs/tooling/02-depinject.md
rm -rf docs/tooling/03-confix.md
rm -rf docs/tooling/04-hubl.md
rm -rf docs/tooling/02-confix.md
rm -rf docs/tooling/03-hubl.md
rm -rf docs/packages/01-depinject.md
rm -rf docs/packages/02-collections.md
rm -rf docs/packages/03-orm.md
rm -rf docs/run-node/04-rosetta.md
rm -rf docs/architecture
rm -rf docs/spec

View File

@ -19,9 +19,13 @@ cat ../x/README.md | sed 's/\.\.\/docs\/building-modules\/README\.md/\/building-
## Add tooling documentation
cp ../tools/cosmovisor/README.md ./docs/tooling/01-cosmovisor.md
cp ../depinject/README.md ./docs/tooling/02-depinject.md
cp ../tools/confix/README.md ./docs/tooling/03-confix.md
cp ../tools/hubl/README.md ./docs/tooling/04-hubl.md
cp ../tools/confix/README.md ./docs/tooling/02-confix.md
cp ../tools/hubl/README.md ./docs/tooling/03-hubl.md
## Add package documentation
cp ../depinject/README.md ./docs/packages/01-depinject.md
cp ../collections/README.md ./docs/packages/02-collections.md
cp ../orm/README.md ./docs/packages/03-orm.md
## Add rosetta documentation
cp ../tools/rosetta/README.md ./docs/run-node/04-rosetta.md

View File

@ -1,5 +1,5 @@
{
"label": "RFCs",
"position": 12,
"position": 13,
"link": null
}

View File

@ -1,5 +1,5 @@
{
"label": "Specifications",
"position": 11,
"position": 12,
"link": null
}
}