Skip to content

Commit 5e9da70

Browse files
Tyler Romerobrandon-wadapaulina-positronix
authored
Documenation Improvements and Updates (#279)
# Changes (selected) 1. Update documentation to reflect that we support Python 3.9+ 2. Document usage of `ask_ml` and `ask_confident` 3. Reorganize site to improve consistency and flow (most significantly, docs for *developing* applications are separate from docs detailing *sample* applications) 4. Document use of `framegrab` and tuning of motion detection 5. Document `Alerts`, update documentation for the `edge-endpoint` and `groundlight/stream` --------- Co-authored-by: Brandon <132288221+brandon-groundlight@users.noreply.github.com> Co-authored-by: Paulina Varshavskaya <88207457+paulina-positronix@users.noreply.github.com>
1 parent c8f9a8b commit 5e9da70

Some content is hidden

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

60 files changed

+15435
-10256
lines changed

.github/workflows/cicd.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
push:
77

88
env:
9-
PYTHON_VERSION: "3.10"
9+
PYTHON_VERSION: "3.11"
1010
POETRY_VERSION: "1.7.1"
1111
jobs:
1212
# Run our linter on every push to the repository.
@@ -65,7 +65,7 @@ jobs:
6565
# This is associated with the "sdk-test-prod" user, credentials on 1password
6666
GROUNDLIGHT_API_TOKEN: ${{ secrets.GROUNDLIGHT_API_TOKEN_PROD }}
6767

68-
# Check that the docs build. (No broken links, etc.)
68+
# Check that the docs build. (No broken links, etc.)
6969
test-docs:
7070
runs-on: ubuntu-latest
7171
defaults:
@@ -77,14 +77,14 @@ jobs:
7777
- name: Setup npm
7878
uses: actions/setup-node@v3
7979
with:
80-
node-version: 18
80+
node-version: 21
8181
cache: npm
8282
- name: Install dependencies
8383
run: npm install
8484
- name: Build website
8585
run: npm run build
8686

87-
# Checks that the API reference docs built with shpinx build
87+
# Checks that the API reference docs built with sphinx build
8888
test-api-reference-docs:
8989
runs-on: ubuntu-latest
9090
steps:
@@ -94,14 +94,17 @@ jobs:
9494
uses: actions/setup-python@v4
9595
with:
9696
python-version: ${{ env.PYTHON_VERSION }}
97-
- name: install poetry
97+
- name: Install poetry
9898
uses: snok/install-poetry@v1
9999
with:
100100
version: ${{ env.POETRY_VERSION }}
101-
101+
- name: Setup npm
102+
uses: actions/setup-node@v3
103+
with:
104+
node-version: 21
105+
cache: npm
102106
- name: Install dependencies
103107
run: make install-sphinx-deps
104-
105108
- name: Build API documentation
106109
run: |
107110
make apidocs
@@ -135,6 +138,7 @@ jobs:
135138
"3.10",
136139
"3.11",
137140
"3.12",
141+
"3.13",
138142
]
139143
install_extras: [true, false]
140144
steps:
@@ -257,7 +261,7 @@ jobs:
257261
- name: Setup npm
258262
uses: actions/setup-node@v3
259263
with:
260-
node-version: 18
264+
node-version: 21
261265
cache: npm
262266
- name: Install dependencies
263267
run: npm install
@@ -292,8 +296,7 @@ jobs:
292296
runs-on: ubuntu-latest
293297
needs:
294298
- test-comprehensive
295-
# For now, we'll require the comprehensive tests to succeed, but not the linter checks.
296-
# - lint
299+
- lint
297300
env:
298301
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PUBLISH_TOKEN }}
299302
steps:

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ persistent=yes
4646

4747
# Min Python version to use for version dependend checks. Will default to the
4848
# version used to run pylint.
49-
py-version=3.8
49+
py-version=3.9
5050

