Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
f7fc9d5
draft ncbi scripts
mattldawson Apr 16, 2026
fa5fa97
add local minio testing
mattldawson Apr 16, 2026
f4d838a
add NCBI end-to-end testing instructions
mattldawson Apr 17, 2026
5c6c547
debug and cleanup
mattldawson Apr 17, 2026
e5bc2f6
cleanup and formatting
mattldawson Apr 17, 2026
de8d325
formatting
mattldawson Apr 17, 2026
3f0e604
Potential fix for pull request finding 'Unused import'
mattldawson Apr 20, 2026
4f93d5f
Potential fix for pull request finding 'Unused import'
mattldawson Apr 20, 2026
399a00d
Potential fix for pull request finding
mattldawson Apr 20, 2026
fee2ab4
Potential fix for pull request finding
mattldawson Apr 20, 2026
5233d9d
Potential fix for pull request finding
mattldawson Apr 20, 2026
e5b58f2
Potential fix for pull request finding
mattldawson Apr 20, 2026
64ead4c
Potential fix for pull request finding
mattldawson Apr 20, 2026
9fba2c5
Potential fix for pull request finding
mattldawson Apr 20, 2026
c89ad37
address copilot comments
mattldawson Apr 20, 2026
9a5e2fe
increased timeout for trivy action
mattldawson Apr 20, 2026
de77b14
Potential fix for pull request finding 'Unused import'
mattldawson Apr 20, 2026
7d9ced1
Potential fix for pull request finding 'Unused import'
mattldawson Apr 20, 2026
16dfda3
Potential fix for pull request finding
mattldawson Apr 20, 2026
521978d
Potential fix for pull request finding
mattldawson Apr 20, 2026
8f73674
Potential fix for pull request finding
mattldawson Apr 20, 2026
1e8f363
add progress bar to manifest verification
mattldawson Apr 20, 2026
7326641
add synthetic assembly summary generation option
mattldawson Apr 20, 2026
4cf60d6
debug synthetic manifest
mattldawson Apr 20, 2026
9a1d1e5
add custom release date to synthetic manifest generation
mattldawson Apr 21, 2026
a4ee186
fix style
mattldawson Apr 21, 2026
e351288
Merge branch 'main' into develop-add-ncbi-ftp
mattldawson Apr 21, 2026
6e45879
update docs and progress bar
mattldawson Apr 21, 2026
adfda18
add checks for synthetic summary creation
mattldawson Apr 21, 2026
fdd67c4
add connection check to S3 store
mattldawson Apr 21, 2026
d4f868d
add s3 connection check
mattldawson Apr 21, 2026
55cbf9e
reduce progress bar update rate
mattldawson Apr 21, 2026
c1ee7e3
select database for synthetic summary
mattldawson Apr 21, 2026
76349c1
formatting
mattldawson Apr 22, 2026
3369e11
add frictionless descriptors
mattldawson Apr 22, 2026
21dda1c
Potential fix for pull request finding 'CodeQL / Incomplete URL subst…
mattldawson Apr 22, 2026
803d8c4
update url parsing test
mattldawson Apr 22, 2026
280bb63
Potential fix for pull request finding 'CodeQL / Incomplete URL subst…
mattldawson Apr 22, 2026
81a0821
Merge branch 'develop' into develop-add-ncbi-ftp
mattldawson Apr 23, 2026
09df496
merge file upload functions
mattldawson Apr 23, 2026
c56c3c9
formatting
mattldawson Apr 23, 2026
6d6415b
merge copy object functions
mattldawson Apr 23, 2026
bf0c01e
use tenacity
mattldawson Apr 23, 2026
de041dc
address reviewer comments
mattldawson Apr 23, 2026
0fefd29
remove defaults for minio test env vars
mattldawson Apr 23, 2026
f9bcaee
cleanup
mattldawson Apr 23, 2026
f88df1d
add docker compose integration test option and draft new action
mattldawson Apr 23, 2026
c9aa9ff
try again for the integration action
mattldawson Apr 23, 2026
36369ca
Potential fix for pull request finding 'CodeQL / Workflow does not co…
mattldawson Apr 23, 2026
f2f8a78
add labels to tests the send requests to the NCBI FTP server
mattldawson Apr 23, 2026
caf43e0
Adding kernel creation instructions
ialarmedalien Apr 27, 2026
4ed9b63
Merge pull request #143 from kbase/add_venv_instructions
ialarmedalien Apr 27, 2026
7a931d9
add in to(schema) to ensure schema comments are saved
ialarmedalien Apr 27, 2026
6e2debf
Merge pull request #144 from kbase/save_schema
ialarmedalien Apr 27, 2026
1bc43c7
Merge branch 'develop' into develop-add-ncbi-ftp
mattldawson Apr 27, 2026
15ba0ef
Add a copy_directory command to the s3 utils
ialarmedalien Apr 27, 2026
b1426a2
Potential fix for pull request finding 'Redundant assignment'
ialarmedalien Apr 27, 2026
baf29cb
Merge pull request #145 from kbase/copy_dir
ialarmedalien Apr 27, 2026
6d923ce
address reviewer comments
mattldawson Apr 27, 2026
60d18f4
Merge branch 'develop' into develop-add-ncbi-ftp
mattldawson Apr 27, 2026
cc1042b
Potential fix for pull request finding 'Unused import'
mattldawson Apr 27, 2026
3216403
add notebook option for download phase
mattldawson Apr 28, 2026
3952655
formatting
mattldawson Apr 28, 2026
991b40e
Potential fix for pull request finding 'Unused import'
mattldawson Apr 28, 2026
359901f
Potential fix for pull request finding 'Unused import'
mattldawson Apr 28, 2026
51a3680
update notebooks
mattldawson Apr 29, 2026
8a41164
allow separate staging and destination buckets
mattldawson Apr 29, 2026
1da3d05
consolidate progress bars
mattldawson Apr 29, 2026
0d3aa68
consolidate download with staging and promotion with deletion from st…
mattldawson Apr 29, 2026
c823283
Potential fix for pull request finding 'Unused global variable'
mattldawson Apr 29, 2026
cf93013
Potential fix for pull request finding 'Unused global variable'
mattldawson Apr 29, 2026
2b45416
fix tests
mattldawson Apr 29, 2026
f3c0984
keep ftp connection alive
mattldawson Apr 29, 2026
b6f0bdd
Potential fix for pull request finding 'Unused import'
mattldawson Apr 29, 2026
5fcada9
smooth progress bars
mattldawson Apr 29, 2026
6b78cb0
add promote progress bar and reduce logger output on dry runs
mattldawson Apr 30, 2026
afcae5c
print removed manifest path
mattldawson Apr 30, 2026
2e8da0c
optimize array creation
mattldawson Apr 30, 2026
ae92916
remove checksum type from copy headers
mattldawson Apr 30, 2026
1a8f54a
use tags for metadata on copy to avoid boto errors
mattldawson Apr 30, 2026
fa3df73
remove tagging option on s3 copy
mattldawson Apr 30, 2026
4c9c1c8
parallelize copies and batch deletes
mattldawson Apr 30, 2026
409626d
optimize promotion step
mattldawson Apr 30, 2026
fdb7026
Potential fix for pull request finding 'Unused local variable'
mattldawson Apr 30, 2026
4d690a8
Potential fix for pull request finding 'Unused import'
mattldawson Apr 30, 2026
e305d74
Potential fix for pull request finding 'Unused import'
mattldawson Apr 30, 2026
c01dbdc
capture missing return values
mattldawson Apr 30, 2026
2b79b46
Add AI Covenant checklist item to PR template
mattldawson May 1, 2026
eb8bb28
Bump urllib3 from 2.6.3 to 2.7.0 in the uv group across 1 directory
dependabot[bot] May 11, 2026
9695cf7
Updating python deps
ialarmedalien May 26, 2026
19058eb
Merge pull request #157 from kbase/update_deps
ialarmedalien May 26, 2026
4d68234
Merge branch 'develop' into dependabot/uv/uv-c30c77f42d
ialarmedalien May 26, 2026
8693629
Bump ruff from 0.15.11 to 0.15.14
dependabot[bot] May 26, 2026
46e522a
Bump click from 8.3.2 to 8.4.1
dependabot[bot] May 26, 2026
aefc696
Merge pull request #156 from kbase/dependabot/uv/uv-c30c77f42d
ialarmedalien May 26, 2026
cdda85c
Merge branch 'develop' into develop-update-pr-template
ialarmedalien May 26, 2026
66bac2f
Merge pull request #155 from kbase/develop-update-pr-template
ialarmedalien May 26, 2026
82a3d6b
Merge branch 'develop' into dependabot/uv/click-8.3.3
ialarmedalien May 26, 2026
f91075f
Merge branch 'develop' into dependabot/uv/ruff-0.15.12
ialarmedalien May 26, 2026
ff3c16f
Merge pull request #146 from kbase/dependabot/uv/ruff-0.15.12
ialarmedalien May 26, 2026
277aa2b
Merge branch 'develop' into dependabot/uv/click-8.3.3
ialarmedalien May 26, 2026
394e875
Merge pull request #148 from kbase/dependabot/uv/click-8.3.3
ialarmedalien May 26, 2026
5e536d5
Merge branch 'develop' into develop-add-ncbi-ftp
ialarmedalien May 26, 2026
dac873b
address reviewer comments
mattldawson May 28, 2026
a78df13
address review comments
mattldawson May 28, 2026
08bd2e0
update function arg
mattldawson May 28, 2026
a51ed32
Update s3 module to remove dependency on berdl utils and refs to minio
ialarmedalien May 28, 2026
8466dcb
fix uv lock file
ialarmedalien May 29, 2026
3ab5c12
minor comments and tidying
ialarmedalien May 29, 2026
4d29312
break up large function
mattldawson May 29, 2026
9a40b66
Apply suggestions from code review
ialarmedalien May 29, 2026
22ada40
Merge pull request #158 from kbase/no_more_minio
ialarmedalien May 29, 2026
0862f1b
break up another large function; add tests
mattldawson May 29, 2026
67fcd31
Merge branch 'develop' into develop-add-ncbi-ftp
mattldawson May 29, 2026
1b5f2b2
updates for latest merge of develop branch
mattldawson May 29, 2026
7c4b7f1
Potential fix for pull request finding 'Unused import'
mattldawson May 29, 2026
d9b4a06
revert to previous head_object response
mattldawson Jun 1, 2026
4dea37b
formatting
mattldawson Jun 1, 2026
1da08e4
address review comments
mattldawson Jun 1, 2026
ffe2c6c
Update moto[s3] requirement from >=5.1.22 to >=5.2.1
dependabot[bot] Jun 2, 2026
d360ddf
Update uv-build requirement from <0.20.0,>=0.11.8 to >=0.11.18,<0.20.0
dependabot[bot] Jun 2, 2026
586a7dd
Bump bioregistry from 0.13.57 to 0.13.58
dependabot[bot] Jun 2, 2026
2990f7d
Update dlt[deltalake,duckdb,filesystem,parquet] requirement
dependabot[bot] Jun 2, 2026
c68c07a
Merge pull request #160 from kbase/dependabot/uv/uv-build-gte-0.11.18…
ialarmedalien Jun 2, 2026
c14ca4d
consolidate regex
mattldawson Jun 2, 2026
607a9e3
address review comments
mattldawson Jun 2, 2026
fa8157a
remove unused import
mattldawson Jun 2, 2026
02a3ce2
Potential fix for pull request finding 'Unused import'
mattldawson Jun 2, 2026
8f7ac09
merge s3 modules
mattldawson Jun 2, 2026
4f6e731
formatting
mattldawson Jun 2, 2026
17a9c5c
update split path function for bucket-only requests
mattldawson Jun 2, 2026
5a854ea
Merge branch 'develop' into develop-add-ncbi-ftp
mattldawson Jun 2, 2026
cd0dcb9
Merge pull request #133 from kbase/develop-add-ncbi-ftp
ialarmedalien Jun 2, 2026
aaef5aa
update docs
mattldawson Jun 2, 2026
4e0f5a6
Merge pull request #169 from kbase/develop-update-jupyter-instructions
ialarmedalien Jun 3, 2026
4504af9
Merge branch 'develop' into dependabot/uv/dlt-deltalakeduckdbfilesyst…
ialarmedalien Jun 3, 2026
4c55288
Merge pull request #163 from kbase/dependabot/uv/dlt-deltalakeduckdbf…
ialarmedalien Jun 3, 2026
63d033b
Merge branch 'develop' into dependabot/uv/moto-s3--gte-5.2.1
ialarmedalien Jun 3, 2026
c642acf
Bump delta-spark from 4.1.0 to 4.2.0
dependabot[bot] Jun 3, 2026
590fc69
Merge branch 'develop' into dependabot/uv/bioregistry-0.13.58
ialarmedalien Jun 3, 2026
afd5dfe
Merge pull request #162 from kbase/dependabot/uv/bioregistry-0.13.58
ialarmedalien Jun 3, 2026
e48ffc7
Merge branch 'develop' into dependabot/uv/delta-spark-4.2.0
ialarmedalien Jun 3, 2026
9133688
Merge pull request #161 from kbase/dependabot/uv/delta-spark-4.2.0
ialarmedalien Jun 3, 2026
2a7e563
Merge branch 'develop' into dependabot/uv/moto-s3--gte-5.2.1
ialarmedalien Jun 3, 2026
5f93f12
Merge pull request #159 from kbase/dependabot/uv/moto-s3--gte-5.2.1
ialarmedalien Jun 3, 2026
e45d433
replace minio with ceph for testing
mattldawson Jun 3, 2026
38e549d
add diagnostics and simplify integration action
mattldawson Jun 3, 2026
abbcf37
Potential fix for pull request finding
mattldawson Jun 3, 2026
bfecd45
Potential fix for pull request finding
mattldawson Jun 3, 2026
c5cf36a
Add qsv to docker image for xSV linting/validation/etc.
ialarmedalien Jun 3, 2026
252c6df
address copilot comments
mattldawson Jun 3, 2026
ed6cc21
Merge branch 'develop' into develop-170-ceph-testing
mattldawson Jun 3, 2026
203f6c7
update s3 credential test conditions
mattldawson Jun 3, 2026
ae626c0
Merge pull request #172 from kbase/add_csv_lint
ialarmedalien Jun 3, 2026
78d8072
Merge branch 'develop' into develop-170-ceph-testing
mattldawson Jun 3, 2026
2837bb0
reset s3 creds for testing in actions
mattldawson Jun 3, 2026
84d7492
update s3 test conditions
mattldawson Jun 3, 2026
80faf18
reset s3 creds in test
mattldawson Jun 3, 2026
aa85b92
Just download binaries of xml_file_splitter and qsv to install in con…
ialarmedalien Jun 4, 2026
26ce76e
Merge pull request #171 from kbase/develop-170-ceph-testing
ialarmedalien Jun 4, 2026
9fc8eff
Merge branch 'develop' into xml_split_binary_qsv
ialarmedalien Jun 4, 2026
671e3bf
Merge pull request #174 from kbase/xml_split_binary_qsv
ialarmedalien Jun 4, 2026
9ba7ab6
Add decompression of gz file util
ialarmedalien Jun 9, 2026
7d2ccdb
Merge pull request #178 from kbase/add_decompress_file
ialarmedalien Jun 9, 2026
8b820b5
Update CEPH-backed integration tests (#177)
mattldawson Jun 9, 2026
62f0a1d
Add option to NCBI REST pipeline to allow dataset and annotation endp…
ialarmedalien Jun 10, 2026
c5d758c
Merge pull request #183 from kbase/separate_ncbi_requests
ialarmedalien Jun 10, 2026
aa99930
NCBI FTP Pipeline Clean-Up (#184)
mattldawson Jun 15, 2026
cbfb350
Updating vcrpy to version compatible with newest AOIHTTP
ialarmedalien Jun 16, 2026
eaba059
Merge pull request #164 from kbase/update_deps
ialarmedalien Jun 16, 2026
103b824
Merge branch 'main' into develop
ialarmedalien Jun 16, 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
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# Dev Checklist:

- [ ] My code follows the guidelines at https://sites.google.com/lbl.gov/trussresources/home?authuser=0
- [ ] My submission follows the [AI Covenant](/AI_COVENANT.md) principles
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CEPH Integration tests

on:
workflow_call:

push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review

permissions:
contents: read

jobs:
ceph_integration_tests:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Run CEPH-backed integration tests
run: |
docker compose up \
--build \
--abort-on-container-exit \
--exit-code-from integration-tests

- name: Capture compose diagnostics on failure
if: failure()
run: |
echo "=== docker compose ps ==="
docker compose ps -a || true

echo "=== ceph logs ==="
docker logs cdm-data-loaders-ceph-1 || true

echo "=== ceph integration test logs ==="
docker logs cdm-data-loaders-integration-tests-1 || true

echo "=== ceph inspect state ==="
docker inspect cdm-data-loaders-ceph-1 --format '{{json .State}}' || true

echo "=== ceph health state ==="
docker inspect cdm-data-loaders-ceph-1 --format '{{json .State.Health}}' || true

- name: Tear down
if: always()
run: docker compose down --volumes
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ jobs:
- name: Run local tests
shell: bash
continue-on-error: false
run: uv run pytest -m "not requires_spark"
run: uv run pytest -m "not requires_spark and not requires_ceph"
24 changes: 16 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,29 @@
# Dockerfile is based heavily on the example uv dockerfile:
# https://github.com/astral-sh/uv-docker-example

# Pull the pre-built Rust app from ghcr.io
FROM ghcr.io/ialarmedalien/xml_file_splitter:latest AS rust-app

# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.13-trixie-slim

ARG QSV_VERSION="20.1.0"
ARG XML_FILE_SPLITTER_VERSION="v0.1.2"

# Set environment variable to noninteractive to prevent prompts during apt operations
ENV DEBIAN_FRONTEND=noninteractive

# add tini and git
RUN apt-get update -y && apt-get install -y --no-install-recommends tini git ca-certificates && \
rm -rf /var/lib/apt/lists/*

# copy only the compiled xml-file-splitter binary from the Rust image
COPY --from=rust-app /usr/local/bin/xml_file_splitter /usr/local/bin/xml_file_splitter
RUN apt-get update -y && apt-get install -y --no-install-recommends tini git ca-certificates wget unzip && rm -rf /var/lib/apt/lists/*

WORKDIR /tmp

# download and install the xml_file_splitter and qsv binaries, and copy them to /usr/local/bin
RUN wget https://github.com/ialarmedalien/xml_file_splitter/releases/download/${XML_FILE_SPLITTER_VERSION}/xml_file_splitter-aarch64-unknown-linux-gnu.tar.gz && \
tar -xvf xml_file_splitter-aarch64-unknown-linux-gnu.tar.gz && \
mv xml_file_splitter-aarch64-unknown-linux-gnu/xml_file_splitter /usr/local/bin/ && \
# qsv release -- only need the `qsv` binary from it
wget https://github.com/dathere/qsv/releases/download/${QSV_VERSION}/qsv-${QSV_VERSION}-aarch64-unknown-linux-gnu.zip && \
unzip qsv-${QSV_VERSION}-aarch64-unknown-linux-gnu.zip -d /tmp/qsv && \
mv /tmp/qsv/qsv /usr/local/bin/ && \
rm -rf /tmp/*

# Setup a non-root user
RUN groupadd --system --gid 999 nonroot \
Expand Down
103 changes: 100 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ Repo for CDM input data loading and wrangling
- [cdm-data-loaders](#cdm-data-loaders)
- [Environment and python management](#environment-and-python-management)
- [Installation](#installation)
- [Lakehouse and Use with Jupyter notebooks](#lakehouse-and-use-with-jupyter-notebooks)
- [Running import pipelines](#running-import-pipelines)
- [Development](#development)
- [Spark and other non-python dependencies](#spark-and-other-non-python-dependencies)
- [Tests](#tests)
- [CEPH-Backed integration tests (CEPH + NCBI FTP)](#ceph-backed-integration-tests-ceph--ncbi-ftp)
- [Loading genomes, contigs, and features](#loading-genomes-contigs-and-features)
- [Running bbmap stats and checkm2 on genome or contigset files](#running-bbmap-stats-and-checkm2-on-genome-or-contigset-files)

Expand Down Expand Up @@ -48,6 +50,43 @@ To activate a virtual environment with these dependencies installed, run
If you are using IDEs like VSCode, they should pick up the creation of the new environment and offer it for executing python code.


### Lakehouse and Use with Jupyter notebooks

`cdm-data-loaders` can be installed on platforms like the KBase Lakehouse using the same installation steps:

```sh
cd cdm-data-loaders
uv sync
source .venv/bin/activate
```

To use the library in a Jupyter notebook, it must be registered as a Jupyter kernel. After performing the three steps above,
run the following commands:

```sh
uv pip install -e .
uv pip install ipykernel
uv run python -m ipykernel install --user --name cdm-data-loaders --display-name "cdm-data-loaders"
```

The `cdm-data-loaders` kernel should now be available from the dropdown list of kernels in the Jupyter notebook interface.

#### Jupyter Kernel Environment Variables

If you would like to include environment variables for your kernel that are not present in your default environment, you can add them to the `kernel.json` for your new kernel (e.g., in `cdm-data-loaders/.venv/share/jupyter/kernels/python3/kernel.json`):
```json
{
"argv": ["..."],
"display_name": "cdm-data-loaders",
"language": "python",
"env": {
"MY_CUSTOM_VAR": "...",
...
}
}
```


## Running import pipelines

The repo provides a Docker container that can be used to run several import pipelines or to run unit tests for the repo. The [entrypoint script](scripts/entrypoint.sh) parses the container `run` arguments and launches the appropriate functions.
Expand Down Expand Up @@ -103,16 +142,16 @@ See the [BERDataLakehouse/spark_notebook](https://github.com/BERDataLakehouse/sp

Tests are categorised using pytest markers to allow developers to execute some or all the tests. See [pyproject.toml](pyproject.toml) for the markers used.

To run all tests (requires a running Spark instance), execute the command:
To run all tests (requires a running Spark instance and a running CEPH test container), execute the command:

```sh
> uv run pytest
```

To run only tests that do not require Spark, run
To run only tests that do not require Spark or CEPH, run

```sh
> uv run pytest -m "not requires_spark"
> uv run pytest -m "not requires_spark and not requires_ceph"
```

To generate coverage for the tests, run
Expand All @@ -123,6 +162,64 @@ To generate coverage for the tests, run
The standard python `coverage` package is used and coverage can be generated as html or other formats by changing the parameters.


#### CEPH-Backed integration tests (CEPH + NCBI FTP)

End-to-end integration tests for the NCBI assembly pipeline live in `tests/integration/`. They exercise the full flow — manifest diffing, FTP download, S3 promote/archive — against a locally running [CEPH](https://ceph.io/) container and the real NCBI FTP server.

**Requirements:**
- Docker or Podman (for CEPH)
- Network access to `ftp.ncbi.nlm.nih.gov`

**Running with Docker Compose (easiest)**

The [docker-compose.yml](docker-compose.yml) at the repo root defines both a CEPH service and the integration test runner. To build the image, start CEPH, and run the integration tests in one command:

```sh
docker compose up --build --abort-on-container-exit
```

Compose will stream test output to the terminal and exit with the pytest exit code. To clean up afterwards:

```sh
docker compose down --volumes
```

**Running manually**

If you prefer to run the tests directly against a local CEPH instance (e.g. for faster iteration during development), follow the steps below.

**1. Start CEPH locally:**

```sh
docker run -d \
--name ceph \
-p 9000:8080 \
-p 9001:8443 \
-e RGW_PORT=8080 \
-e RGW_ACCESS_KEY=test_access_key \
-e RGW_SECRET_KEY=test_access_secret \
ghcr.io/kbasetest/ceph-rgw-test-image:0.1.5
```

**2. Run the integration tests:**

```sh
> uv run pytest tests/integration/ -m requires_ceph -v
```

**3. Inspect results:**

Buckets are **not** cleaned up after tests. The CEPH dashboard at [http://localhost:9001](http://localhost:9001) (login: `admin` / `admin`) does not support inspecting bucket contents; use the CLI below (e.g. `scripts/s3_local.py ls/head`) to inspect the final state of each test bucket. Each test method creates its own bucket (e.g. `integ-test-promote-dry-run`).

**4. Stop CEPH when done:**

```sh
docker stop ceph && docker rm ceph
```

> **Note:** These tests download real assemblies from NCBI FTP and are inherently slow (~30–60s per assembly). They are also marked `slow_test` so you can exclude them independently: `uv run pytest -m "not slow_test"`.


## Loading genomes, contigs, and features

The [genome loader](src/cdm_data_loaders/parsers/genome_loader.py) can be used to load and integrate data from related GFF and FASTA files. Currently, the loader requires a GFF file and two FASTA files (one for amino acid seqs, one for nucleic acid seqs) for each genome. The list of files to be processed should be specified in the genome paths file, which has the following format:
Expand Down
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
services:
ceph:
image: ghcr.io/kbasetest/ceph-rgw-test-image:0.1.5
environment:
RGW_PORT: "8080"
RGW_ACCESS_KEY: test_access_key
RGW_SECRET_KEY: test_access_secret
ports:
- "9000:8080"
- "9001:8443"
healthcheck:
# Mark healthy only when the RGW/S3 HTTP endpoint is reachable.
test: [ "CMD-SHELL", "curl -fsS http://127.0.0.1:8080/ >/dev/null || wget -q -O- http://127.0.0.1:8080/ >/dev/null" ]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s

integration-tests:
image: cdm-data-loaders-integration-tests:latest
build:
context: .
depends_on:
ceph:
condition: service_healthy
environment:
AWS_ENDPOINT_URL: http://ceph:8080
AWS_ACCESS_KEY_ID: test_access_key
AWS_SECRET_ACCESS_KEY: test_access_secret
entrypoint: [ "/app/scripts/entrypoint.sh", "ceph_integration_test" ]
command: []
Loading
Loading