Skip to content

Commit

Permalink
Release 3.43.0 (#1044)
Browse files Browse the repository at this point in the history
Co-authored-by: Ibrahim Muhammad <[email protected]>
Co-authored-by: Kevin Kim <[email protected]>
Co-authored-by: Val Brodsky <[email protected]>
Co-authored-by: Val Brodsky <[email protected]>
Co-authored-by: Klaus Opreschko <[email protected]>
Co-authored-by: Klaus Opreschko <[email protected]>
Co-authored-by: mnoszczak <[email protected]>
Co-authored-by: Andrea Ovalle <[email protected]>
  • Loading branch information
9 people authored Apr 6, 2023
1 parent e89f990 commit 5b71ae1
Show file tree
Hide file tree
Showing 63 changed files with 5,727 additions and 1,576 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

# Version 3.43.0 (2023-04-05)

## Added
* Nested object classifications to `VideoObjectAnnotation`
* Relationship Annotation Types
* Added `project_ids` and `model_run_ids` to params in all export_v2 functions

## Fixed
* VideoMaskAnnotation annotation import

## Notebooks
* Added DICOM annotation import notebook
* Added audio annotation import notebook
* Added HTML annotation import notebook
* Added relationship examples to annotation import notebooks
* Added global video classification example
* Added nested classification examples
* Added video mask example
* Added global key and LPOs to queue management notebook

# Version 3.42.0 (2023-03-22)

## Added
Expand Down
90 changes: 50 additions & 40 deletions CONTRIB.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# Labelbox Python SDK Contribution Guide

## Contribution Guidelines
Thank you for expressing your interest in contributing to the Labelbox SDK.
To ensure that your contribution aligns with our guidelines, please carefully
review the following considerations before proceeding:

* For feature requests, we recommend consulting with Labelbox support or
creating a [Github Issue](https://github.com/Labelbox/labelbox-python/issues) on our repository.
* We can only accept general solutions that address common issues rather than solutions
designed for specific use cases. Acceptable contributions include simple bug fixes and
improvements to functions within the schema/ package.
* Please ensure that any new libraries are compliant with the Apache license that governs the Labelbox SDK.
* Ensure that you update any relevant docstrings and comments within your code

## Repository Organization

The SDK source (excluding tests and support tools) is organized into the
following packages/modules:
* `data/` package contains code that maps annotations (labels or pre-labels) to
Python objects, as well as serialization and deserialization tools for converting
between NDJson and Annotation Types.
* `orm/` package contains code that supports the general mapping of Labelbox
data to Python objects. This includes base classes, attribute (field and
relationship) classes, generic GraphQL queries etc.
Expand All @@ -25,58 +41,52 @@ following packages/modules:
* Approved PRs are merged to the `develop` branch.
* The `develop` branch is merged to `master` on each release.

## Commits
## Formatting

Before making a commit, to automatically adhere to our formatting standards,
install and activate [pre-commit](https://pre-commit.com/)
```shell
pip install pre-commit
pre-commit install
```
After the above, running `git commit ...` will attempt to fix formatting,
and make necessary changes to files. You will then need to stage those files again.

You may also manually format your code by running the following:
```shell
yapf tests labelbox -i --verbose --recursive --parallel --style "google"
```

After the above, running `git commit ...` will attempt to fix formatting. If
there was formatted needed, you will need to re-add and re-commit before pushing.

## Testing

Currently, the SDK functionality is tested using integration tests. These tests
communicate with a Labelbox server (by default the staging server) and are in
that sense not self-contained. Besides, that they are organized like unit test
and are based on the `pytest` library.
Currently, the SDK functionality is tested using unit and integration tests.
The integration tests communicate with a Labelbox server (by default the staging server)
and are in that sense not self-contained.

Please consult "Testing" section in the README for more details on how to test.

To execute tests you will need to provide an API key for the server you're using
Additionally, to execute tests you will need to provide an API key for the server you're using
for testing (staging by default) in the `LABELBOX_TEST_API_KEY` environment
variable. For more info see [Labelbox API key docs](https://labelbox.helpdocs.io/docs/api/getting-started).

To pass tests, code must be formatted. If pre-commit was not installed,
you will need to use the following command:

```shell
yapf tests labelbox -i --verbose --recursive --parallel --style "google"
```

## Release Steps

Each release should follow the following steps:

1. Update the Python SDK package version in `REPO_ROOT/setup.py`
2. Make sure the `CHANGELOG.md` contains appropriate info
3. Commit these changes and tag the commit in Git as `vX.Y`
4. Merge `develop` to `master` (fast-forward only).
5. Create a GitHub release.
6. This will kick off a Github Actions workflow that will:
- Build the library in the [standard way](https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives)
- Upload the distribution archives in the [standard way](https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives)
- with credentials for the `labelbox` PyPI user.

## Running Jupyter Notebooks

We have plenty of good samples in the _examples_ directory and using them for testing can help us increase our productivity. One way to use jupyter notebooks is to run the jupyter server locally (another way is to use a VSC plugin, not documented here). It works really fast.

Make sure your notebook will use your source code:
1. `ipython profile create`
2. `ipython locate` - will show where the config file is. This is the config file used by the jupyter server, since it runs via ipython
3. Open the file (this should be ipython_config.py and it is usually located in ~/.ipython/profile_default) and add the following line of code:
```
c.InteractiveShellApp.exec_lines = [
'import sys; sys.path.insert(0, "<labelbox-python root folder>")'
]
```
4. Go to the root of your project and run `jupyter notebook` to start the server
Please consult the Labelbox team for releasing your contributions

## Running Jupyter Notebooks

We have plenty of good samples in the _examples_ directory and using them for testing can help us increase our productivity. One way to use jupyter notebooks is to run the jupyter server locally (another way is to use a VSC plugin, not documented here). It works really fast.

Make sure your notebook will use your source code:
1. `ipython profile create`
2. `ipython locate` - will show where the config file is. This is the config file used by the jupyter server, since it runs via ipython
3. Open the file (this should be ipython_config.py and it is usually located in ~/.ipython/profile_default) and add the following line of code:
```
c.InteractiveShellApp.exec_lines = [
'import sys; sys.path.insert(0, "<labelbox-python root folder>")'
]
```
4. Go to the root of your project and run `jupyter notebook` to start the server

2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
copyright = '2021, Labelbox'
author = 'Labelbox'

release = '3.42.0'
release = '3.43.0'

# -- General configuration ---------------------------------------------------

Expand Down
Loading

0 comments on commit 5b71ae1

Please sign in to comment.