Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

Repository of workflows for the ISS beamline.

This repository superseded the [old workflows repo](https://github.com/NSLS-II-ISS/iss-workflows) and is meant to be used with the modern Prefect3 deployment.
This repository superseded the
[old workflows repo](https://github.com/NSLS-II-ISS/iss-workflows) and is meant
to be used with the modern Prefect3 deployment.
8 changes: 3 additions & 5 deletions data_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
from prefect.blocks.system import Secret
from tiled.client import from_profile

BEAMLINE_OR_ENDSTATION = "!!! Set the endstation or beamline_TLA here !!!"


@task(retries=2, retry_delay_seconds=10)
def read_all_streams(uid, beamline_acronym=BEAMLINE_OR_ENDSTATION):
def read_all_streams(uid, beamline_acronym="iss"):
logger = get_run_logger()
api_key = Secret.load(f"tiled-{beamline_acronym}-api-key", _sync=True).get()
tiled_client = from_profile("nsls2", api_key=api_key)
Expand All @@ -27,5 +25,5 @@ def read_all_streams(uid, beamline_acronym=BEAMLINE_OR_ENDSTATION):


@flow(log_prints=True)
def data_validation(uid):
read_all_streams(uid)
def data_validation(uid, beamline_acronym="iss"):
read_all_streams(uid, beamline_acronym=beamline_acronym)
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ platforms = ["linux-64"]
[dependencies]
prefect = "3.*"
python = "<3.14"
tiled-client = ">=0.2.3"
tiled = ">=0.2.3"
prefect-docker = "*"
bluesky-tiled-plugins = ">=2"
19 changes: 11 additions & 8 deletions prefect.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: prefect-docker-pixi-tiled-tla
name: prefect-docker-pixi-tiled-iss
prefect-version: 3.6.10

build: null
Expand All @@ -9,14 +9,14 @@ pull:
- prefect.deployments.steps.set_working_directory:
directory: /repo
- prefect.deployments.steps.git_clone:
repository: https://github.com/nsls2/nsls2-workflows-template.git
repository: https://github.com/nsls2/iss-workflows.git
branch: main

deployments:
- name: tla-end-of-run-workflow-docker
- name: iss-end-of-run-workflow-docker
version: 0.1.1
tags:
- tla
- iss
- main
description: Deploy the updated Docker image
entrypoint: end_of_run_workflow.py:end_of_run_workflow
Expand All @@ -26,13 +26,16 @@ deployments:
job_variables:
env:
TILED_SITE_PROFILES: /nsls2/software/etc/tiled/profiles
image: ghcr.io/nsls2/nsls2-workflows-template:main
image: ghcr.io/nsls2/iss-workflows:main
image_pull_policy: Always
network: slirp4netns
volumes:
- /nsls2/data/tla/proposals:/nsls2/data/tla/proposals
- /nsls2/data/iss/proposals:/nsls2/data/iss/proposals
- /nsls2/data3/iss/proposals:/nsls2/data3/iss/proposals
- /nsls2/data/iss/legacy:/nsls2/data/iss/legacy # To be removed after data security work is completed
- /nsls2/data3/iss/legacy:/nsls2/data3/iss/legacy # To be removed after data security work is completed
- /nsls2/software/etc/tiled:/nsls2/software/etc/tiled
container_create_kwargs:
userns_mode: "keep-id:uid=402xxx,gid=402xxx" # workflow-tla:workflow-tla
userns_mode: "keep-id:uid=402955,gid=402955" # workflow-iss:workflow-iss
auto_remove: true
name: tla-work-pool-docker
name: iss-work-pool-docker
Loading