Skip to content

Commit 6db017b

Browse files
authored
Migrate sphinx documentation system to material for mkdocs (#48)
1 parent 1983248 commit 6db017b

File tree

469 files changed

+6105
-7671
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

469 files changed

+6105
-7671
lines changed

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# macOS system files
2+
.DS_Store
3+
4+
# MkDocs build artifacts
5+
site/
6+
docs/SUMMARY.md
7+
docs/clients/
8+
**/docs/client/
9+
10+
# Virtual environments
11+
.venv
12+
venv
13+
14+
# Caches
15+
__pycache__/
16+
.ruff_cache/
17+
18+
# Dependency lock file for uv
19+
uv.lock

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ If you discover a potential security issue in this project we ask that you notif
5656

5757
## Licensing
5858

59-
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
59+
See the [LICENSE](https://github.com/awslabs/aws-sdk-python/blob/develop/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
DOCS_PORT ?= 8000
2+
PYTHON_VERSION := 3.12
3+
4+
.PHONY: docs docs-serve docs-clean docs-install venv
5+
6+
venv:
7+
uv venv --python $(PYTHON_VERSION)
8+
9+
docs-install: venv
10+
uv pip install -r requirements-docs.in
11+
uv pip install -e clients/*
12+
13+
docs-clean:
14+
rm -rf site docs/clients docs/SUMMARY.md
15+
16+
docs-generate:
17+
uv run python scripts/docs/generate_all_doc_stubs.py
18+
uv run python scripts/docs/generate_nav.py
19+
20+
docs: docs-generate
21+
uv run mkdocs build
22+
23+
docs-serve:
24+
@[ -d site ] || $(MAKE) docs
25+
uv run python -m http.server $(DOCS_PORT) --bind 127.0.0.1 --directory site

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This is the preferred mechanism to give feedback so that other users can engage
3131

3232
## Security
3333

34-
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
34+
See [CONTRIBUTING](https://github.com/awslabs/aws-sdk-python/blob/develop/CONTRIBUTING.md#security-issue-notifications) for more information.
3535

3636
## License
3737

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
DOCS_PORT ?= 8000
2+
CLIENT_DIR := src/aws_sdk_bedrock_runtime
3+
DOCS_OUTPUT_DIR := docs/client
4+
PYTHON_VERSION := 3.12
5+
6+
.PHONY: docs docs-serve docs-clean docs-install venv
7+
8+
venv:
9+
uv venv --python $(PYTHON_VERSION)
10+
11+
docs-install: venv
12+
uv pip install -e . --group docs
13+
14+
docs-clean:
15+
rm -rf site $(DOCS_OUTPUT_DIR)
16+
17+
docs-generate:
18+
uv run --no-sync python scripts/docs/generate_doc_stubs.py -c $(CLIENT_DIR) -o $(DOCS_OUTPUT_DIR)
19+
20+
docs: docs-generate
21+
uv run --no-sync mkdocs build
22+
23+
docs-serve:
24+
@[ -d site ] || $(MAKE) docs
25+
uv run --no-sync python -m http.server $(DOCS_PORT) --bind 127.0.0.1 --directory site

clients/aws-sdk-bedrock-runtime/docs/Makefile

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
## Generating Documentation
1+
## Generating Client Documentation
22

3-
Sphinx is used for documentation. You can generate HTML locally with the
4-
following:
3+
Material for MkDocs is used for documentation. You can generate the documentation HTML
4+
for this client locally with the following:
55

6-
```
7-
$ uv pip install --group docs .
8-
$ cd docs
9-
$ make html
6+
```bash
7+
# Install documentation dependencies
8+
make docs-install
9+
10+
# Serve documentation locally
11+
make docs-serve
12+
13+
# OR build static HTML documentation
14+
make docs
15+
16+
# Clean docs artifacts
17+
make docs-clean
1018
```

clients/aws-sdk-bedrock-runtime/docs/client/apply_guardrail.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

clients/aws-sdk-bedrock-runtime/docs/client/converse.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

clients/aws-sdk-bedrock-runtime/docs/client/converse_stream.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)