Compare commits
178 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
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@v4
|
||||||
|
|
||||||
|
# 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
|
12
.github/workflows/build-test.yml
vendored
12
.github/workflows/build-test.yml
vendored
@ -19,10 +19,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.7, 3.8, 3.9]
|
python-version: [3.8, 3.9]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@ -41,14 +41,6 @@ jobs:
|
|||||||
poetry install
|
poetry install
|
||||||
poetry build
|
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
|
- name: Run pytest
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
2
.github/workflows/generate-docs.yml
vendored
2
.github/workflows/generate-docs.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
|
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 }}
|
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.ref }}
|
ref: ${{ github.event.pull_request.head.ref }}
|
||||||
- name: Run generate
|
- name: Run generate
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
make generate
|
make generate
|
||||||
|
env:
|
||||||
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
|
|
||||||
- name: Check for modified files
|
- name: Check for modified files
|
||||||
id: git-check
|
id: git-check
|
||||||
|
2
.github/workflows/make-release.yml
vendored
2
.github/workflows/make-release.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
|||||||
name: make-release
|
name: make-release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
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@v4
|
||||||
|
|
||||||
|
# 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@v4
|
||||||
|
|
||||||
|
# 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 --format=github .
|
23
.github/workflows/update-spec-for-docs.yml
vendored
23
.github/workflows/update-spec-for-docs.yml
vendored
@ -15,16 +15,18 @@ jobs:
|
|||||||
name: update-spec
|
name: update-spec
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: make generate
|
- name: make generate
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
make generate
|
make generate
|
||||||
|
env:
|
||||||
|
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||||
# Ensure no files changed.
|
# Ensure no files changed.
|
||||||
- name: Ensure no files changed
|
- name: Ensure no files changed
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ `git status --porcelain kittycad/` ]]; then
|
||||||
echo "Files changed, exiting";
|
echo "Files changed, exiting";
|
||||||
exit 1;
|
exit 1;
|
||||||
else
|
else
|
||||||
@ -32,32 +34,31 @@ jobs:
|
|||||||
echo "No files changed, proceeding";
|
echo "No files changed, proceeding";
|
||||||
fi
|
fi
|
||||||
# Checkout the docs repo since we will want to update the files there.
|
# Checkout the docs repo since we will want to update the files there.
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'kittycad/docs'
|
repository: 'kittycad/website'
|
||||||
path: 'docs'
|
path: 'docs'
|
||||||
token: ${{secrets.PAT_GITHUB}}
|
token: ${{secrets.PAT_GITHUB}}
|
||||||
- name: move spec to docs
|
- name: move spec to docs
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm docs/spec.json || true
|
rm docs/kittycad.py.patch.json || true
|
||||||
cp spec.json docs/spec.json
|
cp kittycad.py.patch.json docs/kittycad.py.patch.json
|
||||||
- name: commit the changes in the docs repo
|
- name: commit the changes in the docs repo
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
export VERSION=$(cat VERSION.txt);
|
|
||||||
cd docs
|
cd docs
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
git add .
|
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 fetch origin
|
||||||
git rebase origin/main || exit 0
|
git rebase origin/main || exit 0
|
||||||
export NEW_BRANCH="update-spec-${VERSION}"
|
export NEW_BRANCH="update-spec-python"
|
||||||
git checkout -b "$NEW_BRANCH"
|
git checkout -b "$NEW_BRANCH"
|
||||||
git push -f origin "$NEW_BRANCH"
|
git push -f origin "$NEW_BRANCH"
|
||||||
gh pr create --title "Update lang spec docs for ${VERSION}" \
|
gh pr create --title "Update lang spec docs for python" \
|
||||||
--body "Updating the generated docs for go lang" \
|
--body "Updating the generated docs for python" \
|
||||||
--head "$NEW_BRANCH" \
|
--head "$NEW_BRANCH" \
|
||||||
--base main || true
|
--base main || true
|
||||||
env:
|
env:
|
||||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -22,5 +22,9 @@ dmypy.json
|
|||||||
/coverage.xml
|
/coverage.xml
|
||||||
/.coverage
|
/.coverage
|
||||||
|
|
||||||
poetry.lock
|
|
||||||
testing
|
testing
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
docs/_autosummary/
|
||||||
|
docs/html/_sources/
|
||||||
|
@ -3,9 +3,9 @@ FROM python:3.9
|
|||||||
RUN pip install \
|
RUN pip install \
|
||||||
poetry
|
poetry
|
||||||
|
|
||||||
WORKDIR /usr/src/
|
WORKDIR /home/user/src/
|
||||||
|
|
||||||
COPY . /usr/src/
|
COPY . /home/user/src/
|
||||||
|
|
||||||
RUN poetry update && poetry install
|
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.
|
generate: docker-image ## Generate the api client.
|
||||||
docker run --rm -i $(DOCKER_FLAGS) \
|
docker run --rm -i $(DOCKER_FLAGS) \
|
||||||
--name python-generator \
|
--name python-generator \
|
||||||
|
-e KITTYCAD_API_TOKEN \
|
||||||
--disable-content-trust \
|
--disable-content-trust \
|
||||||
-v $(CURDIR):/usr/src \
|
-v $(CURDIR):/home/user/src \
|
||||||
--workdir /usr/src \
|
--workdir /home/user/src \
|
||||||
$(DOCKER_IMAGE_NAME) ./generate/run.sh
|
$(DOCKER_IMAGE_NAME) ./generate/run.sh
|
||||||
|
|
||||||
.PHONY: shell
|
.PHONY: shell
|
||||||
shell: docker-image ## Pop into a shell in the docker image.
|
shell: docker-image ## Pop into a shell in the docker image.
|
||||||
docker run --rm -i $(DOCKER_FLAGS) \
|
docker run --rm -i $(DOCKER_FLAGS) \
|
||||||
--name python-generator-shell \
|
--name python-generator-shell \
|
||||||
|
-e KITTYCAD_API_TOKEN \
|
||||||
--disable-content-trust \
|
--disable-content-trust \
|
||||||
-v $(CURDIR):/usr/src \
|
-v $(CURDIR):/home/user/src \
|
||||||
--workdir /usr/src \
|
--workdir /home/user/src \
|
||||||
$(DOCKER_IMAGE_NAME) /bin/bash
|
$(DOCKER_IMAGE_NAME) /bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|

