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

R4R: Docs refactor #2794

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
399995b
Add commands for deposits and fix links
Oct 30, 2018
47eeb7d
fix config
Oct 30, 2018
28d1adb
Changelog
Oct 30, 2018
f7c6048
Add tally cmd
Oct 30, 2018
1eb005e
typo
Oct 30, 2018
33bcfee
cosmos-sdk-cli
Oct 30, 2018
0a0e155
Update warning
Oct 30, 2018
9ff3d4b
Update docs/sdk/clients.md
alexanderbez Nov 1, 2018
4a1f6a4
Address comments
Nov 1, 2018
e574b50
Address Gautier's comments
Nov 2, 2018
a00e8a2
Update docs/sdk/clients.md
gamarin2 Nov 2, 2018
4f72113
organize ADR directory like tendermint
zramsay Nov 5, 2018
6db3dcb
better adr template
zramsay Nov 5, 2018
c501b13
docs: move spec-proposals into spec/
zramsay Nov 5, 2018
ef3feba
remove lotion, moved to website repo
zramsay Nov 5, 2018
d947240
move getting-started to cosmos-hub, and voyager to website
zramsay Nov 5, 2018
8dd7f3f
docs: move lite/ into clients/lite/
zramsay Nov 5, 2018
18c5d29
a single image doesn't require a dir
zramsay Nov 5, 2018
e666fd9
move introduction/ content to website repo
zramsay Nov 5, 2018
e6549ca
move resources/ content to website repo
zramsay Nov 5, 2018
0800f4e
mv sdk/clients.md to clients/clients.md
zramsay Nov 5, 2018
47e2be1
mv validators to cosmos-hub/validators
zramsay Nov 5, 2018
d4db10e
move deprecated sdk/ content to _attic
zramsay Nov 5, 2018
2afb33b
consolidate remianing sdk/ files into a single sdk.md
zramsay Nov 5, 2018
bc777ee
move examples/ to docs/examples/
zramsay Nov 5, 2018
b2ed220
mv docs/cosmos-hub to docs/gaia
zramsay Nov 5, 2018
a8ba0cd
Add keys/accounts section to localnet docs
Nov 6, 2018
9ce4863
Remove extra home flag
Nov 6, 2018
5793ac6
Minor update
Nov 6, 2018
deb0798
address @cwgoes comments
Nov 6, 2018
02bf94a
changes to struct
gamarin2 Nov 6, 2018
e2c6604
Clarify key usage
Nov 6, 2018
368b783
mv architecture to root of docs dir
zramsay Nov 6, 2018
2e00686
revert #2705
zramsay Nov 6, 2018
62eb748
Update seed location path
Nov 7, 2018
ba09afa
Makefile: install examples
zramsay Nov 8, 2018
54ef533
update config.js
zramsay Nov 8, 2018
511b8fd
paths
zramsay Nov 9, 2018
2b6001d
update readme
gamarin2 Nov 6, 2018
42b5ee8
small fix
gamarin2 Nov 7, 2018
97a054e
add gaia README
gamarin2 Nov 7, 2018
9d7c4bf
refine docs readme
gamarin2 Nov 7, 2018
f048680
little fix
gamarin2 Nov 7, 2018
1b75680
workin on cleanup
gamarin2 Nov 9, 2018
c84c3f2
^^
gamarin2 Nov 9, 2018
e116019
cleanup specs
gamarin2 Nov 9, 2018
49c5826
keep cleanup
gamarin2 Nov 9, 2018
3c39fa7
sdk intro 1/2
gamarin2 Nov 12, 2018
90b7c16
fix link
gamarin2 Nov 12, 2018
a817adc
fix link bis
gamarin2 Nov 12, 2018
1a88cff
update README
gamarin2 Nov 12, 2018
bf63824
better sdk overview 2/2
gamarin2 Nov 12, 2018
5a671e7
Update docs to reflect changes from #2728
jackzampolin Nov 12, 2018
ba6f65e
Address PR comments
jackzampolin Nov 13, 2018
d44c29f
link fix
gamarin2 Nov 13, 2018
e5ddf22
get dem tests passing
zramsay Nov 13, 2018
ba61b72
Add adr-002
gamarin2 Nov 5, 2018
a3e4134
.
gamarin2 Nov 5, 2018
4c1c670
add adr to new org
gamarin2 Nov 5, 2018
818281b
fix typo
gamarin2 Nov 5, 2018
9a3cab9
integrate zach review
gamarin2 Nov 5, 2018
2ac7547
little ficx
gamarin2 Nov 5, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ IMPROVEMENTS
* [cli] [\#2128](https://github.com/cosmos/cosmos-sdk/issues/2128) fixed segfault when exporting directly after `gaiad init`
* [cli] [\#1255](https://github.com/cosmos/cosmos-sdk/issues/1255) open KeyBase in read-only mode
for query-purpose CLI commands
* [docs] Added commands for querying governance deposits, votes and tally

* Gaia
* [x/stake] [#2023](https://github.com/cosmos/cosmos-sdk/pull/2023) Terminate iteration loop in `UpdateBondedValidators` and `UpdateBondedValidatorsFull` when the first revoked validator is encountered and perform a sanity check.
Expand Down Expand Up @@ -289,6 +290,7 @@ BUG FIXES
* Gaia
* [x/stake] Return correct Tendermint validator update set on `EndBlocker` by not
including non previously bonded validators that have zero power. [#2189](https://github.com/cosmos/cosmos-sdk/issues/2189)
* [docs] Fixed light client section links

* SDK
* [\#1988](https://github.com/cosmos/cosmos-sdk/issues/1988) Make us compile on OpenBSD (disable ledger) [#1988] (https://github.com/cosmos/cosmos-sdk/issues/1988)
Expand Down
28 changes: 14 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,26 @@ endif

build_examples:
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/basecoind.exe ./examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli.exe ./examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind.exe ./examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli.exe ./examples/democoin/cmd/democli
go build $(BUILD_FLAGS) -o build/basecoind.exe ./docs/examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli.exe ./docs/examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind.exe ./docs/examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli.exe ./docs/examples/democoin/cmd/democli
else
go build $(BUILD_FLAGS) -o build/basecoind ./examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli ./examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind ./examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli ./examples/democoin/cmd/democli
go build $(BUILD_FLAGS) -o build/basecoind ./docs/examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli ./docs/examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind ./docs/examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli ./docs/examples/democoin/cmd/democli
endif

install: check-ledger update_gaia_lite_docs
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiad
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiacli

install_examples:
go install $(BUILD_FLAGS) ./examples/basecoin/cmd/basecoind
go install $(BUILD_FLAGS) ./examples/basecoin/cmd/basecli
go install $(BUILD_FLAGS) ./examples/democoin/cmd/democoind
go install $(BUILD_FLAGS) ./examples/democoin/cmd/democli
go install $(BUILD_FLAGS) ./docs/examples/basecoin/cmd/basecoind
go install $(BUILD_FLAGS) ./docs/examples/basecoin/cmd/basecli
go install $(BUILD_FLAGS) ./docs/examples/democoin/cmd/democoind
go install $(BUILD_FLAGS) ./docs/examples/democoin/cmd/democli

install_cosmos-sdk-cli:
go install $(BUILD_FLAGS) ./cmd/cosmos-sdk-cli
Expand Down Expand Up @@ -155,8 +155,8 @@ test_cli:
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test` -tags=cli_test

test_examples:
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/examples/basecoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/examples/democoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/docs/examples/basecoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/docs/examples/democoin/cli_test` -tags=cli_test

test_unit:
@VERSION=$(VERSION) go test $(PACKAGES_NOSIMULATION)
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,26 @@ It is being used to build `Gaia`, the first implementation of the [Cosmos Hub](h
**WARNING**: The SDK has mostly stabilized, but we are still making some
breaking changes.

**Note**: Requires [Go 1.10+](https://golang.org/dl/)
**Note**: Requires [Go 1.11+](https://golang.org/dl/)

## Gaia Testnet

To install the binaries, read the [install instructions](./docs/gaia/installation.md)

To join the latest testnet, follow
[the guide](./docs/getting-started/join-testnet.md).
[the guide](./docs/gaia/join-testnet.md).

For status updates and genesis files, see the
[testnets repo](https://github.com/cosmos/testnets).

## Install

See the
[install instructions](./docs/getting-started/installation.md).

## Quick Start

See the [Cosmos Docs](https://cosmos.network/docs/)
To learn how the SDK works from a high-level perspective, go to the [SDK Intro](./docs/intro/README.md).

If you want to get started quickly and learn how to build on top of the SDK, please follow the [SDK Application Tutorial](https://github.com/cosmos/sdk-application-tutorial). You can also fork the tutorial's repo to get started building your own Cosmos SDK application.

- [Getting started with the SDK](./docs/sdk/core/intro.md)
- [SDK Examples](/examples)
For more, please go to the [Cosmos SDK Docs](./docs/README.md)

## Disambiguation

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Architecture Decision Records (ADR)

This is a location to record all high-level architecture decisions in the cosmos-sdk project.
This is a location to record all high-level architecture decisions in the Cosmos SDK project.

You can read more about the ADR concept in this [blog post](https://product.reverb.com/documenting-architecture-decisions-the-reverb-way-a3563bb24bd0#.78xhdix6t).
You can read more about the ADR concept in this [blog post](https://product.reverb.com/documenting-architecture-decisions-the-reverb-way-a3563bb24bd0#.78xhdix6t). See the [tendermint ADRs](https://github.com/tendermint/tendermint/tree/master/docs/architecture) for examples.

An ADR should provide:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
* {date}: {changelog}

## Context
> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution.

> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution.
## Decision

> This section explains all of the details of the proposed solution, including implementation details.
It should also describe affects / corollary items that may need to be changed as a part of this.
If the proposed change will be large, please also indicate a way to do the change to maximize ease of review.
(e.g. the optimal split of things to do between separate PR's)

## Status

> A decision may be "proposed" if it hasn't been agreed upon yet, or "accepted" once it is agreed upon. If a later ADR changes or reverses a decision, it may be marked as "deprecated" or "superseded" with a reference to its replacement.

{Deprecated|Proposed|Accepted}

## Consequences

> This section describes the consequences, after applying the decision. All consequences should be summarized here, not just the "positive" ones.

### Positive
Expand All @@ -27,6 +30,7 @@ If the proposed change will be large, please also indicate a way to do the chang
### Neutral

## References

> Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here!

* {reference link}
2 changes: 1 addition & 1 deletion cmd/cosmos-sdk-cli/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
tmversion "github.com/tendermint/tendermint/version"
)

var remoteBasecoinPath = "github.com/cosmos/cosmos-sdk/examples/basecoin"
var remoteBasecoinPath = "github.com/cosmos/cosmos-sdk/docs/examples/basecoin"

// Replacer to replace all instances of basecoin/basecli/BasecoinApp to project specific names
// Gets initialized when initCmd is executing after getting the project name from user
Expand Down
106 changes: 20 additions & 86 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,105 +12,39 @@ module.exports = {
nav: [{ text: "Back to Cosmos", link: "https://cosmos.network" }],
sidebar: [
{
title: "Introduction",
title: "Overview",
collapsable: false,
children: [
"/introduction/cosmos-hub",
"/introduction/tendermint-cosmos",
"/introduction/tendermint"
"/intro/README",
"/intro/sdk-app-architecture",
"/intro/ocap"
]
},
{
title: "Getting Started",
title: "Gaia",
collapsable: false,
children: [
"/getting-started/voyager",
"/getting-started/installation",
"/getting-started/join-testnet",
"/getting-started/networks"
]
},
{
title: "Cosmos SDK",
collapsable: false,
children: [
["/sdk/overview", "Overview"],
["/sdk/core/intro", "Core"],
"/sdk/core/app1",
"/sdk/core/app2",
"/sdk/core/app3",
"/sdk/core/app4",
"/sdk/core/app5",
// "/sdk/modules",
"/sdk/clients"
]
},
// {
// title: "Specifications",
// collapsable: false,
// children: [
// ["/specs/overview", "Overview"],
// "/specs/governance",
// "/specs/ibc",
// "/specs/staking",
// "/specs/icts",
// ]
// },
{
title: "SDK by Examples - Simple Governance",
collapsable: false,
children: [
["/sdk/sdk-by-examples/simple-governance/intro", "Intro"],
"/sdk/sdk-by-examples/simple-governance/setup-and-design",
"/sdk/sdk-by-examples/simple-governance/app-init",
"/sdk/sdk-by-examples/simple-governance/simple-gov-module",
"/sdk/sdk-by-examples/simple-governance/bridging-it-all",
"/sdk/sdk-by-examples/simple-governance/running-the-application"
]
},
{
title: "Light Client",
collapsable: false,
children: [
"/lite/",
"/lite/getting_started"
]
},
{
title: "Lotion JS",
collapsable: false,
children: [
["/lotion/overview", "Overview"]
]
},
{
title: "Validators",
collapsable: false,
children: [
["/validators/overview", "Overview"],
["/validators/security", "Security"],
["/validators/validator-setup", "Validator Setup"],
"/validators/validator-faq"
"/gaia/installation",
"/gaia/join-testnet",
"/gaia/networks",
"/gaia/validators/overview",
"/gaia/validators/security",
"/gaia/validators/validator-faq",
"/gaia/validators/validator-setup",
"/gaia/ledger"
]
},
{
title: "Clients",
collapsable: false,
children: [
["/clients/service-providers", "Service Providers"]
]
},
{
title: "Resources",
collapsable: false,
children: [
// ["/resources/faq" "General"],
"/resources/delegator-faq",
["/resources/whitepaper", "Whitepaper - English"],
["/resources/whitepaper-ko", "Whitepaper - 한국어"],
["/resources/whitepaper-zh-CN", "Whitepaper - 中文"],
["/resources/whitepaper-pt", "Whitepaper - Português"]
]
"/clients/README",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

can drop README otherwise it doesn't render (mystery why this is the case) the readme

"/lite/", // this renders the readme
"/lite/getting_started",
"/lite/specification",
"/clients/cli",
"/clients/service-providers"
]
}
]
}
Expand Down
26 changes: 15 additions & 11 deletions docs/DOCS_README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Docs Build Workflow
## Updating the docs

If you want to open a PR on the Cosmos SDK to update the documentation, please follow the guidelines in the [`CONTRIBUTING.md`](https://github.com/cosmos/cosmos-sdk/tree/master/CONTRIBUTING.md)

## Docs Build Workflow
Copy link
Contributor Author

@zramsay zramsay Nov 13, 2018

Choose a reason for hiding this comment

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

this should be H1 and Updating the Docs can be H2 and the rest of the headers can stay H2/H3


The documentation for the Cosmos SDK is hosted at:

Expand All @@ -15,55 +19,55 @@ Besides, gaia-lite API docs are also provided by gaia-lite. The default API docs
https://localhost:1317/swagger-ui/
```

## How It Works
### How It Works

There is a Jenkins job listening for changes in the `/docs` directory, on both
the `master` and `develop` branches. Any updates to files in this directory
on those branches will automatically trigger a website deployment. Under the hood,
a private website repository has make targets consumed by a standard Jenkins task.

## README
### README

The [README.md](./README.md) is also the landing page for the documentation
on the website. During the Jenkins build, the current commit is added to the bottom
of the README.

## Config.js
### Config.js

The [config.js](./.vuepress/config.js) generates the sidebar and Table of Contents
on the website docs. Note the use of relative links and the omission of
file extensions. Additional features are available to improve the look
of the sidebar.

## Links
### Links

**NOTE:** Strongly consider the existing links - both within this directory
and to the website docs - when moving or deleting files.

Relative links should be used nearly everywhere, having discovered and weighed the following:

### Relative
#### Relative

Where is the other file, relative to the current one?

- works both on GitHub and for the VuePress build
- confusing / annoying to have things like: `../../../../myfile.md`
- requires more updates when files are re-shuffled

### Absolute
#### Absolute

Where is the other file, given the root of the repo?

- works on GitHub, doesn't work for the VuePress build
- this is much nicer: `/docs/hereitis/myfile.md`
- if you move that file around, the links inside it are preserved (but not to it, of course)

### Full
#### Full

The full GitHub URL to a file or directory. Used occasionally when it makes sense
to send users to the GitHub.

## Building Locally
### Building Locally

To build and serve the documentation locally, run:

Expand Down Expand Up @@ -94,12 +98,12 @@ python -m SimpleHTTPServer 8080

then navigate to localhost:8080 in your browser.

## Consistency
### Consistency

Because the build processes are identical (as is the information contained herein), this file should be kept in sync as
much as possible with its [counterpart in the Tendermint Core repo](https://github.com/tendermint/tendermint/blob/develop/docs/DOCS_README.md).

## Update and Build the RPC docs
### Update and Build the RPC docs

1. Execute the following command at the root directory to install the swagger-ui generate tool.
```
Expand Down
Loading