Metadata-Version: 2.4
Name: biosero-data-services-sdk
Version: 0.11.2
Summary: SDK for interacting with the Biosero Data Services API
Author: Lab Sync
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.13.9
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.13.4
Requires-Dist: nested-diff>=1.8.0
Requires-Dist: requests>=2.34.2

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
[![Actions status](https://github.com/lab-sync/biosero-data-services-sdk/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/lab-sync/biosero-data-services-sdk/actions)
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/biosero-data-services-sdk)
[![PyPI Version](https://img.shields.io/pypi/v/biosero-data-services-sdk.svg)](https://pypi.org/project/biosero-data-services-sdk/)
[![Downloads](https://pepy.tech/badge/biosero-data-services-sdk)](https://pepy.tech/project/biosero-data-services-sdk)
[![Python Versions](https://img.shields.io/pypi/pyversions/biosero-data-services-sdk.svg)](https://pypi.org/project/biosero-data-services-sdk/)
[![OpenIssues](https://isitmaintained.com/badge/open/lab-sync/biosero-data-services-sdk.svg)](https://isitmaintained.com/project/lab-sync/biosero-data-services-sdk)

# Usage
Documentation is hosted on [ReadTheDocs](https://biosero-data-services-sdk.readthedocs.io/en/latest/?badge=latest).

# Development
This project has a dev container. If you already have VS Code and Docker installed, you can click the badge above or [here](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/lab-sync/biosero-data-services-sdk) to get started. Clicking these links will cause VS Code to automatically install the Dev Containers extension if needed, clone the source code into a container volume, and spin up a dev container for use.

To publish a new version of the repository, you can run the `Publish` workflow manually and publish to the staging registry from any branch, and you can check the 'Publish to Primary' option when on `main` to publish to the primary registry and create a git tag.

The `Release` workflow reuses the checks from CI instead of re-running them: it requires that the `CI` workflow has already completed successfully for the current commit (including the `workflow-summary` job) and reuses the artifacts CI built rather than rebuilding. Trigger it manually with `workflow_dispatch`; a real release must be run from `main`, while the `dry_run` option lets you exercise the workflow from any branch without tagging or releasing. A real run publishes the CI-built distribution to the staging registry and verifies a fresh install, then pushes the `v<version>` git tag, publishes to the primary registry, verifies the install again, and finally creates a GitHub Release with auto-generated notes.

<!-- TODO: migrate away from the `Publish` and `Publish to Staging` workflows and merge all of their functionality into the `Release` workflow. -->

Open a connection to the EC2 instance hosting GBG Data Services in AWS:
```bash
aws ssm start-session --target i-0e5fd6d0bcdfd3c03 --document-name AWS-StartPortForwardingSession --parameters '{"portNumber":["8105"],"localPortNumber":["8105"]}'
```

When running the unit test suite, `pytest-recording` library is used. If it gives you errors about a cassette missing, the parameter to invoke a live HTTP request is `--record-mode=once` (add on to the end of the `pytest` command)

To run e2e tests locally against a specific data services version:
```bash
DATA_SERVICES_VERSION=1.6.2 uv run pytest tests/e2e
DATA_SERVICES_VERSION=2.0.0 uv run pytest tests/e2e
```
`DATA_SERVICES_VERSION` controls which Docker image docker-compose pulls. It defaults to `1.6.2` if unset.




## Updating from the template
This repository uses a copier template. To pull in the latest updates from the template, use the command:
`copier update --answers-file .config/.copier-answers.yml --trust --conflict rej --defaults`

<!--
============== WARNING ==============================================================================
File is managed by copier template: gh:LabAutomationAndScreening/copier-base-template.git
See .config/.copier-managed-files.json for details.

You are welcome to make changes to this file in your repo if they are custom to your project,
but if the change should be shared with other projects, please backport it to the template repo.
=====================================================================================================
-->