|
||||||
|
|
||||||
# kittycad.py
|
# kittycad.py
|
||||||
|
|
||||||
The Python API client for KittyCAD.
|
The Python API client for KittyCAD.
|
||||||
|
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:
|
# list see the documentation:
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
|
||||||
# -- Path setup --------------------------------------------------------------
|
import datetime
|
||||||
|
|
||||||
# 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 os
|
import os
|
||||||
|
import pathlib
|
||||||
import sys
|
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.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 information -----------------------------------------------------
|
||||||
|
|
||||||
project = 'kittycad'
|
project = "kittycad"
|
||||||
author = 'KittyCAD Team Members'
|
author = "KittyCAD Team Members"
|
||||||
copyright = author
|
year = datetime.date.today().year
|
||||||
|
copyright = str(year) + ", " + author
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
with open(os.path.abspath("../pyproject.toml"), "r") as f:
|
||||||
# Get the version from the poetry file.
|
|
||||||
import toml
|
|
||||||
|
|
||||||
with open(os.path.abspath('../pyproject.toml'), 'r') as f:
|
|
||||||
parsed_toml = toml.load(f)
|
parsed_toml = toml.load(f)
|
||||||
version = parsed_toml['tool']['poetry']['version']
|
version = parsed_toml["tool"]["poetry"]["version"]
|
||||||
version = 'v'+version
|
version = "v" + version
|
||||||
|
|
||||||
|
|
||||||
release = version
|
release = version
|
||||||
|
language = "en"
|
||||||
|
default_role = "any"
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
@ -42,25 +45,34 @@ release = version
|
|||||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autodoc',
|
"autoclasstoc",
|
||||||
'sphinx_autodoc_typehints',
|
"sphinx.ext.autodoc",
|
||||||
'sphinx.ext.intersphinx',
|
"sphinx.ext.autosectionlabel",
|
||||||
'sphinx.ext.linkcode',
|
"sphinx.ext.autosummary",
|
||||||
'sphinx_automodapi.automodapi',
|
"sphinx.ext.coverage",
|
||||||
'sphinx_rtd_theme'
|
"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
|
numpydoc_show_class_members = False
|
||||||
|
|
||||||
automodapi_inheritance_diagram = False
|
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# 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
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
# This pattern also affects html_static_path and html_extra_path.
|
# 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 -------------------------------------------------
|
# -- 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
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# 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.
|
# 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,
|
# 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,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# 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.
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
pygments_style = 'trac'
|
pygments_style = "trac"
|
||||||
|
|
||||||
# Intersphinx configuration.
|
# pygments_style = "lovelace"
|
||||||
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#module-sphinx.ext.intersphinx
|
# pygments_dark_style = "one-dark"
|
||||||
intersphinx_mapping = {
|
|
||||||
'python': ('https://python.readthedocs.io/en/latest/', None),
|
# -- 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
|
# 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.
|
# 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
|
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
|
||||||
def linkcode_resolve(domain, info):
|
def linkcode_resolve(domain, info):
|
||||||
if domain != 'py':
|
if domain != "py":
|
||||||
return None
|
return None
|
||||||
if not info['module']:
|
if not info["module"]:
|
||||||
return None
|
return None
|
||||||
filename = info['module'].replace('.', '/')
|
filename = info["module"].replace(".", "/")
|
||||||
return "https://github.com/kittycad/kittycad.py/%s.py" % filename
|
return "https://github.com/kittycad/kittycad.py/%s.py" % filename
|
||||||
|
|
||||||
|
|
||||||
@ -104,10 +143,10 @@ def linkcode_resolve(domain, info):
|
|||||||
try:
|
try:
|
||||||
import enchant # noqa # pylint: disable=unused-import
|
import enchant # noqa # pylint: disable=unused-import
|
||||||
except ImportError as ex:
|
except ImportError as ex:
|
||||||
print("enchant module import failed:\n"
|
print(
|
||||||
"{0}\n"
|
"enchant module import failed:\n" "{0}\n" "Spell checking disabled.".format(ex),
|
||||||
"Spell checking disabled.".format(ex),
|
file=sys.stderr,
|
||||||
file=sys.stderr)
|
)
|
||||||
else:
|
else:
|
||||||
extensions.append('sphinxcontrib.spelling')
|
extensions.append("sphinxcontrib.spelling")
|
||||||
spelling_show_suggestions = True
|
spelling_show_suggestions = True
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Sphinx build info version 1
|
# 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.
|
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||||
config: 801b3277a7f682f8d93df02ea3878661
|
config: c495e8d8690101e5ddd92e67eb0d0059
|
||||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
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.
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.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/_autosummary/kittycad.api.api_tokens.doctree
Normal file
BIN
docs/html/.doctrees/_autosummary/kittycad.api.api_tokens.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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user