Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
206046e
[LABIMP-8415] Added text based project support :
nupursharma-labellerr Dec 2, 2025
01adf9a
[LABIMP-8422] List templates API integration
nupursharma-labellerr Dec 9, 2025
92f3b60
[LABIMP-8483] Updated the property to annotation_template_id
nupursharma-labellerr Dec 11, 2025
353e2cf
[LABIMP-8500] Adding the pytest cases for Project Creation
nupursharma-labellerr Dec 11, 2025
67049e5
[LABIMP-8500] Linting errors
nupursharma-labellerr Dec 11, 2025
56d49e1
Merge remote-tracking branch 'origin/main' into task/LABIMP-8500
nupursharma-labellerr Dec 11, 2025
a2ad26e
[LABIMP-8483] Updated the property to annotation_template_id (#37)
nupursharma-labellerr Dec 11, 2025
7b6bf55
[LABIMP-8500]: Incorporating code review comments
nupursharma-labellerr Dec 12, 2025
acf13d9
[LABIMP-8500]: Linting errors
nupursharma-labellerr Dec 12, 2025
6107027
Delete Project API integration
ximihoque Jan 14, 2026
717a1a6
[LABIMP-8422] List templates API integration
nupursharma-labellerr Dec 9, 2025
92c31fa
[LABIMP-8483] Updated the property to annotation_template_id
nupursharma-labellerr Dec 11, 2025
2b82611
[LABIMP-8500] Adding the pytest cases for Project Creation
nupursharma-labellerr Dec 11, 2025
5cbe9d2
[LABIMP-8500] Linting errors
nupursharma-labellerr Dec 11, 2025
74766e9
[LABIMP-8500]: Incorporating code review comments
nupursharma-labellerr Dec 12, 2025
ce18442
[LABIMP-8500]: Linting errors
nupursharma-labellerr Dec 12, 2025
94158de
[LABIMP-8500] Update pytest for project deletion
nupursharma-labellerr Jan 16, 2026
24a9364
Merge branch 'task/LABIMP-8500' of github.com:Labellerr/SDKPython int…
nupursharma-labellerr Jan 16, 2026
1925aad
Merge branch 'main' into task/LABIMP-8500
ximihoque Jan 16, 2026
c1d441e
Merged main, PR review updates
ximihoque Jan 16, 2026
ef19c6d
[LABIMP-8500]: Adding a run_all_tests script
nupursharma-labellerr Jan 18, 2026
750f77c
[LABIMP-8500]: Adding exports pytest
nupursharma-labellerr Jan 20, 2026
9ce13fc
[LABIMP-8500] Updating pytest for supported datatypes
nupursharma-labellerr Jan 22, 2026
5729491
[LABIMP-8500] Update pytest to run for all dataset types
nupursharma-labellerr Jan 23, 2026
4496714
[LABIMP-8500] Updating pytest to generate HTML reports
nupursharma-labellerr Jan 23, 2026
31f73af
Updates in review
ximihoque Jan 27, 2026
73628ca
[LABIMP-8500] Updating pytest for code review comments
nupursharma-labellerr Jan 27, 2026
4ffddc5
Updates
ximihoque Jan 29, 2026
29e7372
Added skip to the tests to avoid running on invalid/missing credentials
ximihoque Jan 29, 2026
c428504
Formatting and linting
ximihoque Jan 29, 2026
3244770
Updates
ximihoque Jan 29, 2026
398e13c
Fixed fixtures for unit tests
ximihoque Jan 29, 2026
a4d6099
Formatting
ximihoque Jan 29, 2026
18426a3
Updated CI to only run unit tests and updated release.yml to run inte…
ximihoque Jan 30, 2026
e28d6a2
Updates to CI
ximihoque Jan 30, 2026
c53dd82
Merge branch 'main' into task/LABIMP-8500
ximihoque Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 5 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,6 @@ jobs:
runs-on: ubuntu-latest
environment: prod

env:
API_KEY: ${{ secrets.API_KEY }}
API_SECRET: ${{ secrets.API_SECRET }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
AWS_CONNECTION_IMAGE: ${{ secrets.AWS_CONNECTION_IMAGE }}
AWS_CONNECTION_VIDEO: ${{ secrets.AWS_CONNECTION_VIDEO }}
GCS_CONNECTION_IMAGE: ${{ secrets.GCS_CONNECTION_IMAGE }}
GCS_CONNECTION_VIDEO: ${{ secrets.GCS_CONNECTION_VIDEO }}
LABELLERR_TEST_DATA_PATH: ${{ github.workspace }}/tests/fixtures/mcp_images
IMAGE_DATASET_ID: ${{ vars.IMAGE_DATASET_ID }}
AUDIO_MP3_DATASET_ID: ${{ vars.AUDIO_MP3_DATASET_ID }}
AUDIO_WAV_DATASET_ID: ${{ vars.AUDIO_WAV_DATASET_ID }}
VIDEO_DATASET_ID: ${{ vars.VIDEO_DATASET_ID }}
DOCUMENT_DATASET_ID: ${{ vars.DOCUMENT_DATASET_ID }}
TEXT_DATASET_ID: ${{ vars.TEXT_DATASET_ID }}


steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -41,6 +23,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e ".[dev,mcp]"

- name: Run linting
Expand All @@ -62,7 +45,7 @@ jobs:
fi

- name: Run unit tests
run: make test-unit

- name: Run integration tests
run: make test-integration
run: |
mkdir -p tests/integration/test_reports
make test-unit
continue-on-error: false
96 changes: 60 additions & 36 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,76 +30,100 @@
PYTHON_VERSION: '3.9'

jobs:
# Test before releasing - reuse existing CI strategy
# Test before releasing - unified test suite
test:
name: Test Suite
name: Test Suite (Unit + Integration)
runs-on: ubuntu-latest
if: ${{ !inputs.skip_tests }}
strategy:
matrix:
python-version: ['3.9']
environment: prod

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e ".[dev]"

- name: Run linting
run: |
make lint

- name: Run formatting
run: |
make format
- name: Run tests
run: |
make test

integration-test:
name: Integration Tests
runs-on: ubuntu-latest
needs: test
if: ${{ !inputs.skip_tests && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install dependencies

- name: Run unit tests
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
mkdir -p tests/integration/test_reports
make test-unit

- name: Run integration tests
env:
LABELLERR_API_KEY: ${{ secrets.LABELLERR_API_KEY }}
LABELLERR_API_SECRET: ${{ secrets.LABELLERR_API_SECRET }}
LABELLERR_CLIENT_ID: ${{ secrets.LABELLERR_CLIENT_ID }}
LABELLERR_TEST_EMAIL: ${{ secrets.LABELLERR_TEST_EMAIL }}
API_KEY: ${{ secrets.LABELLERR_API_KEY }}
API_SECRET: ${{ secrets.LABELLERR_API_SECRET }}
CLIENT_ID: ${{ secrets.LABELLERR_CLIENT_ID }}
TEST_EMAIL: ${{ secrets.LABELLERR_TEST_EMAIL }}
AWS_CONNECTION_IMAGE: ${{ secrets.AWS_CONNECTION_IMAGE }}
AWS_CONNECTION_VIDEO: ${{ secrets.AWS_CONNECTION_VIDEO }}
GCS_CONNECTION_IMAGE: ${{ secrets.GCS_CONNECTION_IMAGE }}
GCS_CONNECTION_VIDEO: ${{ secrets.GCS_CONNECTION_VIDEO }}
LABELLERR_TEST_DATA_PATH: ${{ github.workspace }}/tests/fixtures/mcp_images
IMAGE_DATASET_ID: ${{ vars.IMAGE_DATASET_ID }}
AUDIO_MP3_DATASET_ID: ${{ vars.AUDIO_MP3_DATASET_ID }}
AUDIO_WAV_DATASET_ID: ${{ vars.AUDIO_WAV_DATASET_ID }}
VIDEO_DATASET_ID: ${{ vars.VIDEO_DATASET_ID }}
DOCUMENT_DATASET_ID: ${{ vars.DOCUMENT_DATASET_ID }}
TEXT_DATASET_ID: ${{ vars.TEXT_DATASET_ID }}
run: |
make test-integration

- name: Upload test reports
uses: actions/upload-artifact@v4
if: always()
with:
name: release-test-reports
path: |
tests/integration/test_reports/
htmlcov/
retention-days: 90

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: tests/integration/test_reports/junit.xml
check_name: Release Test Results
comment_title: Release Test Results

- name: Test Report Summary
if: always()
run: |
python -m pytest labellerr_integration_case_tests.py -v
echo "## 📊 Release Test Execution Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Unit Tests ✅" >> $GITHUB_STEP_SUMMARY
echo "### Integration Tests ✅" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f tests/integration/test_reports/junit.xml ]; then
echo "✅ Test reports generated successfully" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📄 Reports available in artifacts" >> $GITHUB_STEP_SUMMARY
else
echo "⚠️ No test reports found" >> $GITHUB_STEP_SUMMARY
fi

release:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Create Release
runs-on: ubuntu-latest
needs: [test, integration-test]
if: always() && github.ref == 'refs/heads/main' && (needs.test.result == 'success' || needs.test.result == 'skipped') && (needs.integration-test.result == 'success' || needs.integration-test.result == 'skipped')
needs: [test]
if: always() && github.ref == 'refs/heads/main' && (needs.test.result == 'success' || needs.test.result == 'skipped')
outputs:
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.tag }}
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,12 @@ labellerr/__pycache__/
env.*
claude.md
.history/

# Test reports
tests/integration/test_reports/
reports/
htmlcov/
.coverage
.pytest_cache/
*.xml
*.html
41 changes: 35 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,54 @@ clean:
find . -type f -name "*.pyc" -delete
find . -type d -name "__pycache__" -delete
find . -type d -name "*.egg-info" -exec rm -rf {} +
rm -rf build/ dist/ .coverage .pytest_cache/ .mypy_cache/
rm -rf build/ dist/ .coverage .pytest_cache/ .mypy_cache/ tests/integration/test_reports/ htmlcov/

test: ## Run all tests
test: ## Run all tests with HTML report
@mkdir -p tests/integration/test_reports
$(PYTHON) -m pytest tests/ -v
@echo ""
@echo "✅ Tests completed! Check output above for report locations."

test-unit: ## Run only unit tests
@mkdir -p tests/integration/test_reports
$(PYTHON) -m pytest tests/unit/ -v -m "unit"
@echo ""
@echo "✅ Unit tests completed! Check output above for report locations."

test-integration: ## Run only integration tests (requires credentials)
$(PYTHON) -m pytest tests/integration/ -v -m "integration"
@mkdir -p tests/integration/test_reports
$(PYTHON) -m pytest tests/integration/ -v -m "integration and not deprecated"
@echo ""
@echo "✅ Integration tests completed! Check output above for report locations."

test-fast: ## Run fast tests only (exclude slow tests)
$(PYTHON) -m pytest tests/ -v -m "not slow"
@mkdir -p tests/integration/test_reports
$(PYTHON) -m pytest tests/ -v -m "not slow" --html=dummy --junit-xml=dummy
@echo ""
@echo "📊 Latest test report: tests/integration/test_reports/test-report.html"
@echo "📁 Timestamped reports saved in: tests/integration/test_reports/"

test-aws: ## Run AWS-specific tests
$(PYTHON) -m pytest tests/ -v -m "aws"
@mkdir -p tests/integration/test_reports
$(PYTHON) -m pytest tests/ -v -m "aws" --html=dummy --junit-xml=dummy
@echo ""
@echo "📊 Latest test report: tests/integration/test_reports/test-report.html"
@echo "📁 Timestamped reports saved in: tests/integration/test_reports/"

test-gcs: ## Run GCS-specific tests
$(PYTHON) -m pytest tests/ -v -m "gcs"
@mkdir -p tests/integration/test_reports
$(PYTHON) -m pytest tests/ -v -m "gcs" --html=dummy --junit-xml=dummy
@echo ""
@echo "📊 Latest test report: tests/integration/test_reports/test-report.html"
@echo "📁 Timestamped reports saved in: tests/integration/test_reports/"

test-with-coverage: ## Run tests with coverage report
@mkdir -p tests/integration/test_reports htmlcov
$(PYTHON) -m pytest tests/ -v --html=dummy --junit-xml=dummy --cov=labellerr --cov-report=html --cov-report=term --cov-report=xml:tests/integration/test_reports/coverage.xml
@echo ""
@echo "📊 Latest test report: tests/integration/test_reports/test-report.html"
@echo "📈 Coverage report: htmlcov/index.html"
@echo "📁 Timestamped reports saved in: tests/integration/test_reports/"

lint:
flake8 .
Expand Down
Loading