Skip to content

Commit

Permalink
v0.4.0 - Metadata Update (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 authored Oct 3, 2024
1 parent 4b84d04 commit 9bda0c5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 20 deletions.
61 changes: 44 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ It outlines our workflow and standards for contributing to this project.

## Table of Contents

- [Pre-requisites](#pre-requisites)
- [Pre-commit Hooks](#pre-commit-hooks)
- [Documentation](#documentation)
- [Editor Support](#editor-support)
Expand All @@ -13,6 +14,25 @@ It outlines our workflow and standards for contributing to this project.
- [Making and Reviewing Changes](#making-and-reviewing-changes)
- [Notes](#notes)

## Pre-requisites

Clone the repository and navigate to the root directory:

```bash
git clone [email protected]:luxonis/luxonis-ml.git
cd luxonis-train
```

Install the development dependencies by running `pip install -r requirements-dev.txt` or install the package with the `dev` extra flag:

```bash
pip install -e .[dev]
```

> \[!NOTE\]
> This will install the package in editable mode (`-e`),
> so you can make changes to the code and run them immediately.
## Pre-commit Hooks

We use pre-commit hooks to ensure code quality and consistency:
Expand All @@ -31,8 +51,11 @@ To verify that your documentation is formatted correctly, follow these steps:
1. Download [`get-docs.py`](https://github.com/luxonis/python-api-analyzer-to-json/blob/main/gen-docs.py) script
1. Run `python3 get-docs.py luxonis_ml` in the root directory.
- If the script runs successfully and produces `docs.json` file, your documentation is formatted correctly.
- **NOTE:** If the script fails, it might not give the specific error message. In that case, you can run
the script for each file individually until you find the one that is causing the error.

> \[!NOTE\]
> If the script fails, it might not give a specific error message.
> In that case, you can run the script for each file individually
> until you find the one that is causing the error.
### Editor Support

Expand All @@ -46,32 +69,36 @@ We use [pytest](https://docs.pytest.org/en/stable/) for testing.
The tests are located in the `tests` directory. You can run the tests locally with:

```bash
pytest tests --cov
pytest tests --cov=luxonis_ml --cov-report=html
```

This command will run all tests and print a coverage report. The coverage report
is only informational for now, but we may enforce a minimum coverage in the future.
This command will run all tests and generate HTML coverage report.

**If a new feature is added, a new test should be added to cover it.**
> \[!TIP\]
> The coverage report will be saved to `htmlcov` directory.
> If you want to inspect the coverage in more detail, open `htmlcov/index.html` in a browser.
> \[!IMPORTANT\]
> If a new feature is added, a new test should be added to cover it.
> There is no minimum coverage requirement for now, but minimal coverage will be enforced in the future.
## GitHub Actions

Our GitHub Actions workflow is run when a new PR is opened.
It first checks that the pre-commit hook passes and that the documentation builds successfully.
The tests are run only if the pre-commit hook and documentation build pass.
Successful tests are required for merging a PR.

1. Checks and tests are run automatically when you open a pull request.
1. For the tests to run, the [pre-commit](#pre-commit-hooks) hook must pass, and
the [documentation](#documentation) must be built successfully.
1. Review the GitHub Actions output if your PR fails.
1. Fix any issues to ensure that all checks and tests pass.
1. First, the [pre-commit](#pre-commit-hooks) hooks must pass and the [documentation](#documentation) must be built successfully.
1. If all previous checks pass, the [tests](#tests) are run.

> \[!TIP\]
> Review the GitHub Actions output if your PR fails.
> \[!IMPORTANT\]
> Successful completion of all the workflow checks is required for merging a PR.
## Making and Reviewing Changes

1. Make changes in a new branch.
1. Test your changes locally.
1. Commit (pre-commit hook will run).
1. Push to your branch and create a pull request.
1. Any other relevant team members can be added as reviewers as well.
1. Commit your changes (pre-commit hooks will run).
1. Push your branch and create a pull request.
1. The team will review and merge your PR.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ We offer several versions of the package:
- `luxonis-ml[all]`: installs all dependencies
- `luxonis-ml[dev]`: installs all dependencies, including development dependencies

To install the package with all dependecies, run:
To install the package with all dependencies, run:

```bash
pip install luxonis-ml[all]
Expand Down
1 change: 1 addition & 0 deletions luxonis_ml/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.4.0"
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[project]
name = "luxonis-ml"
version = "0.3.0"
description = "MLOps tools for training models for Luxonis devices"
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
authors = [{ name = "Luxonis", email = "[email protected]" }]
maintainers = [{ name = "Luxonis", email = "[email protected]" }]
keywords = ["ml", "ops", "camera", "luxonis", "oak"]
dynamic = ["dependencies", "optional-dependencies"]
dynamic = ["dependencies", "optional-dependencies", "version"]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Development Status :: 3 - Beta",
Expand Down Expand Up @@ -36,6 +35,7 @@ where = ["."]

[tool.setuptools.dynamic]
dependencies = { file = ["luxonis_ml/utils/requirements.txt"] }
version = {attr = "luxonis_ml.__version__"}

[tool.setuptools.dynamic.optional-dependencies]
data = { file = ["luxonis_ml/data/requirements.txt"] }
Expand Down

0 comments on commit 9bda0c5

Please sign in to comment.