Skip to content

Commit 1e80fbf

Browse files
author
brandon
committed
Merge branch 'main' into change_label_value_wire_format
2 parents 724856c + be6d1d3 commit 1e80fbf

File tree

238 files changed

+15367
-5390
lines changed

Some content is hidden

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

238 files changed

+15367
-5390
lines changed

.github/reviewer-lottery.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
# The auto-assign bot will randomly select a reviewer from this list of usernames.
12
groups:
23
- name: dependabot-reviewers
34
reviewers: 1
45
usernames:
5-
- mjvogelsong
66
- robotrapta
77
- tyler-romero
88
- sunildkumar
9+
- tomfaulhaber
910
- roxanne-o
10-
- blaise-muhirwa
11+
- timmarkhuff
1112
- brandon-groundlight
12-
- tomfaulhaber
13+
- f-wright
14+
- CoreyEWood
15+
- honeytung

.github/workflows/cicd.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ jobs:
129129
matrix:
130130
python-version: [
131131
#"3.6", # Default on Ubuntu18.04 but openapi-generator fails
132-
"3.7", # EOL but we're still supporting it for now.
132+
# "3.7", # Removed support as of 0.17
133133
"3.8",
134134
"3.9",
135135
"3.10",
@@ -140,6 +140,13 @@ jobs:
140140
steps:
141141
- name: get code
142142
uses: actions/checkout@v4
143+
# Pillow may need these to function
144+
- name: install potential system dependencies
145+
run: |
146+
sudo apt-get update
147+
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
148+
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
149+
libharfbuzz-dev libfribidi-dev libxcb1-dev
143150
- name: install modern python for poetry
144151
uses: actions/setup-python@v4
145152
with:
@@ -236,6 +243,13 @@ jobs:
236243
steps:
237244
- name: Get code
238245
uses: actions/checkout@v4
246+
# Pillow may need these to function
247+
- name: install potential system dependencies
248+
run: |
249+
sudo apt-get update
250+
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
251+
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
252+
libharfbuzz-dev libfribidi-dev libxcb1-dev
239253
- name: Install poetry
240254
uses: snok/install-poetry@v1
241255
with:
@@ -285,6 +299,12 @@ jobs:
285299
steps:
286300
- name: get code
287301
uses: actions/checkout@v4
302+
- name: install potential system dependencies
303+
run: |
304+
sudo apt-get update
305+
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
306+
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
307+
libharfbuzz-dev libfribidi-dev libxcb1-dev
288308
- name: install python
289309
uses: actions/setup-python@v4
290310
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ share/python-wheels/
2525
.installed.cfg
2626
*.egg
2727
MANIFEST
28+
poetry.lock
2829

2930
# PyInstaller
3031
# Usually these files are written by a python script from a template

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

1919
### Run tests
2020

Makefile

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
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
2+
13
install: ## Install the package from source
24
poetry install
35

@@ -21,7 +23,8 @@ generate: install-generator ## Generate the SDK from our public openapi spec
2123
-g python \
2224
-o ./generated \
2325
--additional-properties=packageName=groundlight_openapi_client
24-
poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py
26+
# strict-nullable makes nullable fields Optional in the generated Pydantic classes: https://github.com/koxudaxi/datamodel-code-generator/issues/327
27+
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
2528
poetry run black .
2629

2730
PYTEST=poetry run pytest -v
@@ -34,17 +37,25 @@ TEST_ARGS=
3437
CLOUD_FILTERS = -m "not run_only_for_edge_endpoint"
3538
EDGE_FILTERS = -m "not skip_for_edge_endpoint"
3639

40+
# Record information about the slowest 25 tests (but don't show anything slower than 0.1 seconds)
41+
PROFILING_ARGS = \
42+
--durations 25 \
43+
--durations-min 0.1
44+
3745
test: install ## Run tests against the prod API (needs GROUNDLIGHT_API_TOKEN)
38-
${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
46+
${PYTEST} ${PROFILING_ARGS} ${TEST_ARGS} ${CLOUD_FILTERS} test
3947

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

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

4654
test-integ: install ## Run tests against the integ API server (needs GROUNDLIGHT_API_TOKEN)
47-
GROUNDLIGHT_ENDPOINT="https://api.integ.groundlight.ai/" ${PYTEST} ${TEST_ARGS} ${CLOUD_FILTERS} test
55+
GROUNDLIGHT_ENDPOINT="https://api.integ.groundlight.ai/" $(MAKE) test
56+
57+
test-dev: install ## Run tests against a dev API server (needs GROUNDLIGHT_API_TOKEN and properly configured dns-hostmap)
58+
GROUNDLIGHT_ENDPOINT="https://api.dev.groundlight.ai/" $(MAKE) test
4859

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

8192

82-
# The .PHONY directive tells make that `apidocs` and `html` are labels for
83-
# commands. `apidocs: html` allows us to generate docs by running
84-
# `make apidocs` instead.
85-
.PHONY: docs-comprehensive apidocs html
86-
8793
# Start an interactive server to test docs locally.
8894
# Before running this, make sure that you have installed the node modules
8995
# by running `node install` in the docs directory.

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ print(f"The answer is {image_query.result}")
2424

2525
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.
2626

27-
_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._
28-
2927
## Learn more
3028

3129
Some more resources you might like:
3230

3331
- [Code Documentation](https://code.groundlight.ai/python-sdk/docs/getting-started)
3432
- [Python SDK on PyPi](https://pypi.org/project/groundlight/) or [GitHub](https://github.com/groundlight/python-sdk)
3533
- [Company](https://www.groundlight.ai/)
36-
- [Login to Groundlight App](https://app.groundlight.ai/)
34+
- [Login to the Groundlight Dashboard](https://dashboard.groundlight.ai/)

docs/blog/2023-12-06-framegrab.md

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

0 commit comments

Comments
 (0)