Skip to content

Commit bfd5217

Browse files
committed
feat: auto docs using mkdocstrings
- new doc dependencies: `mkdocs`, `mkdocs-material` and `mkdocstrings` - auto reference documentation using `mkdocstrings` - moves `pytest` to "tests" dependency group - install only pytest for testing in github-ci
1 parent 6a6bfed commit bfd5217

File tree

5 files changed

+729
-6
lines changed

5 files changed

+729
-6
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
#----------------------------------------------
4949
- name: Install dependencies
5050
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
51-
run: poetry install --no-interaction --no-root
51+
run: poetry install --no-interaction --no-root --no-ansi --only tests
5252
#----------------------------------------------
5353
# run test suite
5454
#----------------------------------------------

docs/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Reference
2+
3+
::: validators.utils
4+
5+
::: validators.between
6+
7+
::: validators.btc_address
8+
9+
::: validators.card
10+
11+
::: validators.domain
12+
13+
::: validators.email
14+
15+
::: validators.length

mkdocs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
site_name: "validators"
2+
site_description: "Automatic documentation from sources, for MkDocs."
3+
site_url: "https://python-validators.github.io/"
4+
repo_url: "https://github.com/python-validators/validators"
5+
edit_uri: "tree/master/docs/"
6+
repo_name: "validators/validators"
7+
site_dir: "site"
8+
watch: [README.md, validators/]
9+
10+
nav:
11+
- Reference: index.md
12+
13+
theme:
14+
name: material
15+
16+
plugins:
17+
- search
18+
- mkdocstrings:
19+
handlers:
20+
python:
21+
import:
22+
- https://docs.python-requests.org/en/master/objects.inv
23+
24+
extra:
25+
social:
26+
- icon: fontawesome/brands/github
27+
link: https://github.com/python-validators/validators

0 commit comments

Comments
 (0)