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

Add missing glossary to ref docs #2273

Closed
wants to merge 59 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
a451f7e
add developer-hub and all things related
kianenigma Oct 31, 2023
68a053b
fix some things
kianenigma Oct 31, 2023
f7460d8
small fixes
kianenigma Oct 31, 2023
b785e5c
Create docs.yml
kianenigma Oct 31, 2023
00a0fec
Update docs.yml
kianenigma Oct 31, 2023
50c78b4
fix some warnings
kianenigma Oct 31, 2023
89e00e9
Merge branch 'kiz-developer-hub' of github.com:kianenigma/polkadot-sd…
kianenigma Oct 31, 2023
c91250b
fix some warnings
kianenigma Oct 31, 2023
6d57d2e
fix warns
kianenigma Oct 31, 2023
76f2277
update
kianenigma Nov 1, 2023
08802f8
fix
kianenigma Nov 2, 2023
2ec4541
publish note
kianenigma Nov 2, 2023
a826834
fix
kianenigma Nov 2, 2023
8e2f6b8
Master.into()
kianenigma Nov 2, 2023
df2d645
Merge branch 'master' of github.com:paritytech/polkadot-sdk into kiz-…
liamaharon Nov 3, 2023
58d60cb
fix build
liamaharon Nov 3, 2023
c8f7f1e
default page developer hub
liamaharon Nov 3, 2023
198a3e6
Master.into()
kianenigma Nov 4, 2023
bcdc9d5
add lot of ref docs
kianenigma Nov 4, 2023
4664874
Merge branch 'kiz-developer-hub' of github.com:paritytech/polkadot-sd…
kianenigma Nov 4, 2023
d542ff1
Update substrate/frame/support/procedural/src/pallet/parse/call.rs
kianenigma Nov 4, 2023
2f76ba1
Update developer-hub/src/lib.rs
kianenigma Nov 4, 2023
00ec677
Update developer-hub/src/lib.rs
kianenigma Nov 4, 2023
9b1db8c
Update docs/mermaid/polkadot_sdk.mmd
kianenigma Nov 4, 2023
7dba4f8
Update developer-hub/src/polkadot_sdk/mod.rs
kianenigma Nov 4, 2023
3519a03
Update developer-hub/src/reference_docs/wasm_meta_protocol.rs
kianenigma Nov 4, 2023
0d72dd7
Apply suggestions from code review
kianenigma Nov 4, 2023
9942120
Apply suggestions from code review
kianenigma Nov 4, 2023
60a37a1
Upstream.into()
kianenigma Nov 4, 2023
1896ac7
reword templates page.
kianenigma Nov 4, 2023
30d6ac2
repot homepage
kianenigma Nov 4, 2023
a56d3b1
rework substrate dev section
kianenigma Nov 4, 2023
641ff3a
fix cumulus links
kianenigma Nov 4, 2023
3baa30c
Apply extrinsic-encoding ref doc suggestions
jsdw Nov 7, 2023
9c2b3ea
Apply singed-extensions ref doc suggestion
jsdw Nov 7, 2023
62b69fc
add about build
kianenigma Nov 9, 2023
4c8939b
most of the stuff done in polkadot_sdk mod
kianenigma Nov 9, 2023
7b225e1
Apply suggestions from code review
kianenigma Nov 9, 2023
0f55b9a
Update developer-hub/src/polkadot_sdk/cumulus.rs
kianenigma Nov 9, 2023
d08ab24
Update developer-hub/src/polkadot_sdk/cumulus.rs
kianenigma Nov 9, 2023
b9ee9c1
ready to merge
kianenigma Nov 9, 2023
a873808
merge about half a million comments and conflicts
kianenigma Nov 9, 2023
2d5814b
Master.into()
kianenigma Nov 9, 2023
94eeed6
deprecate tutorial
kianenigma Nov 9, 2023
80d4e9e
add missing glossary
juangirini Nov 10, 2023
24ba435
add pvf to the glossary
juangirini Nov 14, 2023
745c7fd
refactor tutorial to guides
juangirini Nov 14, 2023
d305146
fix fmt
juangirini Nov 14, 2023
1d1e4a0
Merge branch 'master' into kiz-developer-hub
juangirini Nov 14, 2023
74eb750
resolve import conflict
juangirini Nov 14, 2023
36baa71
fix ci
juangirini Nov 14, 2023
8defde9
fix ui tests
juangirini Nov 14, 2023
7c839fe
fix ui test
juangirini Nov 14, 2023
196d1d7
remove unused imports
juangirini Nov 15, 2023
f3b1b5b
Merge branch 'master' into kiz-developer-hub
juangirini Nov 15, 2023
0428686
Merge branch 'kiz-developer-hub' into jg/developer-hub-glossary-ref-docs
juangirini Nov 15, 2023
0235ee4
improve glossary
juangirini Nov 15, 2023
239c3a6
add suggested modifications
juangirini Nov 24, 2023
58fb40f
improve Validators definition
juangirini Nov 27, 2023
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
34 changes: 34 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Rust Docs