5151
# When enabled, pylint would attempt to guess common misconfiguration and emit
5252
# user-friendly hints instead of false-positive error messages.

DEVELOPING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ you can install the package dependencies by running:
1414
make install
1515
```
1616

17-
Note: We support Python 3.8+ for clients of the SDK, but we recommend developing with Python 3.10+.
17+
Note: We support Python 3.9+ for clients of the SDK, but we recommend developing with Python 3.10+.
1818

1919
### Run tests
2020

Makefile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
.PHONY: apidocs docs-comprehensive generate html install install-dev install-extras install-generator install-lint install-pre-commit test test-4edge test-integ test-local
1+
.PHONY: apidocs docs-comprehensive generate html install install-dev install-extras install-generator install-lint install-pre-commit test test-4edge test-integ test-local help
2+
3+
help: ## Print all targets with their descriptions
4+
@grep -E '^[a-zA-Z_-]+:.*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {if (NF == 1) {printf "\033[36m%-30s\033[0m %s\n", $$1, ""} else {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}}'
5+
26

37
install: ## Install the package from source
48
poetry install
@@ -16,7 +20,7 @@ install-pre-commit: install ## Install pre-commit hooks
1620
poetry run pre-commit install
1721

1822
install-generator: install ## Install dependencies for SDK code generator
19-
npm install --save remark-math@6 rehype-katex@7
23+
npm install
2024

2125
generate: install-generator ## Generate the SDK from our public openapi spec
2226
node_modules/.bin/openapi-generator-cli generate -i spec/public-api.yaml \
@@ -73,7 +77,7 @@ format: install-lint ## Run standard python formatting
7377
./code-quality/format ${LINT_PATHS}
7478

7579

76-
# Targets for sphinx documentation
80+
# Targets for building code.groundlight.ai and API reference documentation
7781

7882
install-sphinx-deps: ## Only install the sphinx dependencies
7983
poetry install --no-root --only sphinx-deps
@@ -86,30 +90,26 @@ SPHINXBUILD ?= sphinx-build
8690
SOURCEDIR = sphinx_docs
8791
BUILDDIR = build
8892

89-
sphinx-help:
93+
sphinx-help: ## Print help for Sphinx build options (Sphinx is used to build our API reference documentation)
9094
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
9195

92-
93-
# Start an interactive server to test docs locally.
94-
# Before running this, make sure that you have installed the node modules
95-
# by running `node install` in the docs directory.
96-
develop-docs-comprehensive: docs-comprehensive
96+
## Before running this, make sure that you have installed the node modules
97+
## by running `node install` in the docs directory.
98+
develop-docs-comprehensive: docs-comprehensive ## Start an interactive server to test docs locally.
9799
cd docs && npm start
98100

99-
## Builds docs comprehensively (integrating API reference docs built
100-
## with sphinx into the docusaurus docs).
101-
docs-comprehensive: apidocs
101+
docs-comprehensive: apidocs ## Builds docs comprehensively (integrating API reference docs built with sphinx into the docusaurus docs).
102102
rm -rf docs/static/api-reference-docs
103103
rm -rf docs/build/api-reference-docs
104104
mkdir docs/static/api-reference-docs
105105
mv build/html/* docs/static/api-reference-docs/
106106

107107
cd docs && npm run build
108108

109-
apidocs:
110-
cd docs && npm install --save remark-math@6 rehype-katex@7
109+
apidocs: ## Installs necessary npm packages and builds API reference documentation using Sphinx.
110+
cd docs && npm install
111111
poetry run make html
112112

113-
html:
113+
html: ## Builds HTML reference documentation using Sphinx.
114114
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(0)
115115
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"label": "API Reference",
3-
"position": 5,
3+
"position": 6,
44
"collapsed": false
55
}

docs/docs/building-applications/1-sample-applications.md

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

docs/docs/building-applications/3-working-with-detectors.md

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

docs/docs/building-applications/4-managing-confidence.md

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

0 commit comments

Comments
 (0)