Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3980504
add Docker and environment-associated files
JunAishima Aug 19, 2025
c9f8eb3
add precommit file
JunAishima Aug 19, 2025
447385e
add pixi files
JunAishima Aug 21, 2025
025b25d
update prefect.yaml for new system and repos
JunAishima Aug 21, 2025
d16e41e
update dependencies after finding a problem with mass
JunAishima Aug 21, 2025
4c98dfc
consistent naming for deployment name
JunAishima Aug 21, 2025
f020e6a
add script for running deployment
JunAishima Aug 21, 2025
cacc674
update version number
JunAishima Aug 21, 2025
ec2b2d4
update Dockerfile for Podman
JunAishima Sep 2, 2025
8c41d33
multiple settings
JunAishima Sep 2, 2025
5932bf0
add config file directory
JunAishima Sep 4, 2025
c512d97
update code location to NSLS-II-SST
JunAishima Sep 7, 2025
5764d16
build/push image from github action
JunAishima Sep 16, 2025
98efa0a
update branch name, update repo name
JunAishima Sep 16, 2025
70c2469
use --locked for pixi
JunAishima Sep 16, 2025
fa0b53e
remove Prefect run-post-link option
JunAishima Sep 17, 2025
5b01ab1
auto_remove of containers after running set to true
JunAishima Sep 17, 2025
93f1026
remove commented-outline
JunAishima Sep 17, 2025
4246d34
fix time zone name
JunAishima Sep 17, 2025
84309ce
update pre-commit-related actions
JunAishima Oct 2, 2025
041a9b1
lint: pre-commit fixes
JunAishima Oct 2, 2025
694c5ff
prevent pixi files from being modified
JunAishima Oct 2, 2025
59ec2b6
lint: fix pre-commit issues
JunAishima Oct 2, 2025
170de38
remove file not usable by beamline staff
JunAishima Oct 2, 2025
a12fe92
remove unnecessary line
JunAishima Oct 2, 2025
639bb06
do not use ENV field, do not pass in Tiled API key
JunAishima Oct 6, 2025
5d45c6b
refactor to use common get_tiled_client() function
JunAishima Oct 6, 2025
3fc90d2
add fix to problem during deployment
JunAishima Oct 6, 2025
b065057
ensure latest image is pulled
JunAishima Oct 6, 2025
5976d44
lint: pre-commit fixes
JunAishima Oct 6, 2025
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
91 changes: 79 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,91 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autofix_commit_msg: "style: pre-commit fixes"

exclude: ^.cruft.json|.copier-answers.yml$

repos:
- repo: https://github.com/adamchainz/blacken-docs
rev: "1.19.1"
hooks:
- id: blacken-docs
additional_dependencies: [black==24.*]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: "v5.0.0"
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-ast
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: requirements-txt-fixer
- id: trailing-whitespace

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/rbubley/mirrors-prettier
rev: "v3.5.3"
hooks:
- id: prettier
types_or: [yaml, markdown, html, css, scss, javascript, json]
args: [--prose-wrap=always]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.11.11"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.15.0"
hooks:
- id: mypy
files: src|tests
args: []
additional_dependencies:
- pytest

- repo: https://github.com/codespell-project/codespell
rev: "v2.4.1"
hooks:
- id: codespell
additional_dependencies:
- tomli; python_version<'3.11'

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: "v0.10.0.1"
hooks:
- id: shellcheck

- repo: local
hooks:
- id: disallow-caps
name: Disallow improper capitalization
language: pygrep
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
exclude: .pre-commit-config.yaml

- repo: https://github.com/timothycrosley/isort
rev: 5.9.3
- repo: https://github.com/abravalheri/validate-pyproject
rev: "v0.24.1"
hooks:
- id: isort
- id: validate-pyproject
additional_dependencies: ["validate-pyproject-schema-store[all]"]

- repo: https://github.com/psf/black
rev: 22.3.0
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.33.0"
hooks:
- id: black
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM ghcr.io/prefix-dev/pixi:latest

ENV TZ="America/New York"

RUN apt-get -y update && \
apt-get -y install git

COPY pixi.toml .
COPY pixi.lock .
# use `--locked` to ensure the lockfile is up to date with pixi.toml
RUN pixi config set --local run-post-link-scripts insecure
RUN pixi install --frozen
# create the shell-hook bash script to activate the environment
RUN pixi shell-hook -s bash > /shell-hook

ENV PYTHONUNBUFFERED=1
# either here or when docker run is done, make sure that the TILED_SITE_PROFILES directory on disk is mounted to the container. this will be necessary for data access. we will also need to allow outside network access from the container to get data from tiled

COPY test.py .

ENV TILED_API_KEY=""
RUN mkdir /etc/tiled
RUN mkdir /.prefect -m 0777
RUN mkdir /repo -m 0777
RUN /bin/bash /shell-hook

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