Compare commits
265 Commits
Author | SHA1 | Date | |
---|---|---|---|
5011954847 | |||
2c7445c5a6 | |||
bf5e3e1839 | |||
f80767454a | |||
bfb243c233 | |||
e0209e29d6 | |||
213c4d681c | |||
60c42befdf | |||
d31d9507d2 | |||
ca84069e9a | |||
dd2e3848cc | |||
8c56b88113 | |||
cc0bb86a53 | |||
b3eeaef41d | |||
0ac4e4c9c0 | |||
35bbe91eb4 | |||
b4ce8e9642 | |||
479cf6a937 | |||
acea57bcba | |||
64e8aa2816 | |||
38801b52a7 | |||
e73f39cfa9 | |||
7536ca8683 | |||
493991edd1 | |||
29003eae80 | |||
79b977a55a | |||
df9083c3e2 | |||
f3e7f4f229 | |||
12864cdb44 | |||
671a0a8391 | |||
553b1c1fcd | |||
f040c6454d | |||
f0599f6d54 | |||
042bb964e5 | |||
a3089ef956 | |||
0683a11b78 | |||
532fbb352c | |||
a1a02a1230 | |||
e5146a7cd5 | |||
dedbe43c3e | |||
218c6b4672 | |||
800e9756c5 | |||
24e1d948f2 | |||
bf758803cc | |||
62e481fb1e | |||
ff4bff38dd | |||
f417993c85 | |||
8bebb40c9f | |||
ec68e67645 | |||
95894ba00f | |||
ad19153225 | |||
8d476bbec6 | |||
b233f94a24 | |||
6351fb1bbc | |||
0e11945f1d | |||
d3d454a2d7 | |||
b150024bff | |||
0ad6216cde | |||
8925458665 | |||
25f8effd19 | |||
9c6c504ae5 | |||
6e170684d5 | |||
54d2ea373f | |||
43cc9d18b6 | |||
3467a5d5dd | |||
a93e30c3e8 | |||
d5dbeadda3 | |||
ed36086040 | |||
9f8069decb | |||
faaeb3a472 | |||
bc3d698539 | |||
d9d73522fd | |||
243ed3222a | |||
098e1fa97d | |||
738659dfbc | |||
5054fd19d3 | |||
058b4dc40a | |||
373b5ef4ae | |||
6b8807feea | |||
b6aa9ab98b | |||
be246702fd | |||
68d7a6d9a3 | |||
6b2fe3decb | |||
4f29f55190 | |||
6ad21a2c87 | |||
036965255a | |||
4120a139cd | |||
12c164620b | |||
31cd9e532d | |||
29b0200c4c | |||
ba3fb82a86 | |||
4c10c47b4a | |||
2e279da9c1 | |||
12e5baef9e | |||
0ef8f505ad | |||
01a73859d4 | |||
f63509a1eb | |||
7cb8d5327f | |||
1f9a787c15 | |||
3e2c9450dc | |||
eb8d1b77bb | |||
d5184bf172 | |||
3cad86c5a3 | |||
63824cd04f | |||
816904419e | |||
e68857f4c9 | |||
db1bd33c79 | |||
dea0d637fe | |||
2e1c75769f | |||
8162fa1964 | |||
d737fb4e8f | |||
686ec0cb36 | |||
f522911d7b | |||
1e693890ef | |||
755a4fd789 | |||
581c06a943 | |||
3ce38b0b26 | |||
d8a3120db3 | |||
968e8bbefd | |||
9921f5a9f3 | |||
3cde65018e | |||
8ba29a105d | |||
690e7686fd | |||
6a23831e8f | |||
1eafc5225d | |||
1a978b79f0 | |||
20b2a188dc | |||
4c3f497d73 | |||
d678182dcf | |||
6998fc0865 | |||
e2209b2ebd | |||
6c8fc70413 | |||
021595ed07 | |||
f5da088b67 | |||
fd52b906c4 | |||
405e78dc67 | |||
d0a345acd0 | |||
c6af833ec5 | |||
da9376ece5 | |||
e083b6e0e6 | |||
74f5be43fa | |||
65137564cf | |||
9c726ee5da | |||
c111c3813f | |||
42f173783f | |||
d8aeffc780 | |||
55b35a322e | |||
fa2b411b78 | |||
f933b716f4 | |||
8cf515b39f | |||
c209414459 | |||
a6638fb08a | |||
dee61d7b08 | |||
91dbd8bc07 | |||
b80be3ab47 | |||
e23c09d4dd | |||
3734729d22 | |||
0b99828bb6 | |||
7c13493e90 | |||
2ba2a2a771 | |||
77cd2c0956 | |||
4bb01c8473 | |||
cb1bc5f3cd | |||
fcd317aae4 | |||
8877a3c146 | |||
b8d1f92872 | |||
e7009146e4 | |||
a03bc56651 | |||
2833086f13 | |||
67da0afff9 | |||
573f4a8bc8 | |||
11a1948ebc | |||
137b1600a8 | |||
6ef6e60467 | |||
374a57746e | |||
20a61d19d1 | |||
782dc863d4 | |||
daab399185 | |||
e4370b6108 | |||
0403eddfd7 | |||
95f22c849d | |||
9fe98c9185 | |||
d90bc06ff4 | |||
e63cda47eb | |||
44e8b10185 | |||
533c43952c | |||
19ebe81f5b | |||
ff34befdd3 | |||
8b1c2fbc04 | |||
ae62d18ff3 | |||
22ee8f364a | |||
9948d645a4 | |||
23e631ea94 | |||
977396c615 | |||
34f46d5022 | |||
936e4adbf1 | |||
c19114f3d2 | |||
ab1740e2a5 | |||
667ef08235 | |||
dec4b2a6e3 | |||
4c12ac0506 | |||
d8b33f880f | |||
fec30b6abc | |||
3117c86ea4 | |||
8bb54b8382 | |||
08ac3093a8 | |||
152e2ccc0c | |||
ef6b1d9ca1 | |||
284a911a38 | |||
5c2d11d814 | |||
a26c922360 | |||
0ba1480511 | |||
ddb5f19a29 | |||
3c70a17d78 | |||
994b2de5c3 | |||
29d1308d0e | |||
4e0a5c1b44 | |||
f01cb3c62d | |||
908c7efe12 | |||
df3f38ba7d | |||
e5b9c1020c | |||
4a5411d0ca | |||
0422a9a4fd | |||
f622646127 | |||
b8f4106107 | |||
b32d37fc48 | |||
650a99936b | |||
b4d43b584b | |||
0d39b80547 | |||
d86f2560ac | |||
c5db75b131 | |||
0b33d376c2 | |||
95faa77326 | |||
39b183c731 | |||
f408eae3d2 | |||
2134a8e5de | |||
8d0ab1a2b8 | |||
efabead34c | |||
4d2468541c | |||
e7f966bea8 | |||
147dea9927 | |||
6f2330aa85 | |||
8e7d73973d | |||
8c9d476771 | |||
96a23c4672 | |||
4f88e5f0a7 | |||
a49aa621ed | |||
eb0380ef2d | |||
9414ebcc0b | |||
0c6b538605 | |||
905e2094de | |||
4623f854af | |||
3802dd36fc | |||
a046a9a82b | |||
c795346cd0 | |||
3bd4326f2c | |||
b08726834a | |||
26954ba9f8 | |||
20496480f7 | |||
2c8e9f90d7 | |||
197aa2fc55 | |||
4beba625ed | |||
67a03bdd03 | |||
30db5097ff | |||
b80b69b023 |
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
docs/html/.doctrees/environment.pickle filter=lfs diff=lfs merge=lfs -text
|
38
.github/workflows/black.yml
vendored
Normal file
38
.github/workflows/black.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: black
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/black.yml
|
||||
- 'pyproject.toml'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/black.yml
|
||||
- 'pyproject.toml'
|
||||
jobs:
|
||||
black:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
# Installation instructions are from: https://python-poetry.org/docs/
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
pip install \
|
||||
poetry
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
poetry install
|
||||
poetry build
|
||||
|
||||
- name: Run black
|
||||
shell: bash
|
||||
run: |
|
||||
poetry run black --check --diff . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py
|
16
.github/workflows/build-test.yml
vendored
16
.github/workflows/build-test.yml
vendored
@ -19,12 +19,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.7, 3.8, 3.9]
|
||||
python-version: [3.8, 3.9]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
@ -41,14 +41,6 @@ jobs:
|
||||
poetry install
|
||||
poetry build
|
||||
|
||||
- name: Lint with flake8
|
||||
shell: bash
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
#poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
|
||||
- name: Run pytest
|
||||
shell: bash
|
||||
run: |
|
||||
@ -57,7 +49,7 @@ jobs:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: true
|
||||
|
5
.github/workflows/generate-docs.yml
vendored
5
.github/workflows/generate-docs.yml
vendored
@ -15,9 +15,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
@ -40,6 +40,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf docs/html
|
||||
rm -rf docs/_autosummary
|
||||
poetry install
|
||||
poetry run sphinx-build -b html docs/ docs/html/
|
||||
|
||||
|
4
.github/workflows/generate.yml
vendored
4
.github/workflows/generate.yml
vendored
@ -16,13 +16,15 @@ jobs:
|
||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
- name: Run generate
|
||||
shell: bash
|
||||
run: |
|
||||
make generate
|
||||
env:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
|
6
.github/workflows/make-release.yml
vendored
6
.github/workflows/make-release.yml
vendored
@ -8,8 +8,8 @@ jobs:
|
||||
name: make-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
# Installation instructions are from: https://python-poetry.org/docs/
|
||||
@ -28,4 +28,4 @@ jobs:
|
||||
# TODO: generate a nice little doc for the release text like we do for the
|
||||
# cli repo.
|
||||
- name: Create a Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
uses: softprops/action-gh-release@v2
|
||||
|
38
.github/workflows/mypy.yml
vendored
Normal file
38
.github/workflows/mypy.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: mypy
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/mypy.yml
|
||||
- 'pyproject.toml'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/mypy.yml
|
||||
- 'pyproject.toml'
|
||||
jobs:
|
||||
mypy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
# Installation instructions are from: https://python-poetry.org/docs/
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
pip install \
|
||||
poetry
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
poetry install
|
||||
poetry build
|
||||
|
||||
- name: Run mypy
|
||||
shell: bash
|
||||
run: |
|
||||
poetry run mypy .
|
38
.github/workflows/ruff.yml
vendored
Normal file
38
.github/workflows/ruff.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: ruff
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/ruff.yml
|
||||
- 'pyproject.toml'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/ruff.yml
|
||||
- 'pyproject.toml'
|
||||
jobs:
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
# Installation instructions are from: https://python-poetry.org/docs/
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
pip install \
|
||||
poetry
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
poetry install
|
||||
poetry build
|
||||
|
||||
- name: Run ruff
|
||||
shell: bash
|
||||
run: |
|
||||
poetry run ruff check --output-format=github .
|
37
.github/workflows/update-spec-for-docs.yml
vendored
37
.github/workflows/update-spec-for-docs.yml
vendored
@ -15,16 +15,25 @@ jobs:
|
||||
name: update-spec
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/create-github-app-token@v1
|
||||
id: app-token
|
||||
with:
|
||||
# required
|
||||
app-id: ${{ secrets.GH_ORG_APP_ID }}
|
||||
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
- uses: actions/checkout@v4
|
||||
- name: make generate
|
||||
shell: bash
|
||||
run: |
|
||||
make generate
|
||||
env:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
# Ensure no files changed.
|
||||
- name: Ensure no files changed
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ `git status --porcelain` ]]; then
|
||||
if [[ `git status --porcelain kittycad/` ]]; then
|
||||
echo "Files changed, exiting";
|
||||
exit 1;
|
||||
else
|
||||
@ -32,35 +41,37 @@ jobs:
|
||||
echo "No files changed, proceeding";
|
||||
fi
|
||||
# Checkout the docs repo since we will want to update the files there.
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'kittycad/docs'
|
||||
repository: 'kittycad/website'
|
||||
path: 'docs'
|
||||
token: ${{secrets.PAT_GITHUB}}
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
- name: move spec to docs
|
||||
shell: bash
|
||||
run: |
|
||||
rm docs/spec.json || true
|
||||
cp spec.json docs/spec.json
|
||||
rm docs/kittycad.py.patch.json || true
|
||||
cp kittycad.py.patch.json docs/kittycad.py.patch.json
|
||||
- name: commit the changes in the docs repo
|
||||
shell: bash
|
||||
run: |
|
||||
export VERSION=$(cat VERSION.txt);
|
||||
cd docs
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git add .
|
||||
git commit -am "YOYO NEW SPEC DOCS ${VERSION}!" || exit 0
|
||||
git commit -am "YOYO NEW SPEC PYTHON DOCS!" || exit 0
|
||||
git fetch origin
|
||||
git rebase origin/main || exit 0
|
||||
export NEW_BRANCH="update-spec-${VERSION}"
|
||||
export NEW_BRANCH="update-spec-python"
|
||||
git checkout -b "$NEW_BRANCH"
|
||||
git push -f origin "$NEW_BRANCH"
|
||||
gh pr create --title "Update lang spec docs for ${VERSION}" \
|
||||
--body "Updating the generated docs for go lang" \
|
||||
gh pr create --title "Update lang spec docs for python" \
|
||||
--body "Updating the generated docs for python" \
|
||||
--head "$NEW_BRANCH" \
|
||||
--reviewer jessfraz \
|
||||
--reviewer irev-dev \
|
||||
--reviewer franknoirot \
|
||||
--base main || true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.PAT_GITHUB}}
|
||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
|
||||
|
||||
|
8
.gitignore
vendored
8
.gitignore
vendored
@ -22,5 +22,11 @@ dmypy.json
|
||||
/coverage.xml
|
||||
/.coverage
|
||||
|
||||
poetry.lock
|
||||
testing
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
docs/_autosummary/
|
||||
docs/html/_sources/
|
||||
|
||||
snapshot.png
|
||||
|
@ -3,9 +3,9 @@ FROM python:3.9
|
||||
RUN pip install \
|
||||
poetry
|
||||
|
||||
WORKDIR /usr/src/
|
||||
WORKDIR /home/user/src/
|
||||
|
||||
COPY . /usr/src/
|
||||
COPY . /home/user/src/
|
||||
|
||||
RUN poetry update && poetry install
|
||||
|
||||
|
10
Makefile
10
Makefile
@ -13,18 +13,20 @@ VERSION := $(shell toml get $(CURDIR)/pyproject.toml tool.poetry.version | jq -r
|
||||
generate: docker-image ## Generate the api client.
|
||||
docker run --rm -i $(DOCKER_FLAGS) \
|
||||
--name python-generator \
|
||||
-e KITTYCAD_API_TOKEN \
|
||||
--disable-content-trust \
|
||||
-v $(CURDIR):/usr/src \
|
||||
--workdir /usr/src \
|
||||
-v $(CURDIR):/home/user/src \
|
||||
--workdir /home/user/src \
|
||||
$(DOCKER_IMAGE_NAME) ./generate/run.sh
|
||||
|
||||
.PHONY: shell
|
||||
shell: docker-image ## Pop into a shell in the docker image.
|
||||
docker run --rm -i $(DOCKER_FLAGS) \
|
||||
--name python-generator-shell \
|
||||
-e KITTYCAD_API_TOKEN \
|
||||
--disable-content-trust \
|
||||
-v $(CURDIR):/usr/src \
|
||||
--workdir /usr/src \
|
||||
-v $(CURDIR):/home/user/src \
|
||||
--workdir /home/user/src \
|
||||
$(DOCKER_IMAGE_NAME) /bin/bash
|
||||
|
||||
|
||||
|
@ -3,14 +3,14 @@
|
||||
The Python API client for KittyCAD.
|
||||
|
||||
- [PyPI](https://pypi.org/project/kittycad/)
|
||||
- [Python docs](https://python.api.docs.kittycad.io/)
|
||||
- [KittyCAD API Docs](https://docs.kittycad.io/?lang=python)
|
||||
- [Python docs](https://python.api.docs.zoo.dev/)
|
||||
- [KittyCAD API Docs](https://zoo.dev/docs/api?lang=python)
|
||||
|
||||
## Generating
|
||||
|
||||
You can trigger a build with the GitHub action to generate the client. This will
|
||||
automatically update the client to the latest version based on the spec hosted
|
||||
at [api.kittycad.io](https://api.kittycad.io/).
|
||||
at [api.zoo.dev](https://api.zoo.dev/).
|
||||
|
||||
Alternatively, if you wish to generate the client locally, make sure you have
|
||||
[Docker installed](https://docs.docker.com/get-docker/) and run:
|
||||
|
1939
assets/ORIGINALVOXEL-3.obj
Normal file
1939
assets/ORIGINALVOXEL-3.obj
Normal file
File diff suppressed because it is too large
Load Diff
33
docs/_templates/custom-class-template.rst
vendored
Normal file
33
docs/_templates/custom-class-template.rst
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
{{ fullname | escape | underline}}
|
||||
|
||||
.. currentmodule:: {{ module }}
|
||||
|
||||
.. autoclass:: {{ objname }}
|
||||
:members:
|
||||
:show-inheritance:
|
||||
:inherited-members:
|
||||
|
||||
{% block methods %}
|
||||
.. automethod:: __init__
|
||||
|
||||
{% if methods %}
|
||||
.. rubric:: {{ _('Methods') }}
|
||||
|
||||
.. autosummary::
|
||||
{% for item in methods %}
|
||||
~{{ name }}.{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block attributes %}
|
||||
{% if attributes %}
|
||||
.. rubric:: {{ _('Attributes') }}
|
||||
|
||||
.. autosummary::
|
||||
{% for item in attributes %}
|
||||
~{{ name }}.{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
67
docs/_templates/custom-module-template.rst
vendored
Normal file
67
docs/_templates/custom-module-template.rst
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
{{ fullname | escape | underline}}
|
||||
|
||||
.. automodule:: {{ fullname }}
|
||||
|
||||
{% block attributes %}
|
||||
{% if attributes %}
|
||||
.. rubric:: Module Attributes
|
||||
|
||||
.. autosummary::
|
||||
:toctree:
|
||||
{% for item in attributes %}
|
||||
{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block functions %}
|
||||
{% if functions %}
|
||||
.. rubric:: {{ _('Functions') }}
|
||||
|
||||
.. autosummary::
|
||||
:toctree:
|
||||
{% for item in functions %}
|
||||
{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block classes %}
|
||||
{% if classes %}
|
||||
.. rubric:: {{ _('Classes') }}
|
||||
|
||||
.. autosummary::
|
||||
:toctree:
|
||||
:template: custom-class-template.rst
|
||||
{% for item in classes %}
|
||||
{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block exceptions %}
|
||||
{% if exceptions %}
|
||||
.. rubric:: {{ _('Exceptions') }}
|
||||
|
||||
.. autosummary::
|
||||
:toctree:
|
||||
{% for item in exceptions %}
|
||||
{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block modules %}
|
||||
{% if modules %}
|
||||
.. rubric:: Modules
|
||||
|
||||
.. autosummary::
|
||||
:toctree:
|
||||
:template: custom-module-template.rst
|
||||
:recursive:
|
||||
{% for item in modules %}
|
||||
{{ item }}
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
@ -1,27 +0,0 @@
|
||||
Client
|
||||
======
|
||||
|
||||
.. currentmodule:: kittycad
|
||||
|
||||
.. autoclass:: Client
|
||||
:show-inheritance:
|
||||
|
||||
.. rubric:: Methods Summary
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~Client.get_cookies
|
||||
~Client.get_headers
|
||||
~Client.get_timeout
|
||||
~Client.with_cookies
|
||||
~Client.with_headers
|
||||
~Client.with_timeout
|
||||
|
||||
.. rubric:: Methods Documentation
|
||||
|
||||
.. automethod:: get_cookies
|
||||
.. automethod:: get_headers
|
||||
.. automethod:: get_timeout
|
||||
.. automethod:: with_cookies
|
||||
.. automethod:: with_headers
|
||||
.. automethod:: with_timeout
|
@ -1,17 +0,0 @@
|
||||
ClientFromEnv
|
||||
=============
|
||||
|
||||
.. currentmodule:: kittycad
|
||||
|
||||
.. autoclass:: ClientFromEnv
|
||||
:show-inheritance:
|
||||
|
||||
.. rubric:: Methods Summary
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~ClientFromEnv.get_headers
|
||||
|
||||
.. rubric:: Methods Documentation
|
||||
|
||||
.. automethod:: get_headers
|
129
docs/conf.py
129
docs/conf.py
@ -4,36 +4,39 @@
|
||||
# list see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
import datetime
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
import toml
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
# Get the version from the pyproject file.
|
||||
|
||||
ROOT = pathlib.Path(__file__).parent.parent
|
||||
PACKAGE_SRC = ROOT / "kittycad"
|
||||
|
||||
sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(os.path.abspath('../kittycad'))
|
||||
|
||||
sys.path.append(os.path.abspath("../kittycad"))
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'kittycad'
|
||||
author = 'KittyCAD Team Members'
|
||||
copyright = author
|
||||
project = "kittycad"
|
||||
author = "KittyCAD Team Members"
|
||||
year = datetime.date.today().year
|
||||
copyright = str(year) + ", " + author
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
# Get the version from the poetry file.
|
||||
import toml
|
||||
|
||||
with open(os.path.abspath('../pyproject.toml'), 'r') as f:
|
||||
with open(os.path.abspath("../pyproject.toml"), "r") as f:
|
||||
parsed_toml = toml.load(f)
|
||||
version = parsed_toml['tool']['poetry']['version']
|
||||
version = 'v'+version
|
||||
version = parsed_toml["tool"]["poetry"]["version"]
|
||||
version = "v" + version
|
||||
|
||||
|
||||
release = version
|
||||
language = "en"
|
||||
default_role = "any"
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
@ -42,25 +45,34 @@ release = version
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx_autodoc_typehints',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.linkcode',
|
||||
'sphinx_automodapi.automodapi',
|
||||
'sphinx_rtd_theme'
|
||||
"autoclasstoc",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinx.ext.autosectionlabel",
|
||||
"sphinx.ext.autosummary",
|
||||
"sphinx.ext.coverage",
|
||||
"sphinx.ext.doctest",
|
||||
"sphinx.ext.graphviz",
|
||||
"sphinx.ext.imgconverter",
|
||||
"sphinx.ext.intersphinx",
|
||||
"sphinx.ext.linkcode",
|
||||
"sphinx.ext.mathjax",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.viewcode",
|
||||
"sphinx_autodoc_typehints",
|
||||
"sphinx_rtd_theme",
|
||||
"sphinx_copybutton",
|
||||
"sphinxext.opengraph",
|
||||
]
|
||||
|
||||
numpydoc_show_class_members = False
|
||||
|
||||
automodapi_inheritance_diagram = False
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
@ -68,35 +80,62 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = [
|
||||
]
|
||||
html_theme_path: List[str] = []
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = []
|
||||
html_static_path: List[str] = []
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'trac'
|
||||
pygments_style = "trac"
|
||||
|
||||
# Intersphinx configuration.
|
||||
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#module-sphinx.ext.intersphinx
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://python.readthedocs.io/en/latest/', None),
|
||||
# pygments_style = "lovelace"
|
||||
# pygments_dark_style = "one-dark"
|
||||
|
||||
# -- autodoc --
|
||||
|
||||
autodoc_default_options = {
|
||||
"members": True,
|
||||
"special-members": True,
|
||||
"private-members": True,
|
||||
"inherited-members": True,
|
||||
"undoc-members": True,
|
||||
"exclude-members": "__weakref__",
|
||||
}
|
||||
|
||||
autodoc_inherit_docstrings = True
|
||||
|
||||
# -- autosummary --
|
||||
|
||||
autosummary_generate = True
|
||||
autoclass_content = "both"
|
||||
html_show_sourcelink = False
|
||||
set_type_checking_flag = True
|
||||
|
||||
# -- autosectionlabel --
|
||||
|
||||
autosectionlabel_prefix_document = True
|
||||
|
||||
# -- intersphinx --
|
||||
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
}
|
||||
|
||||
|
||||
# This is a function linkcode_resolve(domain, info), which should return the URL
|
||||
# to source code corresponding to the object in given domain with given information.
|
||||
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
|
||||
def linkcode_resolve(domain, info):
|
||||
if domain != 'py':
|
||||
if domain != "py":
|
||||
return None
|
||||
if not info['module']:
|
||||
if not info["module"]:
|
||||
return None
|
||||
filename = info['module'].replace('.', '/')
|
||||
filename = info["module"].replace(".", "/")
|
||||
return "https://github.com/kittycad/kittycad.py/%s.py" % filename
|
||||
|
||||
|
||||
@ -104,10 +143,10 @@ def linkcode_resolve(domain, info):
|
||||
try:
|
||||
import enchant # noqa # pylint: disable=unused-import
|
||||
except ImportError as ex:
|
||||
print("enchant module import failed:\n"
|
||||
"{0}\n"
|
||||
"Spell checking disabled.".format(ex),
|
||||
file=sys.stderr)
|
||||
print(
|
||||
"enchant module import failed:\n" "{0}\n" "Spell checking disabled.".format(ex),
|
||||
file=sys.stderr,
|
||||
)
|
||||
else:
|
||||
extensions.append('sphinxcontrib.spelling')
|
||||
extensions.append("sphinxcontrib.spelling")
|
||||
spelling_show_suggestions = True
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 801b3277a7f682f8d93df02ea3878661
|
||||
config: 60d57bb036d3b59c436bbb934bec9a4c
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/_autosummary/kittycad.api.ai.doctree
Normal file
BIN
docs/html/.doctrees/_autosummary/kittycad.api.ai.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/_autosummary/kittycad.api.api_calls.doctree
Normal file
BIN
docs/html/.doctrees/_autosummary/kittycad.api.api_calls.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user