-
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 #9 from luxonis/package_changes
Style changes
- Loading branch information
Showing
29 changed files
with
362 additions
and
273 deletions.
There are no files selected for viewing
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,43 @@ | ||
name: Autogenerate Requirements | ||
|
||
on: | ||
pull_request: | ||
branches: [dev, main] | ||
paths: | ||
- 'pyproject.toml' | ||
- 'tools/autogenerate_requirements.py' | ||
- '.github/workflows/autogenerate_requirements.yaml' | ||
|
||
jobs: | ||
update-requirements: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Run autogeneration script | ||
run: | | ||
pip install toml | ||
python tools/autogenerate_requirements.py | ||
- name: Commit files | ||
run: | | ||
git config --global user.name 'GitHub Actions' | ||
git config --global user.email '[email protected]' | ||
git diff --quiet requirements.txt || { | ||
git add requirements.txt | ||
git commit -m "[Automated] Updated requirements.txt" | ||
} | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: ${{ github.head_ref }} |
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,15 @@ | ||
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
branches: [dev, main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.8' | ||
- uses: pre-commit/[email protected] |
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 |
---|---|---|
@@ -1,11 +1,34 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.1.2 | ||
hooks: | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
types_or: [python, pyi] | ||
|
||
- repo: https://github.com/ambv/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
language_version: python3.8 | ||
|
||
- repo: https://github.com/PyCQA/docformatter | ||
rev: v1.7.5 | ||
hooks: | ||
- id: docformatter | ||
additional_dependencies: [tomli] | ||
args: [--in-place] | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: no-commit-to-branch | ||
args: ['--branch', 'main', '--branch', 'dev'] | ||
args: ['--branch', 'main', '--branch', 'dev'] | ||
|
||
- repo: https://github.com/executablebooks/mdformat | ||
rev: 0.7.10 | ||
hooks: | ||
- id: mdformat | ||
additional_dependencies: | ||
- mdformat-gfm | ||
- mdformat-toc |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,36 +7,66 @@ name = "datadreamer" | |
version = "0.1.0" | ||
description = "A library for dataset generation and knowledge extraction from foundation computer vision models." | ||
readme = "README.md" | ||
authors = [{ name = "Luxonis", email = "[email protected]"}] | ||
requires-python = ">=3.8" | ||
license = { file = "LICENSE" } | ||
maintainers = [{ name = "Luxonis", email = "[email protected]"}] | ||
keywords = ["computer vision", "AI", "machine learning", "generative models"] | ||
classifiers = [ | ||
"License :: Apache License 2.0", | ||
"Development Status :: 3 - Alpha", | ||
"Programming Language :: Python :: 3.8", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Software Development :: Libraries" | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
"Topic :: Scientific/Engineering :: Image Processing", | ||
"Topic :: Scientific/Engineering :: Image Recognition", | ||
] | ||
keywords = ["computer vision", "AI", "machine learning", "generative models"] | ||
dependencies = [ | ||
"torch", | ||
"torchvision", | ||
"transformers", | ||
"diffusers", | ||
"compel", | ||
"tqdm", | ||
"Pillow", | ||
"numpy", | ||
"matplotlib", | ||
"opencv-python", | ||
"accelerate", | ||
"scipy" | ||
"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>=10.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", | ||
] | ||
requires-python = ">=3.8" | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/luxonis/datadreamer" | ||
|
||
[project.scripts] | ||
datadreamer = "datadreamer.pipelines.generate_dataset_from_scratch:main" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] | ||
|
||
[project.scripts] | ||
datadreamer = "datadreamer.pipelines.generate_dataset_from_scratch:main" | ||
[tool.ruff] | ||
target-version = "py38" | ||
|
||
[tool.ruff.lint] | ||
ignore = ["F403", "B028", "B905", "D1"] | ||
select = ["E4", "E7", "E9", "F", "W", "B", "I"] | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "google" | ||
|
||
[tool.docformatter] | ||
black = true | ||
|
||
[tool.mypy] | ||
python_version = "3.8" | ||
ignore_missing_imports = true | ||
|
||
[tool.pyright] | ||
typeCheckingMode = "basic" |
Oops, something went wrong.