Skip to content

Commit 2fe7d66

Browse files
Add CONTRIB.md (#26)
1 parent e471a36 commit 2fe7d66

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

CONTRIB.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Labelbox Python SDK Contribution Guide
2+
3+
## Repository Organization
4+
5+
The SDK source (excluding tests and support tools) is organized into the
6+
following packages/modules:
7+
* `orm/` package contains code that supports the general mapping of Labelbox
8+
data to Python objects. This includes base classes, attribute (field and
9+
relationship) classes, generic GraphQL queries etc.
10+
* `schema/` package contains definitions of classes which represent data type
11+
(e.g. Project, Label etc.). It relies on `orm/` classes for easy and succinct
12+
object definitions. It also contains custom functionalities and custom GraphQL
13+
templates where necessary.
14+
* `client.py` contains the `Client` class that's the client-side stub for
15+
communicating with Labelbox servers.
16+
* `exceptions.py` contains declarations for all Labelbox errors.
17+
* `pagination.py` contains support for paginated relationship and collection
18+
fetching.
19+
* `utils.py` contains utility functions.
20+
21+
## Branches
22+
23+
* All development happens in per-feature branches prefixed by contributor's
24+
initials. For example `fs/feature_name`.
25+
* Approved PRs are merged to the `develop` branch.
26+
* The `develop` branch is merged to `master` on each release.
27+
28+
## Testing
29+
30+
Currently the SDK functionality is tested using integration tests. These tests
31+
communicate with a Labelbox server (by default the staging server) and are in
32+
that sense not self-contained. Besides that they are organized like unit test
33+
and are based on the `pytest` library.
34+
35+
To execute tests you will need to provide an API key for the server you're using
36+
for testing (staging by default) in the `LABELBOX_TEST_API_KEY` environment
37+
variable. For more info see [Labelbox API key
38+
docs](https://labelbox.helpdocs.io/docs/api/getting-started).
39+
40+
## Release Steps
41+
42+
Each release should follow the following steps:
43+
44+
1. Update the Python SDK package version in `REPO_ROOT/setup.py`
45+
2. Make sure the `CHANGELOG.md` contains appropriate info
46+
3. Commit these changes and tag the commit in Git as `vX.Y`
47+
4. Merge `develop` to `master` (fast-forward only).
48+
5. Generate a GitHub release.
49+
6. Build the library in the [standard
50+
way](https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives)
51+
7. Upload the distribution archives in the [standard
52+
way](https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives).
53+
You will need credentials for the `labelbox` PyPI user.
54+
8. Run the `REPO_ROOT/tools/api_reference_generator.py` script to update
55+
[HelpDocs documentation](https://labelbox.helpdocs.io/docs/). You will need
56+
to provide a HelpDocs API key for.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Labelbox Python API
1+
# Labelbox Python SDK
22

33
Labelbox is the enterprise-grade training data solution with fast AI enabled labeling tools, labeling automation, human workforce, data management, a powerful API for integration & SDK for extensibility. Visit http://labelbox.com/ for more information.
44

@@ -29,3 +29,6 @@ client = Client()
2929
## Documentation
3030

3131
[Visit our docs](https://labelbox.com/docs/python-api) to learn how to [create a project](https://labelbox.com/docs/python-api/create-first-project), read through some helpful user guides, and view our [API reference](https://labelbox.com/docs/python-api/api-reference).
32+
33+
## Repo Organization and Contribution
34+
Please consult `CONTRIB.md`

0 commit comments

Comments
 (0)