Compare commits
246 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
9bf4dead4f | |||
c727428359 | |||
055c3bdd8f | |||
55e0cbe58d | |||
851f986d32 | |||
61ddb1a6d8 | |||
63b0703ae8 | |||
c694322a52 | |||
0e24bc5311 | |||
42e76b4b83 | |||
774b8f079c | |||
ba8eeca234 | |||
c512fd7f8a | |||
4639d82900 | |||
39cfd257a8 | |||
82f3361603 | |||
e97a042552 | |||
65cb520fce | |||
d9067d3292 | |||
2ae59c5ca3 | |||
50313ec810 | |||
f262b62cb7 | |||
3237e02c10 | |||
374d5bd238 | |||
4933e0106c | |||
f825678307 | |||
be8df00e51 | |||
58192a56ff | |||
6103b11ab8 | |||
441db38ca2 | |||
61c79305dc | |||
73cb3ff917 | |||
7c4321306a | |||
49b8d2747a | |||
9dc390a64d | |||
929e7fe993 | |||
ada7da5eca | |||
829c9cb0fe | |||
4631ca24cb | |||
b9e1d6fda6 | |||
2efdf57ec3 | |||
7f7460d366 | |||
553db98e51 | |||
699532553b | |||
4acbbc84ce | |||
02dff4020c | |||
7375479cf2 | |||
24d6d17894 | |||
1e67d9d4bd | |||
53132b1fd8 | |||
a0146d9ea5 | |||
032f5b17d5 | |||
15ef98b356 | |||
dcd5015cae | |||
219a7f14c2 | |||
7f00e3aa25 | |||
85a22b9a2a | |||
a653ebbb66 | |||
d3dfc556e0 | |||
e96d50f4f0 | |||
16e30e893f | |||
d81e82cf9c | |||
7e536090ad | |||
429c341f84 | |||
5bcbf4251b | |||
f28df119ed | |||
9e96dffb3c | |||
be68a24e48 | |||
3e0545f4aa | |||
0f66979c90 | |||
16d7e95ce6 | |||
cb257a57d6 | |||
0ae59a5548 | |||
d9077a00ad | |||
a8d537e29c | |||
15d5bf50c1 | |||
17b517dd5a | |||
1408f075ee | |||
ed6b2c8e77 | |||
69c4f8ce70 | |||
216b454c14 | |||
0ed9aaf127 | |||
c1bc2a8f51 | |||
b7359511a4 | |||
26545d537f | |||
0ab0bd44a2 | |||
415f1d9619 | |||
31f5188454 | |||
363e9aea12 | |||
ca263dd395 | |||
1e2e9c0871 | |||
6db080ebc8 | |||
5247831f32 | |||
5e204bf872 | |||
9cbcebf665 | |||
fdc005a2f7 | |||
004daabdf9 | |||
a14fa0b099 | |||
020b19a3c2 | |||
d2ea7ddf66 | |||
6210725498 | |||
3531fd4197 | |||
1c94c0500c | |||
eae6825815 | |||
a11d9e9351 | |||
5d985a3e13 | |||
6b6de6ddf2 | |||
aa723677a3 | |||
3477374e44 | |||
f28d56915a | |||
cf3ab0f291 | |||
e53597609c | |||
3d8c49afe3 | |||
669b7aded0 | |||
0ceebbee9c | |||
ab01c82bb7 | |||
65e95eae3d | |||
5fcd6d048e | |||
89a450f697 | |||
653d2b21ee | |||
cbf5f4df6d | |||
2d90bb61be | |||
9c18ba2350 | |||
0b9c32e6bf | |||
b09684bd9e | |||
45ac31914d | |||
2a9ae9dc8d | |||
5b77fbdbd0 | |||
e0f88cf27a | |||
29b0d3b5d0 | |||
6c05eabb2c | |||
be59e657b9 | |||
bf83d1f1ba | |||
a99251b3b7 | |||
32479cfe2a | |||
2a3cec9aac | |||
e7aaaab78d | |||
f835e905a9 | |||
637df816fd | |||
cef71917e8 | |||
c865f88379 | |||
7dbafade7a | |||
3f9366e0c9 | |||
f69db1296b | |||
587ba78ada | |||
41127aa9d3 | |||
4bb7008d5d | |||
d8a9721d18 | |||
5d237a4eda | |||
30999f1cd3 | |||
fc6ea7af77 | |||
0d0afa4497 | |||
a4d57836f5 | |||
e9c5722b1d | |||
803c016174 | |||
2a5c28f9a9 | |||
5afd7562d4 | |||
afcc5b88c1 | |||
bd072b07a3 | |||
324e803f0e | |||
a757aaa633 | |||
37b2635a01 | |||
ab06822559 | |||
9678dabcb6 | |||
5a024a1949 | |||
00a7f93a94 | |||
9d3cf53570 | |||
ccc30676ef | |||
5c01da0271 | |||
a4cf10655f | |||
900d90fdb4 | |||
2ca2b5f87b | |||
12c5b1ba49 | |||
134c904d90 | |||
059dc0e521 | |||
dfa76e9462 | |||
abf4ce8e52 | |||
2761fc47f6 | |||
f3d080d971 | |||
00b5cd9288 | |||
5954a57a5d | |||
d40e7832a2 | |||
eb33fd8c9c | |||
5e7fe2f663 | |||
a4a74c780a | |||
2235d10966 | |||
cba4690d88 | |||
ce8338cc3e | |||
800ce9ccdf | |||
2895434602 | |||
c3cd16858a | |||
b0c71ad0f5 | |||
7c964a3d05 | |||
10b2aa4f2a | |||
ae1353ef82 | |||
613864cf42 | |||
3ee3ae9a6c |
15
.github/dependabot.yml
vendored
Normal file
15
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "pip" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
- package-ecosystem: "github-actions" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
36
.github/workflows/build-test.yml
vendored
36
.github/workflows/build-test.yml
vendored
@ -5,22 +5,26 @@ on:
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/build-test.yml
|
||||
- 'pyproject.toml'
|
||||
- 'spec.json'
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.py'
|
||||
- .github/workflows/build-test.yml
|
||||
- 'pyproject.toml'
|
||||
- 'spec.json'
|
||||
jobs:
|
||||
build-test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
python-version: [3.7, 3.8, 3.9]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
@ -29,21 +33,35 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
pip install \
|
||||
flake8 \
|
||||
poetry \
|
||||
pytest
|
||||
poetry
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
cd kittycad
|
||||
poetry install
|
||||
poetry build
|
||||
|
||||
- name: Lint with flake8
|
||||
shell: bash
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
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
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
#poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
|
||||
- name: Run pytest
|
||||
shell: bash
|
||||
run: |
|
||||
poetry run pytest --cov=./ --cov-report=xml kittycad
|
||||
env:
|
||||
KITTYCAD_API_TOKEN: ${{secrets.KITTYCAD_API_TOKEN}}
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: true
|
||||
flags: unittests
|
||||
files: ${{ github.workspace }}/coverage.xml
|
||||
verbose: true
|
||||
|
||||
|
62
.github/workflows/generate-docs.yml
vendored
Normal file
62
.github/workflows/generate-docs.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: generate docs
|
||||
permissions:
|
||||
contents: write
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
paths:
|
||||
- docs/conf.py
|
||||
- '**.rst'
|
||||
- '**.py'
|
||||
- .github/workflows/generate-docs.yml
|
||||
jobs:
|
||||
generate-docs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
# Installation instructions are from: https://python-poetry.org/docs/
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update && sudo apt install -y \
|
||||
enchant-2 \
|
||||
--no-install-recommends
|
||||
pip install \
|
||||
poetry
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
poetry build
|
||||
|
||||
- name: Generate the docs
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf docs/html
|
||||
poetry install
|
||||
poetry run sphinx-build -b html docs/ docs/html/
|
||||
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$(if git diff-index --ignore-submodules --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||
|
||||
- name: Commit changes, if any
|
||||
if: steps.git-check.outputs.modified == 'true'
|
||||
run: |
|
||||
git add .
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||
git commit -am "I HAVE GENERATED YOUR NEW DOCS!" || true
|
||||
git fetch origin
|
||||
git rebase origin/${{github.ref_name }} || true
|
||||
git push origin ${{github.ref_name }}
|
||||
|
||||
|
5
.github/workflows/generate.yml
vendored
5
.github/workflows/generate.yml
vendored
@ -6,6 +6,8 @@ on:
|
||||
paths:
|
||||
- 'Makefile'
|
||||
- .github/workflows/generate.yml
|
||||
- 'spec.json'
|
||||
- 'generate/generate.py'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
jobs:
|
||||
@ -14,7 +16,7 @@ jobs:
|
||||
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
- name: Run generate
|
||||
@ -33,5 +35,6 @@ jobs:
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
|
||||
git fetch origin
|
||||
git add .
|
||||
git commit -am "I have generated the latest API!" || true
|
||||
git push origin ${{github.event.pull_request.head.ref }} || true
|
||||
|
5
.github/workflows/make-release.yml
vendored
5
.github/workflows/make-release.yml
vendored
@ -8,8 +8,8 @@ jobs:
|
||||
name: make-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
# Installation instructions are from: https://python-poetry.org/docs/
|
||||
@ -21,7 +21,6 @@ jobs:
|
||||
- name: Do the release
|
||||
shell: bash
|
||||
run: |
|
||||
cd kittycad
|
||||
poetry publish --build \
|
||||
--username ${{secrets.PYPI_USERNAME}} \
|
||||
--password ${{secrets.PYPI_SECRET}}
|
||||
|
65
.github/workflows/update-spec-for-docs.yml
vendored
Normal file
65
.github/workflows/update-spec-for-docs.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/update-spec-for-docs.yml
|
||||
workflow_dispatch:
|
||||
name: update spec for docs
|
||||
concurrency:
|
||||
group: docs-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
update-spec:
|
||||
name: update-spec
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: make generate
|
||||
shell: bash
|
||||
run: |
|
||||
make generate
|
||||
# Ensure no files changed.
|
||||
- name: Ensure no files changed
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ `git status --porcelain kittycad/` ]]; then
|
||||
echo "Files changed, exiting";
|
||||
exit 1;
|
||||
else
|
||||
# No changes
|
||||
echo "No files changed, proceeding";
|
||||
fi
|
||||
# Checkout the docs repo since we will want to update the files there.
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'kittycad/website'
|
||||
path: 'docs'
|
||||
token: ${{secrets.PAT_GITHUB}}
|
||||
- name: move spec to docs
|
||||
shell: bash
|
||||
run: |
|
||||
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: |
|
||||
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 PYTHON DOCS!" || exit 0
|
||||
git fetch origin
|
||||
git rebase origin/main || exit 0
|
||||
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 python" \
|
||||
--body "Updating the generated docs for python" \
|
||||
--head "$NEW_BRANCH" \
|
||||
--base main || true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.PAT_GITHUB}}
|
||||
|
||||
|
5
kittycad/.gitignore → .gitignore
vendored
5
kittycad/.gitignore → .gitignore
vendored
@ -20,4 +20,7 @@ dmypy.json
|
||||
.idea/
|
||||
|
||||
/coverage.xml
|
||||
/.coverage
|
||||
/.coverage
|
||||
|
||||
poetry.lock
|
||||
testing
|
10
Dockerfile
10
Dockerfile
@ -1,7 +1,13 @@
|
||||
FROM python:latest
|
||||
FROM python:3.9
|
||||
|
||||
RUN pip install \
|
||||
openapi-python-client
|
||||
poetry
|
||||
|
||||
WORKDIR /usr/src/
|
||||
|
||||
COPY . /usr/src/
|
||||
|
||||
RUN poetry update && poetry install
|
||||
|
||||
# Set the default command to bash.
|
||||
CMD ["bash"]
|
||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 KittyCAD
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
20
Makefile
20
Makefile
@ -7,17 +7,27 @@ endif
|
||||
|
||||
# For this to work, you need to install toml-cli: https://github.com/gnprice/toml-cli
|
||||
# `cargo install toml-cli`
|
||||
VERSION := $(shell toml get $(CURDIR)/kittycad/pyproject.toml tool.poetry.version | jq -r .)
|
||||
VERSION := $(shell toml get $(CURDIR)/pyproject.toml tool.poetry.version | jq -r .)
|
||||
|
||||
.PHONY: generate
|
||||
generate: docker-image
|
||||
generate: docker-image ## Generate the api client.
|
||||
docker run --rm -i $(DOCKER_FLAGS) \
|
||||
--name python-generator \
|
||||
--disable-content-trust \
|
||||
-v $(CURDIR):/usr/src \
|
||||
--workdir /usr/src \
|
||||
$(DOCKER_IMAGE_NAME) openapi-python-client update \
|
||||
--url https://api.kittycad.io \
|
||||
--config /usr/src/config.yml
|
||||
$(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 \
|
||||
$(DOCKER_IMAGE_NAME) /bin/bash
|
||||
|
||||
|
||||
.PHONY: docker-image
|
||||
docker-image:
|
||||
|
@ -2,10 +2,8 @@
|
||||
|
||||
The Python API client for KittyCAD.
|
||||
|
||||
This is generated from
|
||||
[openapi-generators/openapi-python-client](https://github.com/openapi-generators/openapi-python-client).
|
||||
|
||||
- [PyPI](https://pypi.org/project/kittycad/)
|
||||
- [Python docs](https://python.api.docs.kittycad.io/)
|
||||
- [KittyCAD API Docs](https://docs.kittycad.io/?lang=python)
|
||||
|
||||
## Generating
|
||||
|
1942
assets/testing.obj
Normal file
1942
assets/testing.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
assets/testing.stl
Normal file
BIN
assets/testing.stl
Normal file
Binary file not shown.
@ -1,2 +0,0 @@
|
||||
project_name_override: kittycad
|
||||
package_name_override: kittycad
|
27
docs/api/kittycad.Client.rst
Normal file
27
docs/api/kittycad.Client.rst
Normal file
@ -0,0 +1,27 @@
|
||||
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
|
17
docs/api/kittycad.ClientFromEnv.rst
Normal file
17
docs/api/kittycad.ClientFromEnv.rst
Normal file
@ -0,0 +1,17 @@
|
||||
ClientFromEnv
|
||||
=============
|
||||
|
||||
.. currentmodule:: kittycad
|
||||
|
||||
.. autoclass:: ClientFromEnv
|
||||
:show-inheritance:
|
||||
|
||||
.. rubric:: Methods Summary
|
||||
|
||||
.. autosummary::
|
||||
|
||||
~ClientFromEnv.get_headers
|
||||
|
||||
.. rubric:: Methods Documentation
|
||||
|
||||
.. automethod:: get_headers
|
113
docs/conf.py
Normal file
113
docs/conf.py
Normal file
@ -0,0 +1,113 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# This file only contains a selection of the most common options. For a full
|
||||
# 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 os
|
||||
import sys
|
||||
|
||||
|
||||
sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
|
||||
sys.path.append(os.path.abspath('../kittycad'))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'kittycad'
|
||||
author = 'KittyCAD Team Members'
|
||||
copyright = 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:
|
||||
parsed_toml = toml.load(f)
|
||||
version = parsed_toml['tool']['poetry']['version']
|
||||
version = 'v'+version
|
||||
|
||||
release = version
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# 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'
|
||||
]
|
||||
|
||||
numpydoc_show_class_members = False
|
||||
|
||||
automodapi_inheritance_diagram = False
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
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']
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = [
|
||||
]
|
||||
|
||||
# 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 = []
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
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),
|
||||
}
|
||||
|
||||
# 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':
|
||||
return None
|
||||
if not info['module']:
|
||||
return None
|
||||
filename = info['module'].replace('.', '/')
|
||||
return "https://github.com/kittycad/kittycad.py/%s.py" % filename
|
||||
|
||||
|
||||
# Spell checker.
|
||||
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)
|
||||
else:
|
||||
extensions.append('sphinxcontrib.spelling')
|
||||
spelling_show_suggestions = True
|
4
docs/html/.buildinfo
Normal file
4
docs/html/.buildinfo
Normal file
@ -0,0 +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: 5195ef48a347bca86116b482d77effa9
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
BIN
docs/html/.doctrees/api/kittycad.Client.doctree
Normal file
BIN
docs/html/.doctrees/api/kittycad.Client.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/api/kittycad.ClientFromEnv.doctree
Normal file
BIN
docs/html/.doctrees/api/kittycad.ClientFromEnv.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/environment.pickle
Normal file
BIN
docs/html/.doctrees/environment.pickle
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/index.doctree
Normal file
BIN
docs/html/.doctrees/index.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.apps.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.apps.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.beta.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.beta.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.constant.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.constant.doctree
Normal file
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.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.
BIN
docs/html/.doctrees/modules/kittycad.api.file.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.file.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.
BIN
docs/html/.doctrees/modules/kittycad.api.hidden.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.hidden.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.hidden.login.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.hidden.login.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.hidden.logout.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.hidden.logout.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.internal.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.internal.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.meta.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.meta.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.meta.ping.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.meta.ping.doctree
Normal file
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.oauth2.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.oauth2.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.payments.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.payments.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.sessions.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.sessions.doctree
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
docs/html/.doctrees/modules/kittycad.api.unit.doctree
Normal file
BIN
docs/html/.doctrees/modules/kittycad.api.unit.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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user