Skip to content

Commit

Permalink
Merge pull request #174 from DassHydro/maintenance/1.0.x
Browse files Browse the repository at this point in the history
Maintenance/1.0.x
  • Loading branch information
inoelloc authored Apr 30, 2024
2 parents 9a7ef92 + c2d3c76 commit 0094e24
Show file tree
Hide file tree
Showing 4,240 changed files with 55,654 additions and 154,092 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
48 changes: 48 additions & 0 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will check code (tapenade compare and ruff check)
name: Code Checks

on:

push:
branches:
- main

pull_request:
branches:
- main
- maintenance/**

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
ubuntu:
name: Code checks ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential openjdk-17-jdk
python -m venv test
. test/bin/activate
python -m pip install --upgrade pip
pip install ruff
- name: Tapenade Compare
run: |
make tap-cmp
- name: Ruff Check
run: |
. test/bin/activate
make check
36 changes: 22 additions & 14 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will generate the documentation
# This workflow will build the doc
name: Documentation

on:
Expand All @@ -17,25 +17,33 @@ on:

jobs:
ubuntu:
name: (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
name: Documentation ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential make gcc gfortran gdal-bin libgdal-dev
sudo apt-get install build-essential gfortran
python -m venv test
. test/bin/activate
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Build and Install
pip install -r requirements-dev.txt
- name: Build
run: |
. test/bin/activate
make
- name: Generate Documentation
- name: Build Documentation
run: |
. test/bin/activate
make doc
35 changes: 0 additions & 35 deletions .github/workflows/tap-cmp.yml

This file was deleted.

31 changes: 21 additions & 10 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,36 @@ on:

jobs:
ubuntu:
name: (${{ matrix.os }})
runs-on: ${{ matrix.os }}
name: Unit tests ubuntu-latest py-${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
python-version: ['3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential make gcc gfortran gdal-bin libgdal-dev
sudo apt-get install build-essential gfortran
python -m venv test
. test/bin/activate
python -m pip install --upgrade pip
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Build and Install
pip install -r requirements-dev.txt
- name: Build
run: |
. test/bin/activate
make
- name: Run Tests
run: |
. test/bin/activate
make test
52 changes: 52 additions & 0 deletions .github/workflows/wheel.yml
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] }}
70 changes: 66 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,74 @@
**/__pycache__
__pycache__
# https://github.com/github/gitignore/blob/main/Python.gitignore

**/.f2py*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
wheelhouse/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Fortran module files
*.mod
*.smod

# Fortran wrapping files
.f2py*
src.*
f90wrap*.f90
**/fcore/_m*.py

# Tapenade files
tapenade/*.msg*
tapenade/*.f90*
tapenade/*~

**/tmp*
# Temporary files
tmp*
*.kate-swp

# Documentation files
doc/source/api_reference/**/smash
doc/*-dataset
34 changes: 13 additions & 21 deletions Dockerfile
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"]
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit 0094e24

Please sign in to comment.