Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenation Improvements and Updates #279

Merged
merged 28 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8ab5c06
Documenation Improvements
tyler-romero Nov 30, 2024
018ba33
Lots more cleanup and updates
tyler-romero Nov 30, 2024
f14b083
renumber
tyler-romero Nov 30, 2024
194a64c
Restore index
tyler-romero Nov 30, 2024
ab2a3c7
link fix
tyler-romero Nov 30, 2024
f3eff02
Rework nav bar, default dark mode
tyler-romero Dec 1, 2024
a09e1fd
slight improvements
tyler-romero Dec 2, 2024
d7a58b1
my nits while reviewing (#280)
brandon-groundlight Dec 2, 2024
5ce6cac
relocate the quick answers advice
tyler-romero Dec 2, 2024
2f88019
revert one python3.9 change
tyler-romero Dec 2, 2024
75763a1
Quick fixes
tyler-romero Dec 2, 2024
80bba2c
add no-test
tyler-romero Dec 2, 2024
ca1aea9
Rework sdk documentation
tyler-romero Dec 3, 2024
ac851fc
Brush up experimental_api documentation
tyler-romero Dec 3, 2024
7412a6e
more sdk docs
tyler-romero Dec 3, 2024
9e0d5a3
small fixes
tyler-romero Dec 3, 2024
2a6d566
Autoupdate copyright
tyler-romero Dec 3, 2024
9a322c8
Fix lint errors
tyler-romero Dec 3, 2024
aaf2175
Another lint fix
tyler-romero Dec 3, 2024
b8a4d41
Update node
tyler-romero Dec 3, 2024
e8e1e41
update python version in old gitlab and travis files
tyler-romero Dec 3, 2024
241159b
npm update
tyler-romero Dec 3, 2024
6cf3481
explicitly set npm version
tyler-romero Dec 3, 2024
cd6d9f7
clean up npm install
tyler-romero Dec 3, 2024
9462e29
Maybe this will work
tyler-romero Dec 3, 2024
b029291
Update a bunch of things
tyler-romero Dec 3, 2024
09e726e
Update docs/docs/guide/5-managing-confidence.md
tyler-romero Dec 3, 2024
877c5bf
Address PR feedback
tyler-romero Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:

env:
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.7.1"
jobs:
# Run our linter on every push to the repository.
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
# This is associated with the "sdk-test-prod" user, credentials on 1password
GROUNDLIGHT_API_TOKEN: ${{ secrets.GROUNDLIGHT_API_TOKEN_PROD }}

# Check that the docs build. (No broken links, etc.)
# Check that the docs build. (No broken links, etc.)
test-docs:
runs-on: ubuntu-latest
defaults:
Expand All @@ -77,14 +77,14 @@ jobs:
- name: Setup npm
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 21
cache: npm
- name: Install dependencies
run: npm install
- name: Build website
run: npm run build

# Checks that the API reference docs built with shpinx build
# Checks that the API reference docs built with sphinx build
test-api-reference-docs:
runs-on: ubuntu-latest
steps:
Expand All @@ -94,14 +94,17 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: install poetry
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}

- name: Setup npm
uses: actions/setup-node@v3
with:
node-version: 21
cache: npm
- name: Install dependencies
run: make install-sphinx-deps

- name: Build API documentation
run: |
make apidocs
Expand Down Expand Up @@ -135,6 +138,7 @@ jobs:
"3.10",
"3.11",
"3.12",
"3.13",
]
install_extras: [true, false]
steps:
Expand Down Expand Up @@ -257,7 +261,7 @@ jobs:
- name: Setup npm
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 21
cache: npm
- name: Install dependencies
run: npm install
Expand Down Expand Up @@ -292,8 +296,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- test-comprehensive
# For now, we'll require the comprehensive tests to succeed, but not the linter checks.
# - lint
- lint
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_PUBLISH_TOKEN }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ persistent=yes

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

# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ you can install the package dependencies by running:
make install
```

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

### Run tests

Expand Down
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.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
.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

help: ## Print all targets with their descriptions
@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}}'


install: ## Install the package from source
poetry install
Expand All @@ -16,7 +20,7 @@ install-pre-commit: install ## Install pre-commit hooks
poetry run pre-commit install

install-generator: install ## Install dependencies for SDK code generator
npm install --save remark-math@6 rehype-katex@7
npm install

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


# Targets for sphinx documentation
# Targets for building code.groundlight.ai and API reference documentation

install-sphinx-deps: ## Only install the sphinx dependencies
poetry install --no-root --only sphinx-deps
Expand All @@ -86,30 +90,26 @@ SPHINXBUILD ?= sphinx-build
SOURCEDIR = sphinx_docs
BUILDDIR = build

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


# Start an interactive server to test docs locally.
# Before running this, make sure that you have installed the node modules
# by running `node install` in the docs directory.
develop-docs-comprehensive: docs-comprehensive
## Before running this, make sure that you have installed the node modules
## by running `node install` in the docs directory.
develop-docs-comprehensive: docs-comprehensive ## Start an interactive server to test docs locally.
cd docs && npm start

## Builds docs comprehensively (integrating API reference docs built
## with sphinx into the docusaurus docs).
docs-comprehensive: apidocs
docs-comprehensive: apidocs ## Builds docs comprehensively (integrating API reference docs built with sphinx into the docusaurus docs).
rm -rf docs/static/api-reference-docs
rm -rf docs/build/api-reference-docs
mkdir docs/static/api-reference-docs
mv build/html/* docs/static/api-reference-docs/

cd docs && npm run build

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

html:
html: ## Builds HTML reference documentation using Sphinx.
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(0)
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
2 changes: 1 addition & 1 deletion docs/docs/api-reference/_category_.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"label": "API Reference",
"position": 5,
"position": 6,
"collapsed": false
}
29 changes: 0 additions & 29 deletions docs/docs/building-applications/1-sample-applications.md

This file was deleted.

99 changes: 0 additions & 99 deletions docs/docs/building-applications/3-working-with-detectors.md

This file was deleted.

51 changes: 0 additions & 51 deletions docs/docs/building-applications/4-managing-confidence.md

This file was deleted.

Loading
Loading