Skip to content

Commit

Permalink
Fix some links (rerun-io#1314)
Browse files Browse the repository at this point in the history
* lint markdown files too

* Github -> GitHub

* Update links to our Python API docs
  • Loading branch information
emilk authored Feb 15, 2023
1 parent be6339c commit ad7b7de
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
run: rustup target add wasm32-unknown-unknown && cargo install wasm-bindgen-cli --version 0.2.84

# The last step of setup_web.sh, for Windows.
# Since 'winget' is not available within the github runner, we download the package directly:
# Since 'winget' is not available within the GitHub runner, we download the package directly:
# See: https://github.com/marketplace/actions/engineerd-configurator
- name: Install binaryen for building the web-viewer Wasm on windows
if: matrix.platform == 'windows'
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
name: wheels
path: dist

- name: Github Release
- name: GitHub Release
uses: softprops/[email protected]
with:
body: ${{ env.PRE_RELEASE_INSTRUCTIONS }}
Expand All @@ -262,7 +262,7 @@ jobs:
name: wheels
path: dist

- name: Github Release
- name: GitHub Release
uses: softprops/[email protected]
with:
prerelease: false
Expand All @@ -273,7 +273,7 @@ jobs:
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
# These are both set in the Github project configuration
# These are both set in the GitHub project configuration
MATURIN_REPOSITORY: ${{ vars.PYPI_REPOSITORY }}
MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }}
with:
Expand Down
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rustup set default-host aarch64-apple-darwin && rustup install 1.67

