Skip to content

Commit c5cde8f

Browse files
committed
v0.4.0 - Metadata Update (#178)
1 parent f3c22c4 commit c5cde8f

File tree

4 files changed

+48
-20
lines changed

4 files changed

+48
-20
lines changed

CONTRIBUTING.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ It outlines our workflow and standards for contributing to this project.
55

66
## Table of Contents
77

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

17+
## Pre-requisites
18+
19+
Clone the repository and navigate to the root directory:
20+
21+
```bash
22+
git clone [email protected]:luxonis/luxonis-ml.git
23+
cd luxonis-train
24+
```
25+
26+
Install the development dependencies by running `pip install -r requirements-dev.txt` or install the package with the `dev` extra flag:
27+
28+
```bash
29+
pip install -e .[dev]
30+
```
31+
32+
> \[!NOTE\]
33+
> This will install the package in editable mode (`-e`),
34+
> so you can make changes to the code and run them immediately.
35+
1636
## Pre-commit Hooks
1737

1838
We use pre-commit hooks to ensure code quality and consistency:
@@ -31,8 +51,11 @@ To verify that your documentation is formatted correctly, follow these steps:
3151
1. Download [`get-docs.py`](https://github.com/luxonis/python-api-analyzer-to-json/blob/main/gen-docs.py) script
3252
1. Run `python3 get-docs.py luxonis_ml` in the root directory.
3353
- If the script runs successfully and produces `docs.json` file, your documentation is formatted correctly.
34-
- **NOTE:** If the script fails, it might not give the specific error message. In that case, you can run
35-
the script for each file individually until you find the one that is causing the error.
54+
55+
> \[!NOTE\]
56+
> If the script fails, it might not give a specific error message.
57+
> In that case, you can run the script for each file individually
58+
> until you find the one that is causing the error.
3659
3760
### Editor Support
3861

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

4871
```bash
49-
pytest tests --cov
72+
pytest tests --cov=luxonis_ml --cov-report=html
5073
```
5174

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

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

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

64-
1. Checks and tests are run automatically when you open a pull request.
65-
1. For the tests to run, the [pre-commit](#pre-commit-hooks) hook must pass, and
66-
the [documentation](#documentation) must be built successfully.
67-
1. Review the GitHub Actions output if your PR fails.
68-
1. Fix any issues to ensure that all checks and tests pass.
89+
1. First, the [pre-commit](#pre-commit-hooks) hooks must pass and the [documentation](#documentation) must be built successfully.
90+
1. If all previous checks pass, the [tests](#tests) are run.
91+
92+
> \[!TIP\]
93+
> Review the GitHub Actions output if your PR fails.
94+
95+
> \[!IMPORTANT\]
96+
> Successful completion of all the workflow checks is required for merging a PR.
6997
7098
## Making and Reviewing Changes
7199

72100
1. Make changes in a new branch.
73101
1. Test your changes locally.
74-
1. Commit (pre-commit hook will run).
75-
1. Push to your branch and create a pull request.
76-
1. Any other relevant team members can be added as reviewers as well.
102+
1. Commit your changes (pre-commit hooks will run).
103+
1. Push your branch and create a pull request.
77104
1. The team will review and merge your PR.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ We offer several versions of the package:
4141
- `luxonis-ml[all]`: installs all dependencies
4242
- `luxonis-ml[dev]`: installs all dependencies, including development dependencies
4343

44-
To install the package with all dependecies, run:
44+
To install the package with all dependencies, run:
4545

4646
```bash
4747
pip install luxonis-ml[all]

luxonis_ml/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.4.0"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
[project]
22
name = "luxonis-ml"
3-
version = "0.3.0"
43
description = "MLOps tools for training models for Luxonis devices"
54
readme = "README.md"
65
requires-python = ">=3.8"
76
license = { file = "LICENSE" }
87
authors = [{ name = "Luxonis", email = "[email protected]" }]
98
maintainers = [{ name = "Luxonis", email = "[email protected]" }]
109
keywords = ["ml", "ops", "camera", "luxonis", "oak"]
11-
dynamic = ["dependencies", "optional-dependencies"]
10+
dynamic = ["dependencies", "optional-dependencies", "version"]
1211
classifiers = [
1312
"License :: OSI Approved :: Apache Software License",
1413
"Development Status :: 4 - Beta",
@@ -36,6 +35,7 @@ where = ["."]
3635

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

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

0 commit comments

Comments
 (0)