Skip to content

Commit f110633

Browse files
authored
Merge pull request #17 from JunAishima/standardize_workflows_dt1-1282
Standardize workflows dt1 1282
2 parents 143e8fb + 68ff32d commit f110633

File tree

5 files changed

+35
-1624
lines changed

5 files changed

+35
-1624
lines changed

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()

0 commit comments

Comments
 (0)