Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 15 additions & 15 deletions .github/labeler.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
tests:
- changed-files:
- any-glob-to-any-file: 'tests/*'
- any-glob-to-any-file: "tests/*"
- head-branch:
- 'test/*'
- 'tests/*'
- "test/*"
- "tests/*"

DevOps:
- changed-files:
- any-glob-to-any-file: '.github/*'
- any-glob-to-any-file: ".github/*"

CLI:
- changed-files:
- any-glob-to-any-file: '**/__main__.py'
- any-glob-to-any-file: "**/__main__.py"

documentation:
- changed-files:
- any-glob-to-any-file: '**/*.md'
- any-glob-to-any-file: "**/*.md"

enhancement:
- head-branch:
- 'feature/*'
- 'feat/*'
- 'enhancement/*'
- "feature/*"
- "feat/*"
- "enhancement/*"

fix:
- head-branch:
- 'fix/*'
- 'bug/*'
- 'hotfix/*'
- 'issue/*'
- 'bugfix/*'
- 'patch/*'
- "fix/*"
- "bug/*"
- "hotfix/*"
- "issue/*"
- "bugfix/*"
- "patch/*"
246 changes: 123 additions & 123 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'requirements.txt'
- 'pyproject.toml'
- 'luxonis_train/**'
- 'tests/**'
- .github/workflows/ci.yaml
- '!**/*.md'
- "requirements.txt"
- "pyproject.toml"
- "luxonis_train/**"
- "tests/**"
- ".github/workflows/ci.yaml"
- "!**/*.md"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -24,16 +24,16 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Install pre-commit
run: python -m pip install 'pre-commit<4.0.0'
- name: Install pre-commit
run: python -m pip install 'pre-commit<4.0.0'

- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Run pre-commit
uses: pre-commit/action@v3.0.1

docs:
needs:
Expand All @@ -56,33 +56,33 @@ jobs:
- pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip

- name: Install dependencies
run: pip install -e .[dev]

- name: Install dev version of LuxonisML
if: startsWith(github.head_ref, 'release/') == false
run: |
pip uninstall luxonis-ml -y
pip install "luxonis-ml[data,tracker] @ git+https://github.com/luxonis/luxonis-ml.git@main"

- name: Pyright check
uses: jakebailey/pyright-action@v2
with:
level: warning
warnings: true
python-version: '3.10'
project: pyproject.toml
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip

- name: Install dependencies
run: pip install -e .[dev]

- name: Install dev version of LuxonisML
if: startsWith(github.head_ref, 'release/') == false
run: |
pip uninstall luxonis-ml -y
pip install "luxonis-ml[data,tracker] @ git+https://github.com/luxonis/luxonis-ml.git@main"

- name: Pyright check
uses: jakebailey/pyright-action@v2
with:
level: warning
warnings: true
python-version: "3.10"
project: pyproject.toml

# Tests that the `luxonis-train.config.Config` works
# even when the dependencies of `luxonis-train` are
Expand All @@ -95,32 +95,32 @@ jobs:
- docs

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip

- name: Install released version of LuxonisML
if: startsWith(github.head_ref, 'release/') == true
run: pip install luxonis-ml[utils]

- name: Install dev version of LuxonisML
if: startsWith(github.head_ref, 'release/') == false
run: |
pip install "luxonis-ml[utils] @ git+https://github.com/luxonis/luxonis-ml.git@main"

- name: Test config without dependencies
run: |
pip install semver~=3.0 pydantic-extra-types~=2.10
pip install -e . --no-deps
python -c 'from luxonis_train.config import Config; \
Config.get_config("configs/complex_model.yaml")'
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip

- name: Install released version of LuxonisML
if: startsWith(github.head_ref, 'release/') == true
run: pip install luxonis-ml[utils]

- name: Install dev version of LuxonisML
if: startsWith(github.head_ref, 'release/') == false
run: |
pip install "luxonis-ml[utils] @ git+https://github.com/luxonis/luxonis-ml.git@main"

- name: Test config without dependencies
run: |
pip install semver~=3.0 pydantic-extra-types~=2.10
pip install -e . --no-deps
python -c 'from luxonis_train.config import Config; \
Config.get_config("configs/complex_model.yaml")'

tests:
needs:
Expand All @@ -133,59 +133,59 @@ jobs:
runs-on: ${{ matrix.suite == 'unit' && 'ubuntu-latest' || 'ubuntu-t4-4core' }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: pip

- name: Install dependencies
run: pip install -e .[dev]

- name: Install dev version of LuxonisML
if: startsWith(github.head_ref, 'release/') == false
run: |
pip uninstall luxonis-ml -y
pip install "luxonis-ml[data,tracker] @ git+https://github.com/luxonis/luxonis-ml.git@main"

- name: Authenticate to Google Cloud
id: google-auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
export_environment_variables: true
token_format: access_token

- name: Run pytest
env:
LUXONISML_BUCKET: luxonis-test-bucket
SUITE: ${{ matrix.suite }}
HUBAI_API_KEY: ${{ secrets.HUBAI_API_KEY }}
run: pytest -x --cov --junitxml=junit.xml -o junit_family=legacy -m "${SUITE}"

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: ${{ matrix.suite }}

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: ${{ matrix.suite }}

- name: Upload coverage as artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.suite }}
path: coverage.xml
overwrite: true
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip

- name: Install dependencies
run: pip install -e .[dev]

- name: Install dev version of LuxonisML
if: startsWith(github.head_ref, 'release/') == false
run: |
pip uninstall luxonis-ml -y
pip install "luxonis-ml[data,tracker] @ git+https://github.com/luxonis/luxonis-ml.git@main"

- name: Authenticate to Google Cloud
id: google-auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
create_credentials_file: true
export_environment_variables: true
token_format: access_token

- name: Run pytest
env:
LUXONISML_BUCKET: luxonis-test-bucket
SUITE: ${{ matrix.suite }}
HUBAI_API_KEY: ${{ secrets.HUBAI_API_KEY }}
run: pytest -x --cov --junitxml=junit.xml -o junit_family=legacy -m "${SUITE}"

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: ${{ matrix.suite }}

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: ${{ matrix.suite }}

- name: Upload coverage as artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.suite }}
path: coverage.xml
overwrite: true
32 changes: 16 additions & 16 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build package
run: python -m build
- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
uses: actions/checkout@v4

- name: Perform Semgrep Analysis
# @NOTE: This is the actual semgrep command to scan your code.
# Modify the --config option to 'r/all' to scan using all rules,
# or use multiple flags to specify particular rules, such as
# --config r/all --config custom/rules
# @NOTE: This is the actual semgrep command to scan your code.
# Modify the --config option to 'r/all' to scan using all rules,
# or use multiple flags to specify particular rules, such as
# --config r/all --config custom/rules
run: semgrep scan -q --sarif --config auto --config "p/secrets" . > semgrep-results.sarif

- name: Pretty-Print SARIF Output
Expand Down
Loading
Loading