Skip to content

Commit 6ef1121

Browse files
authored
Merge pull request #234 from joe733/workshop
feat: auto docs using mkdocstrings
2 parents 6a6bfed + 1ba367b commit 6ef1121

File tree

6 files changed

+852
-6
lines changed

6 files changed

+852
-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
#----------------------------------------------

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-ast
7+
- id: check-case-conflict
8+
- id: check-toml
9+
- id: check-yaml
10+
- id: end-of-file-fixer
11+
- id: debug-statements
12+
- id: destroyed-symlinks
13+
- id: trailing-whitespace
14+
# will be uncommented when all the
15+
# scripts have been revised once
16+
# - repo: https://github.com/psf/black
17+
# rev: 23.1.0
18+
# hooks:
19+
# - id: black
20+
# - repo: https://github.com/PyCQA/isort
21+
# rev: 5.12.0
22+
# hooks:
23+
# - id: isort
24+
# - repo: https://github.com/PyCQA/flake8
25+
# rev: 6.0.0
26+
# hooks:
27+
# - id: flake8

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)