Skip to content

Commit

Permalink
Merge branch 'main' into change_label_value_wire_format
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-groundlight committed Nov 14, 2024
2 parents 724856c + be6d1d3 commit 1e80fbf
Show file tree
Hide file tree
Showing 238 changed files with 15,367 additions and 5,390 deletions.
9 changes: 6 additions & 3 deletions .github/reviewer-lottery.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# The auto-assign bot will randomly select a reviewer from this list of usernames.
groups:
- name: dependabot-reviewers
reviewers: 1
usernames:
- mjvogelsong
- robotrapta
- tyler-romero
- sunildkumar
- tomfaulhaber
- roxanne-o
- blaise-muhirwa
- timmarkhuff
- brandon-groundlight
- tomfaulhaber
- f-wright
- CoreyEWood
- honeytung
22 changes: 21 additions & 1 deletion .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
matrix:
python-version: [
#"3.6", # Default on Ubuntu18.04 but openapi-generator fails
"3.7", # EOL but we're still supporting it for now.
# "3.7", # Removed support as of 0.17
"3.8",
"3.9",
"3.10",
Expand All @@ -140,6 +140,13 @@ jobs:
steps:
- name: get code
uses: actions/checkout@v4
# Pillow may need these to function
- name: install potential system dependencies
run: |
sudo apt-get update
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
libharfbuzz-dev libfribidi-dev libxcb1-dev
- name: install modern python for poetry
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -236,6 +243,13 @@ jobs:
steps:
- name: Get code
uses: actions/checkout@v4
# Pillow may need these to function
- name: install potential system dependencies
run: |
sudo apt-get update
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
libharfbuzz-dev libfribidi-dev libxcb1-dev
- name: Install poetry
uses: snok/install-poetry@v1
with:
Expand Down Expand Up @@ -285,6 +299,12 @@ jobs:
steps:
- name: get code
uses: actions/checkout@v4
- name: install potential system dependencies
run: |
sudo apt-get update
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
libharfbuzz-dev libfribidi-dev libxcb1-dev
- name: install python
uses: actions/setup-python@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
poetry.lock

# PyInstaller
# Usually these files are written by a python script from a template
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.7
py-version=3.8

# 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.7+ for clients of the SDK, but we recommend developing with Python 3.10+.
Note: We support Python 3.8+ for clients of the SDK, but we recommend developing with Python 3.10+.

### Run tests

Expand Down
26 changes: 16 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.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

install: ## Install the package from source
poetry install

Expand All @@ -21,7 +23,8 @@ generate: install-generator ## Generate the SDK from our public openapi spec
-g python \
-o ./generated \
--additional-properties=packageName=groundlight_openapi_client
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py
# strict-nullable makes nullable fields Optional in the generated Pydantic classes: https://github.com/koxudaxi/datamodel-code-generator/issues/327
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable --use-schema-description --output-model-type pydantic_v2.BaseModel --use-subclass-enum
poetry run black .

PYTEST=poetry run pytest -v
Expand All @@ -34,17 +37,25 @@ TEST_ARGS=
CLOUD_FILTERS = -m "not run_only_for_edge_endpoint"
EDGE_FILTERS = -m "not skip_for_edge_endpoint"

# Record information about the slowest 25 tests (but don't show anything slower than 0.1 seconds)
PROFILING_ARGS = \
--durations 25 \
--durations-min 0.1

test: install ## Run tests against the prod API (needs GROUNDLIGHT_API_TOKEN)
${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
${PYTEST} ${PROFILING_ARGS} ${TEST_ARGS} ${CLOUD_FILTERS} test

test-4edge: install ## Run tests against the prod API via the edge-endpoint (needs GROUNDLIGHT_API_TOKEN)
${PYTEST} ${TEST_ARGS} ${EDGE_FILTERS} test
${PYTEST} ${PROFILING_ARGS} ${TEST_ARGS} ${EDGE_FILTERS} test

test-local: install ## Run tests against a localhost API (needs GROUNDLIGHT_API_TOKEN and a local API server)
GROUNDLIGHT_ENDPOINT="http://localhost:8000/" ${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
GROUNDLIGHT_ENDPOINT="http://localhost:8000/" $(MAKE) test

test-integ: install ## Run tests against the integ API server (needs GROUNDLIGHT_API_TOKEN)
GROUNDLIGHT_ENDPOINT="https://api.integ.groundlight.ai/" ${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
GROUNDLIGHT_ENDPOINT="https://api.integ.groundlight.ai/" $(MAKE) test

test-dev: install ## Run tests against a dev API server (needs GROUNDLIGHT_API_TOKEN and properly configured dns-hostmap)
GROUNDLIGHT_ENDPOINT="https://api.dev.groundlight.ai/" $(MAKE) test

test-docs: install ## Run the example code and tests in our docs against the prod API (needs GROUNDLIGHT_API_TOKEN)
${PYTEST} --markdown-docs ${TEST_ARGS} docs README.md
Expand Down Expand Up @@ -79,11 +90,6 @@ sphinx-help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


# The .PHONY directive tells make that `apidocs` and `html` are labels for
# commands. `apidocs: html` allows us to generate docs by running
# `make apidocs` instead.
.PHONY: docs-comprehensive apidocs html

# 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.
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ print(f"The answer is {image_query.result}")

Your images are first analyzed by machine learning (ML) models which are automatically trained on your data. If those models have high enough confidence, that's your answer. But if the models are unsure, then the images are progressively escalated to more resource-intensive analysis methods up to real-time human review. So what you get is a computer vision system that starts working right away without even needing to first gather and label a dataset. At first it will operate with high latency, because people need to review the image queries. But over time, the ML systems will learn and improve so queries come back faster with higher confidence.

_Note: The SDK is currently in "beta" phase. Interfaces are subject to change in future versions. We will follow [semver](https://semver.org/) semantics for breaking changes._

## Learn more

Some more resources you might like:

- [Code Documentation](https://code.groundlight.ai/python-sdk/docs/getting-started)
- [Python SDK on PyPi](https://pypi.org/project/groundlight/) or [GitHub](https://github.com/groundlight/python-sdk)
- [Company](https://www.groundlight.ai/)
- [Login to Groundlight App](https://app.groundlight.ai/)
- [Login to the Groundlight Dashboard](https://dashboard.groundlight.ai/)
189 changes: 0 additions & 189 deletions docs/blog/2023-12-06-framegrab.md

This file was deleted.

Loading

0 comments on commit 1e80fbf

Please sign in to comment.