Skip to content

Commit

Permalink
Documentation Structure Change and Cleanup (#2808)
Browse files Browse the repository at this point in the history
* Update docs/sdk/clients.md
* organize ADR directory like tendermint
* docs: move spec-proposals into spec/
* remove lotion, moved to website repo
* move getting-started to cosmos-hub, and voyager to website
* docs: move lite/ into clients/lite/
* move introduction/ content to website repo
* move resources/ content to website repo
* mv sdk/clients.md to clients/clients.md
* mv validators to cosmos-hub/validators
* move deprecated sdk/ content to _attic
* sdk/modules.md is duplicate with modules/README.md
* consolidate remianing sdk/ files into a single sdk.md
* move examples/ to docs/examples/
* mv docs/cosmos-hub to docs/gaia
* Add keys/accounts section to localnet docs
  • Loading branch information
gamarin2 authored and jackzampolin committed Nov 14, 2018
1 parent 6feab55 commit addcfbf
Show file tree
Hide file tree
Showing 156 changed files with 665 additions and 5,898 deletions.
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 @@ -66,26 +66,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 @@ -159,8 +159,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
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",
"/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

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
40 changes: 27 additions & 13 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
# Welcome to the Cosmos Docs!
# Welcome to the SDK Docs!

![cosmonaut reading the cosmos docs in space](./graphics/cosmos-docs.jpg)
Welcome to the SDK docs!

Cosmos is a decentralized network of independent parallel blockchains, each powered by classical BFT consensus algorithms like Tendermint.

The first blockchain in the Cosmos Network is the Cosmos Hub, whose native token is the Atom. Cosmos is a permission-less network, meaning that anybody can build a blockchain on it.
![cosmonaut reading the cosmos docs in space](./cosmos-docs.jpg)

Cosmos can interoperate with multiple other applications and cryptocurrencies. By creating a new zone, you can plug any blockchain system into the Cosmos hub and pass tokens back and forth between those zones, without the need for an intermediary.
## Learn the SDK

## Quick Start
### SDK Intro

- [Getting started with the SDK](./sdk/core/intro.md)
- [SDK Examples](../examples)
- [Join the testnet](./getting-started/join-testnet.md#run-a-full-node)
If you are a newcomer and would like to learn more about the Cosmos SDK, this **[intro](./intro/README.md)** is a good starting place.

### SDK tutorial

If you like to learn by doing, you can follow the **[SDK application tutorial](https://github.com/cosmos/sdk-application-tutorial)**. It showcases how to build an SDK-based blockchain from scratch, and teaches you about the basic principles the SDK in the process.

## Use the SDK

The following sections contain the information you need if you want to build a fully-functional SDK-based blockchain:

>*NOTE*: We are currently working on improving the docs. Some info might be missing. If that is the case, try the Cosmos [Forum](https://forum.cosmos.network). Failing that, [open an issue](https://github.com/cosmos/cosmos-sdk/issues/new).
- [Introduction](./intro/README.md): Contains introductory high-level material on the Cosmos SDK.
- [Gaia](./gaia/README.md): Contains all documentation related to the gaia application (current name for the Cosmos-Hub).
- [Clients](./clients/README.md): Documentation about SDK clients like the SDK Command-Line interface and the SDK Light-client.
- [Specifications](./spec/README.md): Contains SDK and modules specifications.

If you are reading this on the Cosmos Website, please know that you can find more information on [github](https://github.com/cosmos/cosmos-sdk/tree/develop/docs). Also if you find any issues with the documentation please [*open a Pull Request*](https://github.com/cosmos/cosmos-sdk/compare?expand=1), or at least [*open an Issue*](https://github.com/cosmos/cosmos-sdk/issues/new) to update the docs!

## Join the public testnet for the Cosmos Hub

To install the latest version of the `gaia` application and join the public testnet, **click [here](./gaia/README.md#join-the-cosmos-hub-public-testnet)**

## Edit the Documentation

See [this file](./DOCS_README.md) for details of the build process and
considerations when making changes.

## Version

This documentation is built from the following commit:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit addcfbf

Please sign in to comment.