on:
push:
branches: [kiz-developer-hub]

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

# Setup protoc
- name: Set up Protocol Buffers
uses: arduino/setup-protoc@v1

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rust-docs
target: wasm32-unknown-unknown

- name: Generate docs
run: cargo doc -p developer-hub -p sp-io -p sp-runtime -p frame -p frame-support --no-deps

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: target/doc # The folder the action should deploy.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ artifacts
bin/node-template/Cargo.lock
nohup.out
polkadot_argument_parsing
polkadot.*
polkadot
pwasm-alloc/Cargo.lock
pwasm-libc/Cargo.lock
release-artifacts
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ build-rustdoc:
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
}
inject_simple_analytics "./crate-docs"
- echo "<meta http-equiv=refresh content=0;url=polkadot_service/index.html>" > ./crate-docs/index.html
- echo "<meta http-equiv=refresh content=0;url=developer_hub/index.html>" > ./crate-docs/index.html

build-implementers-guide:
stage: build
Expand Down
77 changes: 52 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ license = "GPL-3.0-only"
resolver = "2"

members = [
"developer-hub",
"bridges/bin/runtime-common",
"bridges/modules/grandpa",
"bridges/modules/messages",
Expand Down Expand Up @@ -195,7 +196,6 @@ members = [
"polkadot/xcm/xcm-simulator/fuzzer",
"substrate/bin/minimal/node",
"substrate/bin/minimal/runtime",
"substrate",
"substrate/bin/node-template/node",
"substrate/bin/node-template/pallets/template",
"substrate/bin/node-template/runtime",
Expand Down Expand Up @@ -480,8 +480,7 @@ default-members = [ "polkadot", "substrate/bin/node/cli" ]
panic = "unwind"
opt-level = 3

# make sure dev builds with backtrace do
# not slow us down
# make sure dev builds with backtrace do not slow us down
[profile.dev.package.backtrace]
inherits = "release"

Expand Down
3 changes: 1 addition & 2 deletions cumulus/parachain-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,7 @@ impl pallet_parachain_template::Config for Runtime {

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime
{
pub struct Runtime {
// System support stuff.
System: frame_system = 0,
ParachainSystem: cumulus_pallet_parachain_system = 1,
Expand Down
4 changes: 1 addition & 3 deletions cumulus/parachains/pallets/collective-content/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ impl WeightInfo for CCWeightInfo {
// Build test environment.
pub fn new_test_ext() -> sp_io::TestExternalities {
let t = RuntimeGenesisConfig::default().build_storage().unwrap().into();
let mut ext = sp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext
sp_io::TestExternalities::new(t)
}

#[cfg(feature = "runtime-benchmarks")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ pub(crate) mod import_kusama_fellowship {
#[cfg(test)]
pub mod tests {
use super::import_kusama_fellowship::FellowshipAddresses;
use crate::{FellowshipCollectiveInstance as Fellowship, Runtime, System};
use crate::{FellowshipCollectiveInstance as Fellowship, Runtime};
use frame_support::traits::OnRuntimeUpgrade;
use pallet_ranked_collective::Rank;
use parachains_common::AccountId;
Expand Down Expand Up @@ -238,7 +238,6 @@ pub mod tests {

let t = frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap();
let mut ext = sp_io::TestExternalities::new(t);
ext.execute_with(|| System::set_block_number(1));
ext.execute_with(|| {
assert_eq!(MemberCount::<Runtime, Fellowship>::get(0), 0);
Migration::<Runtime, Fellowship>::on_runtime_upgrade();
Expand Down
63 changes: 63 additions & 0 deletions developer-hub/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[package]
name = "developer-hub"
description = "The one stop shop for developers of the polakdot-sdk"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
homepage = "paritytech.github.io"
repository.workspace = true
authors.workspace = true
edition.workspace = true
# This crate is not publish-able to crates.io for now because of docify.
publish = false
version = "0.0.1"

[dependencies]
# Needed for all FRAME-based code
parity-scale-codec = { version = "3.0.0", default-features = false }
scale-info = { version = "2.6.0", default-features = false }
frame = { path = "../substrate/frame", features = ["runtime", "experimental"] }
pallet-examples = { path = "../substrate/frame/examples" }
pallet-default-config-example = { path = "../substrate/frame/examples/default-config" }

# How we build docs in rust-docs
simple-mermaid = { git = "https://github.com/kianenigma/simple-mermaid.git", branch = "main" }
docify = "0.2.6"

# Polkadot SDK deps, typically all should only be scope such that we can link to their doc item.
node-cli = { package = "staging-node-cli", path = "../substrate/bin/node/cli" }
kitchensink-runtime = { path = "../substrate/bin/node/runtime" }
chain-spec-builder = { package = "staging-chain-spec-builder", path = "../substrate/bin/utils/chain-spec-builder" }
subkey = { path = "../substrate/bin/utils/subkey" }

# Substrate
sc-network = { path = "../substrate/client/network" }
sc-rpc-api = { path = "../substrate/client/rpc-api" }
sc-rpc = { path = "../substrate/client/rpc" }
sc-client-db = { path = "../substrate/client/db" }
sc-cli = { path = "../substrate/client/cli" }
sc-consensus-aura = { path = "../substrate/client/consensus/aura" }
sc-consensus-babe = { path = "../substrate/client/consensus/babe" }
sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" }
sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" }
sc-consensus-manual-seal = { path = "../substrate/client/consensus/manual-seal" }
sc-consensus-pow = { path = "../substrate/client/consensus/pow" }
substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" }

# Cumulus
cumulus-pallet-aura-ext = { path = "../cumulus/pallets/aura-ext" }
cumulus-pallet-parachain-system = { path = "../cumulus/pallets/parachain-system", features = [
"parameterized-consensus-hook",
] }
parachain-info = { package = "staging-parachain-info", path = "../cumulus/parachains/pallets/parachain-info" }
pallet-aura = { path = "../substrate/frame/aura" }
pallet-timestamp = { path = "../substrate/frame/timestamp" }

# Primitives
sp-io = { path = "../substrate/primitives/io" }
sp-api = { path = "../substrate/primitives/api" }
sp-core = { path = "../substrate/primitives/core" }
sp-keyring = { path = "../substrate/primitives/keyring" }
sp-runtime = { path = "../substrate/primitives/runtime" }

[dev-dependencies]
parity-scale-codec = "3.6.5"
scale-info = "2.9.0"
54 changes: 54 additions & 0 deletions developer-hub/headers/toc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<script>
window.addEventListener("DOMContentLoaded", (event) => {
// if the crate is one that starts with `developer_hub`
let crate_name = document.querySelector("#main-content > div > h1 > a:nth-child(1)");
if (!crate_name.textContent.startsWith("developer_hub")) {
console.log("skipping -- not `developer_hub`");
return;
}

let sidebar = document.querySelector(".sidebar");
let headers = document.querySelectorAll("#main-content h2, #main-content h3, #main-content h4");
console.log(`detected developer_hub: headers: ${headers.length}`);

let toc = document.createElement("div");
toc.classList.add("table-of-contents");
toc.appendChild(document.createElement("h2").appendChild(document.createTextNode("Table of Contents")).parentNode);

// the first two headers are always junk
headers.forEach(header => {
let link = document.createElement("a");
link.href = "#" + header.id;
link.textContent = header.textContent;
link.className = header.tagName.toLowerCase();
toc.appendChild(link);
});

sidebar.insertBefore(toc, sidebar.firstChild);
console.log("injecting ToC");
});
</script>
<style>
.table-of-contents {
margin-bottom: 1em;
padding: 0.5em;
}

.table-of-contents a {
display: block;
margin: 0.2em 0;
}

.table-of-contents .h2 {
font-weight: bold;
margin-left: 0;
}

.table-of-contents .h3 {
margin-left: 1em;
}

.table-of-contents .h4 {
margin-left: 2em;
}
</style>
1 change: 1 addition & 0 deletions developer-hub/src/guides/changing_consensus.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions developer-hub/src/guides/cumulus_enabled_parachain.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading