-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
101 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docs | ||
tests | ||
.github | ||
.nox | ||
.venv |
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- 'docs/**' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
|
||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.10', '3.11', '3.12', '3.13'] | ||
|
||
env: | ||
OBSERVATORY: 'LCO' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
uv sync --no-dev --frozen | ||
- name: Test with pytest | ||
run: | | ||
uv pip install pytest pytest-mock pytest-asyncio pytest-cov | ||
uv run pytest | ||
# - name: Upload coverage to Codecov | ||
# uses: codecov/codecov-action@v5 | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# files: ./coverage.xml |
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,7 +1,8 @@ | ||
FROM python:3.11-slim-bookworm | ||
FROM python:3.12-slim-bookworm | ||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ | ||
|
||
MAINTAINER Jose Sanchez-Gallego, [email protected] | ||
LABEL org.opencontainers.image.source https://github.com/sdss/lvmguider | ||
LABEL org.opencontainers.image.authors="Jose Sanchez-Gallego, [email protected]" | ||
LABEL org.opencontainers.image.source=https://github.com/sdss/lvmguider | ||
|
||
WORKDIR /opt | ||
|
||
|
@@ -15,22 +16,25 @@ COPY docker/matplotlibrc /root/.config/matplotlib/ | |
COPY docker/LiberationSerif-Regular.ttf /usr/share/fonts/ | ||
|
||
# Refresh system font cache | ||
RUN apt update -y | ||
RUN apt install -y fontconfig | ||
RUN apt-get update -y | ||
RUN apt-get install -y fontconfig | ||
RUN fc-cache -f -v | ||
|
||
# Refresh matplotlib font cache | ||
RUN rm -fr ~/.cache/matplotlib | ||
|
||
RUN apt install -y build-essential | ||
RUN apt install -y astrometry.net | ||
RUN apt-get install -y build-essential | ||
RUN apt-get install -y astrometry.net | ||
|
||
# Ignore warnings about installing as packages with pip as root. | ||
ENV PIP_ROOT_USER_ACTION=ignore | ||
|
||
RUN pip3 install -U pip setuptools wheel | ||
RUN cd lvmguider && pip3 install . | ||
RUN rm -Rf lvmguider | ||
ENV UV_COMPILE_BYTECODE=1 | ||
ENV UV_LINK_MODE=copy | ||
ENV PATH="$PATH:/opt/lvmguider/.venv/bin" | ||
|
||
# Sync the project | ||
RUN cd lvmguider && uv sync --frozen --no-cache --no-dev | ||
|
||
# Set umask so that new files inherit the parent folder permissions. | ||
# Not sure this works so we are also setting the permissions in the entrypoint. | ||
|
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,5 +1,5 @@ | ||
#!/bin/bash | ||
umask 0002 | ||
|
||
pip3 install -U astropy-iers-data | ||
uv pip install -U astropy-iers-data | ||
exec "$@" |