Skip to content

Commit 5f77d02

Browse files
authored
Misc docs (#31)
* fix pypi metadata * add links to readme * fix docs workflow to only run on tagged releases * make it so docs can be run manually too * minor bump * update docs workflow to publish both library and dev docs * update doc names * fix docs
1 parent 0b36f67 commit 5f77d02

File tree

5 files changed

+36
-13
lines changed

5 files changed

+36
-13
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Documentation
22

3-
# build the documentation whenever there are new commits on main
3+
# build the documentation whenever there are new commits on main and for tags
44
on:
55
push:
6-
branches:
7-
tags:
6+
tags:
87
- '*'
8+
workflow_dispatch:
99

1010
# security: restrict permissions for CI jobs.
1111
permissions:
@@ -16,7 +16,6 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
# setup
2019
- uses: actions/checkout@v5
2120
with:
2221
persist-credentials: false
@@ -32,15 +31,14 @@ jobs:
3231
- name: Install chordnet dependencies
3332
run: uv sync --frozen --all-extras --dev
3433

35-
- name: Build docs
36-
run: uv run pdoc -o docs/ chordnet
34+
- name: Build library docs
35+
run: uv run pdoc --no-show-source --docformat google -o docs/ chordnet
3736

3837
- uses: actions/upload-pages-artifact@v4
3938
with:
4039
path: docs/
4140

42-
# Deploy the artifact to GitHub pages.
43-
# This is a separate job so that only actions/deploy-pages has the necessary permissions.
41+
# Deploy the artifact to GitHub Pages.
4442
deploy:
4543
needs: build
4644
runs-on: ubuntu-latest

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ This fits with the concept of "joining" an existing ring network, or creating a
3636
new one. Examples follow this practice.
3737

3838
## Development
39-
See `CONTRIBUTING.md`.
39+
See `CONTRIBUTING.md` [(here)](https://github.com/jacklowrie/chordnet?tab=contributing-ov-file).
4040

4141
## Security
4242
If you discover a security issue, **please do not open a public issue**.
43-
See `SECURITY.md` for the full policy/reporting instructions.
43+
See the [security policy](https://github.com/jacklowrie/chordnet/security/policy)
44+
for reporting instructions.

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "chordnet"
3-
version = "2.0.0"
3+
version = "2.1.0"
44
license = "MIT"
55
license-files = ["LICENSE"]
66
description = "Implementation of the chord peer-to-peer networking protocol, introduced by Stoica et al."
@@ -60,11 +60,21 @@ classifiers = [
6060
"Typing :: Typed",
6161
]
6262

63+
6364
requires-python = ">=3.10"
6465
dependencies = [
6566
"loguru>=0.7.3",
6667
]
6768

69+
[project.urls]
70+
Homepage = "https://github.com/jacklowrie/chordnet"
71+
Source = "https://github.com/jacklowrie/chordnet"
72+
Documentation = "https://jacklowrie.github.io/chordnet/chordnet.html"
73+
Issues = "https://github.com/jacklowrie/chordnet/issues"
74+
download = "https://github.com/jacklowrie/chordnet/releases"
75+
History = "https://github.com/jacklowrie/chordnet/releases"
76+
PyPI = "https://pypi.org/project/chordnet/"
77+
6878
[build-system]
6979
requires = ["uv_build>=0.7.19,<0.8"]
7080
build-backend = "uv_build"

src/chordnet/__init__.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
"""init.py: defines importable classes."""
1+
"""# A Python Library for Distributed Computing
2+
3+
ChordNet implements the chord protocol, introduced by Stoica et al.
4+
It implements a distributed hash table.
5+
6+
## Project Links
7+
- [Source (github)](https://github.com/jacklowrie/chordnet)
8+
- [Issues](https://github.com/jacklowrie/chordnet/issues)
9+
- [Download](https://github.com/jacklowrie/chordnet/releases)
10+
- [History](https://github.com/jacklowrie/chordnet/releases)
11+
- [PyPI](https://pypi.org/project/chordnet/)
12+
13+
.. include:: ../../README.md
14+
:start-line: 16
15+
""" # noqa: D415 (this docstring is rendered by pdoc)
216
from loguru import logger
317

418
from .chordnet import ChordNet

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)