Skip to content

Commit

Permalink
Merge branch 'develop' into feature/ufunc_field_decorators
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnav committed Oct 9, 2023
2 parents 1c32124 + 2c33155 commit 926cb80
Show file tree
Hide file tree
Showing 159 changed files with 3,778 additions and 3,319 deletions.
12 changes: 2 additions & 10 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ max-line-length = 120
ignore =
# E203 is not PEP 8 compliant. https://github.com/PyCQA/pycodestyle/issues/373
E203
# Not worrying about spaces around arithmetic operations
E226
# Linebreaks before/after unary operators are okay
W503, W504
exclude =
Expand All @@ -27,29 +25,23 @@ per-file-ignores =
# systems/versions of MPI:
libensemble/tests/standalone_tests/mpi_launch_test/create_mpi_jobs.py:E402

# Similar reasoning for configuring mpi4py
libensemble/tests/unit_tests/test_executor.py:E402

# Matplotlib needs something set before import
scripts/*:E402

# Ignoring linelength in APOSMM
libensemble/gen_funcs/*aposmm.py:E501
examples/gen_funcs/*aposmm.py:E501
libensemble/tests/functionality_tests/test_mpi_runners.py:E501
libensemble/tests/functionality_tests/test_mpi_runners_zrw_supernode_uneven.py:E501

# Need to set something before the APOSMM import
libensemble/tests/scaling_tests/warpx/run_libensemble_on_warpx.py:E402
examples/calling_scripts/run_libensemble_on_warpx.py:E402
libensemble/gen_funcs/persistent_aposmm.py:E402, E501
libensemble/tests/regression_tests/test_persistent_aposmm*:E402
libensemble/tests/regression_tests/test_with_app_persistent_aposmm_tao_nm.py:E402
libensemble/tests/regression_tests/test_persistent_gp_multitask_ax.py:E402
libensemble/tests/regression_tests/test_ytopt_heffte.py:E402
libensemble/tests/functionality_tests/test_uniform_sampling_then_persistent_localopt_runs.py:E402
libensemble/tests/functionality_tests/test_active_persistent_worker_abort.py:E402
libensemble/tests/functionality_tests/test_mpi_runners.py:E501
libensemble/tests/functionality_tests/test_mpi_runners_zrw_supernode_uneven.py:E501
libensemble/tests/deprecated_tests/test_old_aposmm*:E402
libensemble/tests/unit_tests/test_persistent_aposmm.py:E402

# Allow undefined name '__version__'
Expand Down
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ updates:
directory: /
schedule:
interval: daily
target-branch: "develop"

- package-ecosystem: pip
directory: /
schedule:
interval: daily
target-branch: "develop"

- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: daily
target-branch: "develop"
162 changes: 162 additions & 0 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
name: libEnsemble-simple-CI

on:
pull_request:
types:
- ready_for_review
- opened
- reopened
- synchronize

jobs:
test-libE:
if: '! github.event.pull_request.draft'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
mpi-version: [mpich]
python-version: [3.9, "3.10", "3.11"]
comms-type: [m, l]
include:
- os: macos-latest
python-version: 3.9
mpi-version: "mpich=4.0.3"
comms-type: m
- os: macos-latest
python-version: 3.9
mpi-version: "mpich=4.0.3"
comms-type: l

env:
HYDRA_LAUNCHER: "fork"
TERM: xterm-256color
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- name: Setup conda - Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: condaenv
miniconda-version: "latest"
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: flexible
auto-update-conda: true

- uses: actions/cache/restore@v3
name: Restore cached dependencies
id: cache
if: matrix.os == 'ubuntu-latest'
with:
path: |
/home/runner/.local
/usr/share/miniconda3/envs/condaenv
/usr/share/miniconda3/bin
/usr/share/miniconda3/lib
/usr/share/miniconda3/include
key: libe-${{ github.ref_name }}-${{ matrix.python-version }}-${{ matrix.comms-type }}

- name: Force-update certifi
run: |
python --version
pip install -I --upgrade certifi
- name: Install Ubuntu compilers
if: matrix.os == 'ubuntu-latest'
run: conda install gcc_linux-64

# Roundabout solution on macos for proper linking with mpicc
- name: Install macOS compilers and older SDK
if: matrix.os == 'macos-latest'
run: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.15.sdk.tar.xz
mkdir ../sdk; tar xf MacOSX10.15.sdk.tar.xz -C ../sdk
conda install clang_osx-64
- name: Install basic testing/feature dependencies
run: |
pip install -r install/testing_requirements.txt
pip install -r install/misc_feature_requirements.txt
- name: Install mpi4py and MPI from conda
if: (matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest') || matrix.os == 'macos-latest'
run: |
conda install mpi4py ${{ matrix.mpi-version }}
- name: Install mpi4py from pip, MPI from conda, get testing/feature deps
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
run: |
conda install ${{ matrix.mpi-version }}
pip install mpi4py
- name: Install generator dependencies
if: matrix.os != 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install mpmath
conda install numpy nlopt scipy
- uses: actions/cache/save@v3
name: Save dependencies to cache
if: matrix.os == 'ubuntu-latest'
with:
path: |
/home/runner/.local
/usr/share/miniconda3/envs/condaenv
/usr/share/miniconda3/bin
/usr/share/miniconda3/lib
/usr/share/miniconda3/include
key: libe-${{ github.ref_name }}-${{ matrix.python-version }}-${{ matrix.comms-type }}

- name: Install libEnsemble, flake8, lock environment
run: |
pip install -e .
flake8 libensemble
- name: Run simple tests, Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
- name: Run simple tests, macOS
if: matrix.os == 'macos-latest'
env:
CONDA_BUILD_SYSROOT: /Users/runner/work/libensemble/sdk/MacOSX10.15.sdk
run: |
./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}
- name: Merge coverage, run Coveralls
env:
COVERALLS_PARALLEL: true
run: |
mv libensemble/tests/.cov* .
coveralls --service=github
coveralls:
name: Notify coveralls of all jobs completing
needs: [test-libE]
if: '! github.event.pull_request.draft'
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

spellcheck:
name: Spellcheck release branch
if: contains(github.base_ref, 'develop')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.16.17
62 changes: 15 additions & 47 deletions .github/workflows/ci.yml → .github/workflows/extra.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: libEnsemble-CI
name: libEnsemble-complete-CI

on:
pull_request:
types:
- ready_for_review
- opened
- reopened
- synchronize
schedule:
- cron: '0 12 * * 1'

jobs:
test-libE:
if: '! github.event.pull_request.draft'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
mpi-version: [mpich]
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.9, "3.10", "3.11"]
comms-type: [m, l]
include:
- os: macos-latest
Expand All @@ -32,8 +29,9 @@ jobs:
comms-type: t
- os: ubuntu-latest
mpi-version: "openmpi"
python-version: "3.10"
python-version: "3.11"
comms-type: l

env:
HYDRA_LAUNCHER: "fork"
TERM: xterm-256color
Expand All @@ -44,7 +42,7 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup conda - Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
Expand Down Expand Up @@ -74,13 +72,6 @@ jobs:
python --version
pip install -I --upgrade certifi
# - name: Windows - Add clang path to $PATH env
# shell: bash
# if: matrix.os == 'windows-latest'
# run: |
# echo "PATH=$PATH:C:\msys64\mingw64\bin" >> $GITHUB_ENV
# echo "PATH=$PATH:C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64" >> $GITHUB_ENV

- name: Install Ubuntu compilers
if: matrix.os == 'ubuntu-latest'
run: conda install gcc_linux-64
Expand All @@ -93,16 +84,6 @@ jobs:
mkdir ../sdk; tar xf MacOSX10.15.sdk.tar.xz -C ../sdk
conda install clang_osx-64
# - name: Setup MPI (${{ matrix.mpi-version }})
# uses: mpi4py/setup-mpi@v1
# if: matrix.os == 'windows-latest'
# with:
# mpi: ${{ matrix.mpi-version }}

# - name: Install mpi4py on Windows
# if: matrix.os == 'windows-latest'
# run: pip install mpi4py

- name: Install mpi4py and MPI from conda
if: (matrix.python-version != '3.10' && matrix.os == 'ubuntu-latest') || matrix.os == 'macos-latest'
run: |
Expand All @@ -115,7 +96,7 @@ jobs:
pip install mpi4py
- name: Install generator dependencies
if: matrix.os != 'windows-latest' && steps.cache.outputs.cache-hit != 'true'
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
conda env update --file install/gen_deps_environment.yml
Expand All @@ -125,10 +106,10 @@ jobs:
- name: Install surmise
if: matrix.os != 'macos-latest' && steps.cache.outputs.cache-hit != 'true'
run: |
pip install --upgrade git+https://github.com/surmising/surmise.git@develop
pip install --upgrade git+https://github.com/bandframework/surmise.git@develop
- name: Build ytopt and dependencies
if: matrix.python-version != '3.11' && matrix.os != 'windows-latest' && matrix.os != 'macos-latest'
if: matrix.python-version != '3.11' && matrix.os != 'macos-latest'
run: |
pip install scikit-learn==1.1.2
pip install pandas==1.5.3
Expand All @@ -147,14 +128,6 @@ jobs:
pip install .
cd ..
# - name: Install some generator dependencies on Windows
# if: matrix.os == 'windows-latest'
# run: |
# python -m pip install --upgrade pip
# conda install nlopt
# conda install scipy
# pip install mpmath

- name: Install generator dependencies for Ubuntu tests
if: matrix.os == 'ubuntu-latest' && steps.cache.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -222,11 +195,6 @@ jobs:
run: |
./libensemble/tests/run-tests.sh -e -A "-W error" -z -${{ matrix.comms-type }}
# - name: Run simple tests, Windows
# if: matrix.os == 'windows-latest'
# run: |
# ./libensemble/tests/run-tests.sh -A "-W error" -z -${{ matrix.comms-type }}

- name: Run extensive tests, macOS
if: matrix.os == 'macos-latest'
env:
Expand Down Expand Up @@ -257,8 +225,8 @@ jobs:

spellcheck:
name: Spellcheck release branch
if: contains(github.base_ref, 'main')
if: contains(github.base_ref, 'develop')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: crate-ci/typos@v1.0.4
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.16.17
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: end-of-file-fixer
exclude: ^(.*\.xml|.*\.svg)$
Expand Down
8 changes: 7 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
[default]
extend-ignore-identifiers-re = [
".*NDArray.*",
"8ba9de56.*"
]

[default.extend-words]
als = "als"
datas = "datas"
numer = "numer"
inout = "inout"

[files]
extend-exclude = ["*.bib", "*.xml"]
extend-exclude = ["*.bib", "*.xml", "docs/nitpicky"]

0 comments on commit 926cb80

Please sign in to comment.