-
Notifications
You must be signed in to change notification settings - Fork 6
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
30 changed files
with
921 additions
and
1,334 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
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,52 @@ | ||
# This is partially adopted from scipy. | ||
# See: https://github.com/scipy/scipy/blob/main/.github/workflows/wheels.yml | ||
# License: 3-clause BSD, https://github.com/scipy/scipy/blob/main/LICENSE.txt | ||
|
||
name: Wheels | ||
|
||
# Controls when the action will run. | ||
on: | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
- maintenance/** | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheel ${{ matrix.python-version }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }} | ||
runs-on: ${{ matrix.buildplat[0] }} | ||
strategy: | ||
matrix: | ||
buildplat: | ||
- [ubuntu-latest, manylinux, x86_64] | ||
|
||
python-version: ['cp39', 'cp310', 'cp311'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python-version }}-${{ matrix.buildplat[1] }}* | ||
CIBW_ARCHS: ${{ matrix.buildplat[2] }} | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
name: ${{ matrix.python-version }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }} |
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ parts/ | |
sdist/ | ||
var/ | ||
wheels/ | ||
wheelhouse/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.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 |
---|---|---|
@@ -1,23 +1,15 @@ | ||
FROM ubuntu:22.04 | ||
# Derived from Pandas | ||
FROM python:3.11 | ||
WORKDIR /home/smash | ||
|
||
ADD . /app/ | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
RUN apt-get update && apt-get -y upgrade | ||
RUN apt-get install -y \ | ||
build-essential \ | ||
make \ | ||
openjdk-11-jre-headless \ | ||
gcc \ | ||
gfortran \ | ||
gdal-bin \ | ||
libgdal-dev \ | ||
python3-pip | ||
|
||
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/ | ||
|
||
RUN export JAVA_HOME | ||
|
||
RUN pip3 install -r requirements-dev.txt | ||
|
||
RUN make | ||
openjdk-17-jdk \ | ||
gfortran | ||
|
||
RUN python -m pip install --upgrade pip | ||
COPY requirements-dev.txt /tmp | ||
RUN python -m pip install -r /tmp/requirements-dev.txt | ||
RUN git config --global --add safe.directory /home/smash | ||
CMD ["/bin/bash"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#% Build smash | ||
all: | ||
pip install . | ||
|
||
#% Build smash in editable mode | ||
edit: | ||
pip install --no-build-isolation --config-settings=editable-verbose=true --editable . | ||
|
||
#% Generate tapenade file (adjoint and tangent linear models) | ||
tap: | ||
make -C tapenade | ||
|
||
#% Compare tapenade file | ||
tap-cmp: | ||
make tap-cmp -C tapenade | ||
|
||
#% Generate sphinx documentation | ||
doc: | ||
make html -C doc | ||
|
||
#% Clean sphinx documentation | ||
doc-clean: | ||
make clean -C doc | ||
|
||
#% Testing code with pytest | ||
test: | ||
cd smash/tests ; pytest | ||
|
||
#% Testing code with pytest and coverage | ||
test-coverage: | ||
cd smash/tests ; pytest --cov-report term --cov-report html --cov=smash | ||
|
||
#% Generate baseline for test with args (see argparser in gen_baseline.py) | ||
test-baseline: | ||
cd smash/tests ; python3 gen_baseline.py | ||
|
||
#% Format Python files with ruff and Fortran files with fprettify | ||
format: | ||
ruff format | ||
fprettify -e forward_db.f90 -e f90wrap -f .f90 --indent 4 -r smash | ||
|
||
#% Check Python files with ruff linters | ||
check: | ||
ruff check --fix --exit-non-zero-on-fix | ||
|
||
#% Clean | ||
clean: | ||
@rm -rf build | ||
|
||
.PHONY: all edit tap tap-cmp doc doc-clean test test-baseline format check clean |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.