-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from luxonis/dev
Dev
- Loading branch information
Showing
32 changed files
with
956 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [ dev, main ] | ||
paths: | ||
- 'datadreamer/**/**.py' | ||
- 'tests/**/**.py' | ||
- .github/workflows/tests.yaml | ||
|
||
jobs: | ||
run_tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
version: ['3.10', '3.11'] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
cache: pip | ||
|
||
- name: Install dependencies [Ubuntu] | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt update | ||
sudo apt install -y pandoc | ||
pip install -e .[dev] | ||
pip install coverage-badge>=1.1.0 pytest-cov>=4.1.0 | ||
- name: Install dependencies [Windows] | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
pip install -e .[dev] | ||
pip install coverage-badge>=1.1.0 pytest-cov>=4.1.0 | ||
- name: Install dependencies [macOS] | ||
if: matrix.os == 'macOS-latest' | ||
run: | | ||
pip install -e .[dev] | ||
pip install coverage-badge>=1.1.0 pytest-cov>=4.1.0 | ||
- name: Run tests with coverage [Ubuntu] | ||
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.10' | ||
run: pytest tests --cov=datadreamer --cov-report xml --junit-xml pytest.xml | ||
|
||
- name: Run tests [Windows, macOS] | ||
if: matrix.os != 'ubuntu-latest' || matrix.version != '3.10' | ||
run: pytest tests --junit-xml pytest.xml | ||
|
||
- name: Generate coverage badge [Ubuntu] | ||
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.10' | ||
run: coverage-badge -o media/coverage_badge.svg -f | ||
|
||
- name: Generate coverage report [Ubuntu] | ||
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.10' | ||
uses: orgoro/[email protected] | ||
with: | ||
coverageFile: coverage.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit coverage badge [Ubuntu] | ||
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.10' | ||
run: | | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email '[email protected]' | ||
git diff --quiet media/coverage_badge.svg || { | ||
git add media/coverage_badge.svg | ||
git commit -m "[Automated] Updated coverage badge" | ||
} | ||
- name: Push changes [Ubuntu] | ||
if: matrix.os == 'ubuntu-latest' && matrix.version == '3.10' | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: ${{ github.head_ref }} | ||
|
||
- name: Upload Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results [${{ matrix.os }}] (Python ${{ matrix.version }}) | ||
path: pytest.xml | ||
retention-days: 10 | ||
if-no-files-found: error | ||
|
||
publish-test-results: | ||
name: "Publish Tests Results" | ||
needs: run_tests | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
if: always() | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
|
||
- name: Publish Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v2 | ||
with: | ||
files: "artifacts/**/*.xml" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ requires-python = ">=3.8" | |
license = { file = "LICENSE" } | ||
maintainers = [{ name = "Luxonis", email = "[email protected]"}] | ||
keywords = ["computer vision", "AI", "machine learning", "generative models"] | ||
dynamic = ["dependencies", "optional-dependencies"] | ||
classifiers = [ | ||
"License :: OSI Approved :: Apache Software License", | ||
"Development Status :: 3 - Alpha", | ||
|
@@ -21,26 +22,10 @@ classifiers = [ | |
"Topic :: Scientific/Engineering :: Image Processing", | ||
"Topic :: Scientific/Engineering :: Image Recognition", | ||
] | ||
dependencies = [ | ||
"torch>=2.0.0", | ||
"torchvision>=0.16.0", | ||
"transformers>=4.0.0", | ||
"diffusers>=0.24.0", | ||
"compel>=2.0.0", | ||
"tqdm>=4.0.0", | ||
"Pillow>=9.0.0", | ||
"numpy>=1.22.0", | ||
"matplotlib>=3.6.0", | ||
"opencv-python>=4.7.0", | ||
"accelerate>=0.25.0", | ||
"scipy>=1.10.0", | ||
] | ||
[project.optional-dependencies] | ||
dev = [ | ||
"datadreamer", | ||
"pre-commit>=3.2.1", | ||
"toml>=0.10.2", | ||
] | ||
|
||
[tool.setuptools.dynamic] | ||
dependencies = { file = ["requirements.txt"] } | ||
optional-dependencies = { dev = { file = ["requirements-dev.txt"] } } | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/luxonis/datadreamer" | ||
|
@@ -49,7 +34,7 @@ Homepage = "https://github.com/luxonis/datadreamer" | |
datadreamer = "datadreamer.pipelines.generate_dataset_from_scratch:main" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
where = ["."] | ||
|
||
[tool.ruff] | ||
target-version = "py38" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pre-commit>=3.2.1 | ||
toml>=0.10.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,3 @@ matplotlib>=3.6.0 | |
opencv-python>=4.7.0 | ||
accelerate>=0.25.0 | ||
scipy>=1.10.0 | ||
|
||
# dev | ||
pre-commit>=3.2.1 | ||
toml>=0.10.2 |
Oops, something went wrong.