Skip to content

Commit 15c8d5c

Browse files
Merge pull request #2 from p2p-ld/docs
docs :)
2 parents 33e4864 + 9a1ecd9 commit 15c8d5c

File tree

27 files changed

+2215
-41
lines changed

27 files changed

+2215
-41
lines changed

.github/workflows/docs-preview.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: readthedocs PR Preview links
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
documentation-links:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: readthedocs/actions/preview@v1
15+
with:
16+
project-slug: "torrent-models"

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,7 @@ cython_debug/
176176
prof
177177
.codspeed
178178
__tmp__
179-
*giant*.torrent
179+
*giant*.torrent
180+
181+
docs/new-tentacoli.torrent
182+
docs/my_files/*

.readthedocs.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the "docs/" directory with Sphinx
9+
sphinx:
10+
configuration: docs/conf.py
11+
12+
build:
13+
os: ubuntu-22.04
14+
tools:
15+
python: "3.13"
16+
17+
python:
18+
install:
19+
- method: pip
20+
path: .
21+
extra_requirements:
22+
- docs

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/css/notebooks.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
div.cell.tag_hide-cell details.above-input > summary,
2+
div.cell.tag_hide-input details.above-input > summary,
3+
div.cell.tag_hide-output details.below-input > summary{
4+
background-color: var(--color-admonition-title-background--admonition-todo);
5+
color: var(--color-content-foreground);
6+
border: unset;
7+
border-left: 2px solid var(--mystnb-source-margin-color);
8+
opacity: unset;
9+
padding: 0.25em 0 0.25em 1em;
10+
}
11+
12+
div.cell.tag_hide-cell details.above-input > summary > span,
13+
div.cell.tag_hide-input details.above-input > summary > span,
14+
div.cell.tag_hide-output details.below-input > summary > span
15+
{
16+
opacity: unset;
17+
}
18+
19+
div.cell details.above-input div.cell_input {
20+
border: unset;
21+
background-color: unset;
22+
border-left: 2px solid var(--mystnb-source-margin-color);
23+
}
24+
25+
div.cell details.above-input div.cell_input div.highlight {
26+
background: var(--color-admonition-background);
27+
}
28+
29+
.output.text_html pre {
30+
font-size: 0.8em;
31+
}

docs/api/create.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `create`
2+
3+
```{eval-rst}
4+
.. automodule:: torrent_models.create
5+
:members:
6+
:undoc-members:
7+
```

docs/api/hashing.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# `hashing`
2+
3+
## Base
4+
5+
```{eval-rst}
6+
.. automodule:: torrent_models.hashing.base
7+
:members:
8+
:undoc-members:
9+
```
10+
11+
## V1
12+
13+
```{eval-rst}
14+
.. automodule:: torrent_models.hashing.v1
15+
:members:
16+
:undoc-members:
17+
```
18+
19+
## V2
20+
21+
```{eval-rst}
22+
.. automodule:: torrent_models.hashing.v2
23+
:members:
24+
:undoc-members:
25+
```
26+
27+
## Hybrid
28+
29+
```{eval-rst}
30+
.. automodule:: torrent_models.hashing.hybrid
31+
:members:
32+
:undoc-members:
33+
```

docs/api/info.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# `info`
2+
3+
Infodict models!!
4+
5+
Each of the flavors of infodict have a version intended to validate
6+
and represent already-created torrent files,
7+
and a `Create` version used while creating torrents!
8+
9+
```{inheritance-diagram} torrent_models.info
10+
:top-classes: torrent_models.info.InfoDictRoot
11+
```
12+
13+
```{eval-rst}
14+
.. automodule:: torrent_models.info
15+
:members:
16+
:undoc-members:
17+
```

docs/api/libtorrent.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# `libtorrent`
2+
3+
Mostly for testing, utilities to use libtorrent to create torrents.
4+
5+
Must install with `torrent-models[libtorrent]`
6+
7+
```{eval-rst}
8+
.. automodule:: torrent_models.libtorrent
9+
:members:
10+
:undoc-members:
11+
```

docs/api/torrent.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `torrent`
2+
3+
```{eval-rst}
4+
.. automodule:: torrent_models.torrent
5+
:members:
6+
:undoc-members:
7+
```

0 commit comments

Comments
 (0)