High-level documentation for rerun can be found at [http://rerun.io/docs](http://rerun.io/docs). It is built from the separate repository [rerun-docs](https://github.com/rerun-io/rerun-docs).

Python API docs can be found at <https://rerun-io.github.io/rerun> and are built via `mkdocs` and hosted on GitHub. For details on how more information on the python doc-system see [Writing Docs](https://rerun-io.github.io/rerun/latest/docs).
Python API docs can be found at <https://ref.rerun.io/docs/python> and are built via `mkdocs` and hosted on GitHub. For details on the python doc-system, see [Writing Docs](https://github.com/rerun-io/rerun/blob/main/rerun_py/docs/writing_docs.md).

Rust documentation is hosted on <https://docs.rs/rerun/>. You can build them locally with: `cargo doc --all-features --no-deps --open`

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ You should now be able to run `rerun --help` in any terminal.
### Documentation
- 📚 [High-level docs](http://rerun.io/docs)
- ⚙️ [Examples](examples)
- 🐍 [Python API docs](https://rerun-io.github.io/rerun)
- 🐍 [Python API docs](https://ref.rerun.io/docs/python)
- 🦀 [Rust API docs](https://docs.rs/rerun/)
- ⁉️ [Troubleshooting](https://www.rerun.io/docs/getting-started/troubleshooting)

Expand Down
2 changes: 1 addition & 1 deletion examples/rust/objectron/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fn main() -> Result<(), std::io::Error> {
let src_path = PathBuf::from(out_dir).join("objectron.proto.rs");
let dst_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("src/objectron.rs");

// `include!()` will break LSP & Github navigation, so create an actual source file to make the
// `include!()` will break LSP & GitHub navigation, so create an actual source file to make the
// UX reasonable.

let bytes = [
Expand Down
9 changes: 5 additions & 4 deletions rerun_py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It lets you debug and understand the internal state and data of your systems wit
pip3 install rerun-sdk
```

ℹ️ Note:
ℹ️ Note:
The Python module is called `rerun`, while the package published on PyPI is `rerun-sdk`.

## Example
Expand All @@ -32,8 +32,9 @@ rr.log_points("my_points", positions=positions, colors=colors)

## Resources
* [Quick start](https://www.rerun.io/docs/getting-started/python)
* [Python API docs](https://ref.rerun.io/docs/python)
* [Tutorial](https://www.rerun.io/docs/getting-started/logging-python)
* [Examples on Github](https://github.com/rerun-io/rerun/tree/latest/examples/python)
* [Examples on GitHub](https://github.com/rerun-io/rerun/tree/latest/examples/python)
* [Troubleshooting](https://www.rerun.io/docs/getting-started/troubleshooting)
* [Discord Server](https://discord.com/invite/Gcm8BbTaAj)

Expand All @@ -55,7 +56,7 @@ python3 examples/python/car/main.py --connect

# From Source

Checkout the [Github repository](https://github.com/rerun-io/rerun):
Checkout the [GitHub repository](https://github.com/rerun-io/rerun):
```sh
git clone [email protected]:rerun-io/rerun.git
```
Expand All @@ -68,7 +69,7 @@ python3 -m pip install --upgrade pip
pip3 install maturin "./rerun_py"
```

ℹ️ Note:
ℹ️ Note:
If you are unable to upgrade pip to version `>=21.3`, you need to pass `--use-feature=in-tree-build` to the `pip3 install` command.

## Development
Expand Down
2 changes: 1 addition & 1 deletion rerun_py/docs/gen_common_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def make_slug(s: str) -> str:
# Getting Started
* [Quick start](https://www.rerun.io/docs/getting-started/python)
* [Tutorial](https://www.rerun.io/docs/getting-started/logging-python)
* [Examples on Github](https://github.com/rerun-io/rerun/tree/latest/examples/python)
* [Examples on GitHub](https://github.com/rerun-io/rerun/tree/latest/examples/python)
* [Troubleshooting](https://www.rerun.io/docs/getting-started/troubleshooting)
# APIs
Expand Down
6 changes: 3 additions & 3 deletions rerun_py/docs/writing_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ just py-docs-serve
### How versioned docs are generated and served
Our documentation is versioned with releases and generated via [mike](https://github.com/jimporter/mike)

The documentation exists as a [Github Pages](https://pages.github.com/) project which is hosted from the
The documentation exists as a [GitHub Pages](https://pages.github.com/) project which is hosted from the
contents of the `gh-pages` branch.

`mike` updates this branch with new content as part of CI

Every commit that lands to main will generate bleeding edge documentation as HEAD. Behind the scenes, a
github action is just running:
GitHub action is just running:
```
mike deploy -F rerun_py/mkdocs.yml HEAD
```

On release, when github sees a new tag: `X.Y.Z`, the github action will instead deploy with a version tag:
On release, when GitHub sees a new tag: `X.Y.Z`, the GitHub action will instead deploy with a version tag:
```
mike deploy -F rerun_py/mkdocs.yml X.Y.Z latest
```
Expand Down
10 changes: 8 additions & 2 deletions scripts/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ def lint_line(line: str) -> Optional[str]:
if "NOLINT" in line:
return None # NOLINT ignores the linter

if "Github" in line:
return "It's 'GitHub', not 'Github'"

if " github " in line:
return "It's 'GitHub', not 'github'"

if "FIXME" in line:
return "we prefer TODO over FIXME"

Expand Down Expand Up @@ -148,12 +154,12 @@ def lint_file(filepath: str) -> int:
root_dirpath = os.path.abspath(f"{script_dirpath}/..")
os.chdir(root_dirpath)

extensions = ["html", "js", "py", "rs", "sh", "toml", "wgsl", "yml"]
extensions = ["html", "js", "md", "py", "rs", "sh", "toml", "wgsl", "yml"]

exclude_dirs = {"env", "venv", "target", "target_ra", "target_wasm"}

exclude_paths = {
"./CONTRIBUTING.md",
"./CODE_STYLE.md",
"./scripts/lint.py", # we contain all the patterns we are linting against
"./web_viewer/re_viewer.js", # auto-generated by wasm_bindgen
}
Expand Down

0 comments on commit ad7b7de

Please sign in to comment.