Skip to content

Commit bf592d2

Browse files
authored
Merge pull request #17 from JunAishima/standardize_workflows_dt1-1282
Standardize workflows dt1 1282
2 parents 0b7ffc9 + ee0d351 commit bf592d2

8 files changed

Lines changed: 2855 additions & 3584 deletions

File tree

.github/workflows/publish-ghcr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Create and publish a Docker image
44
# Configures this workflow to run every time a change is pushed to the branch called `release`.
55
on:
66
push:
7-
branches: ['main']
7+
branches: ["main"]
88

99
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
1010
env:
@@ -49,7 +49,7 @@ jobs:
4949
push: true
5050
tags: ${{ steps.meta.outputs.tags }}
5151
labels: ${{ steps.meta.outputs.labels }}
52-
52+
5353
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
5454
- name: Generate artifact attestation
5555
uses: actions/attest-build-provenance@v3

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ghcr.io/prefix-dev/pixi:latest
1+
FROM ghcr.io/prefix-dev/pixi:0.57.0
22

33
ENV TZ="America/New_York"
44

55
RUN apt-get -y update && \
6-
apt-get -y install git
6+
apt-get -y install git tzdata
77

88
COPY pixi.toml .
99
COPY pixi.lock .
@@ -14,7 +14,7 @@ RUN pixi shell-hook -s bash > /shell-hook
1414

1515
ENV PYTHONUNBUFFERED=1
1616

17-
COPY test.py .
17+
COPY default.py .
1818

1919
RUN mkdir /etc/tiled
2020
RUN mkdir /.prefect -m 0777
@@ -24,4 +24,4 @@ RUN /bin/bash /shell-hook
2424

2525
#now reapply deployment to push the image that is being created
2626
ENTRYPOINT ["pixi", "run"]
27-
CMD ["python", "-m", "test", "arg"]
27+
CMD ["python", "-m", "default", "arg"]

default.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from __future__ import annotations
2+
3+
import prefect
4+
import subprocess
5+
import sys
6+
import tiled
7+
8+
9+
def print_argument(argument_to_print=""):
10+
if argument_to_print:
11+
print(f"argument to print: {argument_to_print}") # noqa: T201
12+
else:
13+
print("argument to print: EMPTY") # noqa: T201
14+
15+
16+
def info():
17+
print(f"Prefect info: {prefect.__version_info__}")
18+
print(f"Tiled info: {tiled.__version__}")
19+
output = subprocess.check_output(["pixi", "--version"])
20+
print(f"Pixi info: {output.decode().strip()}")
21+
22+
23+
if __name__ == "__main__":
24+
info()
25+
if len(sys.argv) > 1:
26+
print_argument(sys.argv[1])
27+
else:
28+
print_argument()

pixi.lock

Lines changed: 2815 additions & 3503 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ name = "prefect3 test"
44
platforms = ["linux-64"]
55

66
[dependencies]
7-
bluesky-tiled-plugins = ">=2.0.0b69"
8-
prefect = "==3.4.6"
9-
tiled-client = ">=0.1.6"
7+
bluesky-tiled-plugins = ">=2"
8+
prefect = ">=3.4.6"
9+
python = "<3.14"
10+
tiled-client = ">=0.2.3"
1011
prefect-docker = "*"
1112
h5py = "*"
1213
numpy = "*"

prefect.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Generic metadata about this project
66
name: workflows
7-
prefect-version: 2.13.0
7+
prefect-version: 3.6.10
88

99
# build section allows you to manage and build docker images
1010
build: null
@@ -23,7 +23,7 @@ pull:
2323
# the deployments section allows you to provide configuration for deploying flows
2424
deployments:
2525
- name: hex-end-of-run-workflow-docker
26-
version: 0.1.1
26+
version: 0.1.2
2727
tags:
2828
- hex
2929
- main

prefect_v2.yaml

Lines changed: 0 additions & 53 deletions
This file was deleted.

test.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)