Metadata-Version: 2.4
Name: apheris-foundry-sdk
Version: 1.1.0
Summary: Reference Python SDK for Apheris Foundry per-module CLIs.
Author: Apheris
License-Expression: LicenseRef-Apheris-Foundry-Software-License
Project-URL: License, https://www.apheris.com/docs/hub/hub-license.html
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.2
Requires-Dist: rich<15,>=13
Requires-Dist: pydantic<3,>=2.12.0
Requires-Dist: pyyaml>=6
Dynamic: license-file

# Apheris Foundry SDK

Reference Python SDK for building Apheris Foundry per-module CLIs.

## Usage

Declare a task — a plain function plus a pydantic config model — and foundry
builds a typed CLI for it. See the [usage guide](docs/usage.md) to get started.

## Portable task resources

```python
@task(requirements={"cpu": 4, "memory": "16 GiB", "gpu": 1,
                    "disk": "50 GiB", "compute_class": "gpu_inference"})
```

- `describe` publishes normalized `resources`; image annotations and the Nextflow generator use the same contract.
- CPU/memory/disk/GPU values describe the task's defaults. Deployment policy supplies placement, ceilings and any higher CPU/memory floors.
- `compute_class` is a portable capability name, not an instance type or executor profile.
- Memory and disk accept explicit decimal (`MB`, `GB`, `TB`) or binary (`MiB`, `GiB`, `TiB`) units and round up to whole MiB.
- Missing requirements remain absent, so consumers can identify older contracts and require explicit fallback defaults.
See the [Nextflow 25.10.0 process directives](https://github.com/nextflow-io/nextflow/blob/v25.10.0/docs/reference/process.md#directives)
for `cpus`, `memory`, `disk`, `accelerator` and `label`.

## Nextflow generation

- For a single directory input, repeat `--input-directory-file ligands.csv` for each consumed file to make it an explicit staging and cache input.
- This does not change the task's working directory: the generated command still passes the staged directory through `--input`. It does not replace that argument with `.`.
- Use `--generated-at 2026-01-01T00:00:00Z` for deterministic generation.

## Development

This project uses [pixi](https://pixi.sh) to manage the toolchain and environments.

```bash
pixi run install-dev   # install the git hooks (pre-commit + commit-msg)
pixi run test          # run the test suite
pixi run lint          # check formatting and lint with ruff
pixi run fix           # auto-fix formatting and lint issues
pixi run build         # build the wheel and sdist
```

Commits follow [Conventional Commits](https://www.conventionalcommits.org/); the
commit-msg hook enforces this via commitizen.

## Project structure

```text
src/apheris_foundry_sdk/   # SDK package
tests/         # test suite
docs/          # usage guide
```

## License

This package is licensed under the [Apheris Foundry Software License](https://www.apheris.com/docs/hub/hub-license.html). The full license text is also included in every published distribution as `LICENSE`.

## Support

Contact [support@apheris.com](mailto:support@apheris.com) for access and deployment assistance.
