Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d67dfb3
adding beegfs globus endpoint to config.yaml for bl832
davramov Apr 21, 2026
15ac2d9
updating move.py to copy to beegfs
davramov Apr 21, 2026
4be93ed
adding tiled[client] to requirements
davramov Apr 21, 2026
ad329db
adding beegfs globus endpoint to config.yaml for bl832
davramov Apr 21, 2026
6b5f297
adding orchestration/tiled.py for ingesting data on beegfs
davramov Apr 21, 2026
8b36f10
cleaning up
davramov Apr 21, 2026
6f8ff1d
Adding todo note
davramov Apr 21, 2026
b1db5f5
fixing bad import statement
davramov Apr 21, 2026
3af7f2f
adding beegfs endpoint to unit tests
davramov Apr 21, 2026
d6ba153
pointing beegfs root_path to the correct directory
davramov Apr 24, 2026
1502dc6
adding tags to ingested data
davramov Apr 24, 2026
1e7422f
removing TILED_API_KEY from tiled.py
davramov May 4, 2026
38c0d66
removing check tags logic from main, moving it to a new method (check…
davramov May 4, 2026
c4657f4
Removing requirements.txt, moving any missing deps to pyproject.toml,…
davramov May 4, 2026
d379612
moving load_dotenv() to top of the module
davramov May 5, 2026
1d91f7e
moving _apply_tags() into a prefect task, logger.info -> logger.debug…
davramov May 5, 2026
187977c
Adding register_file_to_tiled() call to move.py
davramov May 6, 2026
254a1b9
Adding calls to register_file_to_tiled() from nersc_recon_flow() for …
davramov May 6, 2026
6184013
Adding TILED_URI to .env.example
davramov May 6, 2026
9b6579a
Adding BEAMLINE=<> to .env.example
davramov May 6, 2026
21536f8
Making register_file_to_tiled() sync to fix async/sync nesting. Examp…
davramov May 6, 2026
9b7470a
adding beegfs copy to nersc.py
davramov May 6, 2026
10bd2aa
create unit tests in test_tiled.py
davramov May 6, 2026
239269c
Only transferring Zarrs to Beegfs and ingesting into Tiled; not trans…
davramov May 20, 2026
332a02b
pytest fixes to avoid a few warnings
davramov May 20, 2026
4d62c29
Adding zarr->beegfs transfer and tiled ingestion to the ALCF reconstr…
davramov May 20, 2026
2b7dabf
removing the scratch tag for tiled ingestion
davramov May 20, 2026
1502807
fixing broken import
davramov May 20, 2026
6c703f0
Adding beegfs/bl832/scratch endpoint
davramov May 20, 2026
ee355b4
adding beegfs endpoints to test_globus_flow.py
davramov May 20, 2026
116bb97
trying to reduce pytest warnings
davramov May 20, 2026
210f9bc
linting
davramov May 26, 2026
48403d0
Adding TILED_URI and TILED_API_KEY to login helper script
davramov May 26, 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
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
BEAMLINE=<832>
GLOBUS_CLIENT_ID=<globus_client_id>
GLOBUS_CLIENT_SECRET=<globus_client_secret>
PREFECT_API_URL=<url_of_prefect_server>
PREFECT_API_KEY=<prefect_client_secret>
PUSHGATEWAY_URL=<url_of_pushgateway_server>
JOB_NAME=<jobname_for_pushgateway>
INSTANCE_LABEL=<label_for_pushgateway>
INSTANCE_LABEL=<label_for_pushgateway>
TILED_URI=<url_of_tiled_server>
6 changes: 2 additions & 4 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ jobs:
with:
python-version: 3.11
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --no-cache-dir --upgrade pip
pip install --no-cache-dir flake8 pytest
pip install --no-cache-dir .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip install -e . --group dev
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
12 changes: 12 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ globus:
uuid: df82346e-9a15-11ea-b3c4-0ae144191ee3
name: nersc832

bl832-beegfs-raw:
root_path: /global/beegfs/beamlines/bl832/raw/
uri: beegfs.als.lbl.gov
uuid: d33b5d6e-1603-414e-93cb-bcb732b7914a
name: bl832-beegfs-raw

bl832-beegfs-scratch:
root_path: /global/beegfs/beamlines/bl832/scratch/
uri: beegfs.als.lbl.gov
uuid: d33b5d6e-1603-414e-93cb-bcb732b7914a
name: bl832-beegfs-scratch

globus_apps:
als_transfer:
client_id: ${GLOBUS_CLIENT_ID}
Expand Down
27 changes: 25 additions & 2 deletions orchestration/_tests/test_globus_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def __init__(self) -> None:
MockSecret.for_endpoint("nersc832_alsdev_scratch")),
"alcf832_raw": MockEndpoint("mock_alcf832_raw_path", MockSecret.for_endpoint("alcf832_raw")),
"alcf832_scratch": MockEndpoint("mock_alcf832_scratch_path", MockSecret.for_endpoint("alcf832_scratch")),
"beegfs_raw": MockEndpoint("mock_beegfs_raw_path", MockSecret.for_endpoint("beegfs_raw")),
"beegfs_scratch": MockEndpoint("mock_beegfs_scratch_path", MockSecret.for_endpoint("beegfs_scratch"))
}

