Metadata-Version: 2.4
Name: chemsift
Version: 1.3.0
Summary: 
Author: Dave Martinez
Author-email: 34991082+dkm-coder@users.noreply.github.com
Requires-Python: >=3.9
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: boto3 (>=1.34.135,<2.0.0)
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
Requires-Dist: requests (>=2.32.5,<3.0.0)
Requires-Dist: rich (>=13.7.0,<14.0.0)
Requires-Dist: typer (>=0.21.0,<0.22.0)
Requires-Dist: typing-extensions (>=4.0.0)
Requires-Dist: urllib3 (<2)
Description-Content-Type: text/markdown

# chemsift (cloud CLI)

The `chemsift` CLI lets scientists submit and manage jobs on AWS.

Install from PyPI:

```bash
pip install chemsift
```

## Commands

- `chemsift login`: Authenticate and store credentials
- `chemsift register <input-dir>`: Upload a `registry_input/` and start a registration job
- `chemsift map <register-job-id>`: Run the mapped pipeline against a completed register job
- `chemsift query <register-job-id> --molecules <csv> --yaml <yml>`: Submit a query job
- `chemsift supervised <register-job-id> --yaml <yml> [--state <csv>]`: Submit one round of active-learning screening
- `chemsift supervised --pool <pool-id> --yaml <yml> [--state <csv>]`: The same, against a shared demo pool instead of your own registration
- `chemsift env list` / `chemsift env use <dev|prod>`: Show or switch the active environment
- `chemsift status <job-id>`: Check status of a job
- `chemsift download <job-id> <output-dir>`: Download results of a completed job
- `chemsift list`: List all job IDs for the current user

### Supervised workflow

```bash
# Round 0 — no state file yet
chemsift supervised <register-job-id> --yaml supervised.yml

# Wait for completion, download state CSV, fill 'label' column (0=inactive, 1=active)
chemsift status <job-id>
chemsift download <job-id> .

# Subsequent rounds — pass labelled state CSV
chemsift supervised <register-job-id> --yaml supervised.yml --state state.csv
```

### Screening a shared pool

A pool is a library registered once that every authenticated user of a stack can
screen, so a new account does not have to register anything before it can run a
round. Pass `--pool` instead of a register job id — everything else is identical:

```bash
chemsift supervised --pool ecbd-luciferase-v1 --yaml supervised.yml
```

The pool is read-only and lives in its own bucket; everything a round writes still
goes to your own prefix. `--pool-bucket` overrides the bucket, which defaults to
the active environment's.

Two things the pool form does for you. It names the pool's library in the uploaded
config when your config did not, so a campaign records what it screened (CS-08).
And on a resumed round it refuses a state CSV that was started against a different
library, rather than silently scoring one library's molecules with another's
ordering.

A pool publishes one pinned library with nothing to score it against, so pools are
screenable with `supervised` but are not valid targets for `query`.

## Development

This project uses [Poetry](https://python-poetry.org/) for dependency management and packaging.

### Setup

```bash
cd cli
poetry install
poetry run chemsift --help
```

### Releasing a new version to PyPI

Publishing is fully automated — CI builds and uploads the package to PyPI when a `cli-v*` tag is pushed. The tag version must match `pyproject.toml` exactly or CI will fail the verification step.

**Step 1 — bump the version in `pyproject.toml`:**

```bash
cd cli
poetry version patch   # or: minor, major, or an explicit version e.g. 1.2.0
```

**Step 2 — commit and merge to `main`:**

```bash
git add cli/pyproject.toml
git commit -m "chore: bump chemsift CLI to $(cd cli && poetry version -s)"
# open a PR, get it merged into main
```

**Step 3 — tag the merge commit and push the tag:**

```bash
git checkout main
git pull
git tag cli-v$(cd cli && poetry version -s)   # e.g. cli-v1.2.0
git push --tags
```

Pushing the tag triggers the `publish-cli.yml` workflow, which:
1. Verifies the tag matches the version in `pyproject.toml`
2. Builds the sdist and wheel
3. Publishes to PyPI via OIDC Trusted Publishing (no API token needed)

