-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #405 from LCOGT/bugfix/cals-by-block-migrate
Fixes to migration from cals by block.
- Loading branch information
Showing
30 changed files
with
4,175 additions
and
1,183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,7 @@ distribute-*.tar.gz | |
*.xml | ||
|
||
*.iml | ||
|
||
.tmp | ||
|
||
.tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Code Style | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest # Or macos-latest if needed | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # Specify your desired version | ||
- name: Install Poetry | ||
run: pip install poetry | ||
- name: Set up project | ||
run: poetry install -E cpu -E style | ||
- name: Code Style | ||
run: poetry run pycodestyle --count --max-line-length=120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Coverage | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest # Or macos-latest if needed | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # Specify your desired version | ||
- name: Install Poetry | ||
run: pip install poetry | ||
- name: Set up project | ||
run: poetry install -E cpu -E test | ||
- name: Run coverage | ||
run: poetry run pytest --pyargs banzai.tests -m "not e2e" --cov banzai --cov-config="setup.cfg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest # Or macos-latest if needed | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' # Specify your desired version | ||
- name: Install dependencies | ||
run: pip install poetry | ||
- name: Set up project | ||
run: poetry install -E cpu -E docs | ||
- name: Build Docs | ||
run: poetry run sphinx-build -W -b html docs docs/_build/html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,41 @@ | ||
name: Build/Test | ||
|
||
on: | ||
# Run this workflow for pushes on all branches | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
tests: | ||
name: ${{ matrix.name }} (${{ matrix.os }}, ${{ matrix.toxenv }}) | ||
runs-on: ${{ matrix.os }} | ||
linuxtest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
|
||
- name: Documentation build | ||
os: ubuntu-latest | ||
python-version: 3.9 | ||
toxenv: build_docs | ||
|
||
- name: Python 3.9 with minimal dependencies | ||
os: ubuntu-latest | ||
python-version: '3.9' | ||
toxenv: py39-test | ||
|
||
- name: Python 3.10 with minimal dependencies | ||
os: ubuntu-latest | ||
python-version: '3.10' | ||
toxenv: py310-test | ||
|
||
- name: Python 3.11 with minimal dependencies | ||
os: ubuntu-latest | ||
python-version: '3.11' | ||
toxenv: py311-test | ||
|
||
- name: Code style checks | ||
os: ubuntu-latest | ||
python-version: 3.9 | ||
toxenv: codestyle | ||
|
||
python-version: ['3.10', '3.11', '3.12', '3.13'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
run: pip install poetry | ||
- name: Set up project | ||
run: poetry install -E cpu -E test | ||
- name: Run tests | ||
run: poetry run pytest --pyargs banzai.tests -m "not e2e" | ||
macos: # New macOS job | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.12'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
- name: Install graphviz dependency | ||
if: "endsWith(matrix.toxenv, 'build_docs')" | ||
run: sudo apt-get -y install graphviz | ||
- name: Run tests | ||
run: | | ||
tox -e ${{ matrix.toxenv }} | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
run: pip install poetry | ||
- name: Set up project | ||
run: poetry install -E cpu -E test | ||
- name: Run tests | ||
run: poetry run pytest --pyargs banzai.tests -m "not e2e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
FROM continuumio/miniconda3:23.5.2-0 | ||
|
||
# In principle I could remove the gcc to shrink the image, but pytorch is already so large it doesn't make much difference | ||
RUN apt-get -y update && apt-get -y install gcc && \ | ||
apt-get autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
FROM python:3.12-slim | ||
|
||
# Make a non-privledged user to run the pipeline | ||
RUN mkdir /home/archive && /usr/sbin/groupadd -g 10000 "domainusers" \ | ||
&& /usr/sbin/useradd -g 10000 -d /home/archive -M -N -u 10087 archive \ | ||
&& chown -R archive:domainusers /home/archive | ||
|
||
USER archive | ||
|
||
ENV HOME=/home/archive | ||
RUN pip install poetry --no-cache | ||
|
||
WORKDIR /home/archive | ||
RUN apt-get -y update && apt-get -y install gcc procps && \ | ||
apt-get autoclean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY environment.yaml . | ||
RUN poetry config virtualenvs.create false | ||
|
||
RUN . /opt/conda/etc/profile.d/conda.sh && conda config --set remote_read_timeout_secs 900 && conda env create -p /home/archive/envs/banzai -f environment.yaml --solver=libmamba | ||
COPY pyproject.toml poetry.lock /lco/banzai/ | ||
|
||
COPY --chown=10087:10000 . /lco/banzai | ||
RUN poetry install --directory=/lco/banzai -E cpu --no-root --no-cache | ||
|
||
ENV PATH=/home/archive/envs/banzai/bin:$PATH | ||
COPY . /lco/banzai | ||
|
||
RUN /home/archive/envs/banzai/bin/pip install --no-cache-dir /lco/banzai/ | ||
RUN poetry install --directory /lco/banzai -E cpu --no-cache | ||
|
||
RUN cp /lco/banzai/pytest.ini /home/archive/pytest.ini | ||
|
||
USER archive | ||
|
||
ENV HOME=/home/archive | ||
|
||
WORKDIR /home/archive |
Oops, something went wrong.