# Mock apps
Expand All @@ -169,6 +171,8 @@ def __init__(self) -> None:
self.data832_raw = self.endpoints["data832_raw"]
self.data832_scratch = self.endpoints["data832_scratch"]
self.nersc832_alsdev_scratch = self.endpoints["nersc832_alsdev_scratch"]
self.beegfs_raw = self.endpoints["beegfs_raw"]
self.beegfs_scratch = self.endpoints["beegfs_scratch"]
self.scicat = config["scicat"]


Expand Down Expand Up @@ -202,10 +206,16 @@ async def mock_run_deployment(*args, **kwargs):

# Mock asyncio.gather to avoid actual async task execution
async def mock_gather(*args, **kwargs):
# Await any coroutines so we don't leak warnings, but don't care about results
for arg in args:
if asyncio.iscoroutine(arg):
try:
await arg
except Exception:
pass
return [None]

mocker.patch('asyncio.gather', new=mock_gather)

# Import decision flow after mocking the necessary components
from orchestration.flows.bl832.dispatcher import dispatcher

Expand Down Expand Up @@ -250,6 +260,8 @@ def test_alcf_recon_flow(mocker: MockFixture):
"nersc832_alsdev_recon_scripts": mocker.MagicMock(),
"alcf832_raw": mocker.MagicMock(),
"alcf832_scratch": mocker.MagicMock(),
"bl832-beegfs-raw": mocker.MagicMock(),
"bl832-beegfs-scratch": mocker.MagicMock()
}
)
mocker.patch(
Expand Down Expand Up @@ -306,6 +318,17 @@ def test_alcf_recon_flow(mocker: MockFixture):
return_value=True
)

mocker.patch(
"orchestration.flows.bl832.alcf.schedule_prefect_flow",
return_value=None
)

# Patch ingestion to Tiled
mocker.patch(
"orchestration.flows.bl832.alcf.register_file_to_tiled",
return_value=None
)

file_path = "/global/raw/transfer_tests/test.h5"

# ---------- CASE 1: SUCCESS PATH ----------
Expand All @@ -315,7 +338,7 @@ def test_alcf_recon_flow(mocker: MockFixture):

result = alcf_recon_flow(file_path=file_path, config=mock_config)
assert result is True, "Flow should return True if HPC + Tiff->Zarr + transfers all succeed"
assert mock_transfer_controller.copy.call_count == 3, "Should do 3 transfers in success path"
assert mock_transfer_controller.copy.call_count == 4, "Should do 4 transfers in success path"
mock_hpc_reconstruct.assert_called_once()
mock_hpc_multires.assert_called_once()
mock_schedule_pruning.assert_called_once()
Expand Down
Loading
Loading