Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into DLC_RefactorCaseIn…
Browse files Browse the repository at this point in the history
…puts
  • Loading branch information
dzalkind committed Aug 7, 2024
2 parents 2c460b2 + 77512f2 commit 48804ba
Show file tree
Hide file tree
Showing 61 changed files with 5,787 additions and 345 deletions.
47 changes: 29 additions & 18 deletions .github/workflows/CI_WEIS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9","3.10","3.11"]
os: ["ubuntu-latest", "macOS-13", "macOS-latest", "windows-latest"] # mac13 is intel, mac-14 arm
python-version: ["3.9","3.10","3.11","3.12"]

steps:
#- name: Setup GNU Fortran
# # if: false == contains( matrix.os, 'windows')
# uses: awvwgk/setup-fortran@main

- uses: actions/checkout@v4

- name: Install conda/mamba
Expand All @@ -38,6 +34,11 @@ jobs:
environment-file: environment.yml
activate-environment: test
auto-activate-base: false

#- name: Add dependencies windows specific
# if: contains( matrix.os, 'windows')
# run: |
# conda install -y -c intel intel-openmp mkl

- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
Expand All @@ -46,7 +47,7 @@ jobs:
- name: Add test packages
run: |
conda install -y pytest pytest-cov coveralls
conda install -y pytest pytest-cov coveralls
- name: Show custom environment
run: |
Expand All @@ -56,17 +57,29 @@ jobs:
# Install WEIS
- name: Install WEIS
run: |
pip install -e . -v
python -m pip install --no-deps -e . -v
# Debugging session
#- name: Setup tmate session
# if: contains( matrix.os, 'windows')
# uses: mxschmitt/action-tmate@v3

#- name: Show openfast environment
# run: |
# which -a openfast
# cd /c/Miniconda3/envs/test/Library/bin/
# ls *fast*.exe
# ls *fast*.dll
# openfast -h
# python -c "import ctypes; ctypes.cdll.LoadLibrary('openfastlib.dll')"
# ls *fast*.dll
# cd examples/03_NREL5MW_OC3_spar
# python weis_driver.py

# List the collected tests for debugging purposes
- name: List tests
run: |
pytest --collect-only weis
#- name: List tests
# run: |
# pytest --collect-only weis

# Run all tests within WEIS, but not computationally expensive examples
- name: Run tests within WEIS
Expand All @@ -76,10 +89,8 @@ jobs:
# Run coveralls
- name: Run coveralls
if: contains( matrix.os, 'ubuntu') && contains( matrix.python-version, '3.11')
uses: coverallsapp/github-action@v2
# This also works, https://github.com/AndreMiras/coveralls-python-action
#uses: AndreMiras/coveralls-python-action@develop
#env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#run: |
# coveralls --service=github
#uses: coverallsapp/github-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github
10 changes: 7 additions & 3 deletions .github/workflows/run_exhaustive_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: true
matrix:
os: ["ubuntu-latest"] #, "macOS-latest"]
python-version: ["3.9","3.10", "3.11"]
python-version: ["3.9","3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -39,7 +39,11 @@ jobs:
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
run: |
conda install -y petsc4py mpi4py openmpi
conda install -y petsc4py mpi4py openmpi pyoptsparse
- name: Add test packages
run: |
conda install -y pytest pytest-cov coveralls treon
- name: Show custom environment
run: |
Expand All @@ -53,7 +57,7 @@ jobs:
# Install WEIS
- name: Install WEIS
run: |
pip install -e .
python -m pip install --no-deps -e . -v
# Test walkthrough notebook
- name: Test postprocessing notebooks
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The core WEIS modules are:

## Installation

On laptop and personal computers, installation with [Anaconda](https://www.anaconda.com) is the recommended approach because of the ability to create self-contained environments suitable for testing and analysis. WEIS requires [Anaconda 64-bit](https://www.anaconda.com/distribution/). However, the `conda` command has begun to show its age and we now recommend the one-for-one replacement with the [Miniforge3 distribution](https://github.com/conda-forge/miniforge?tab=readme-ov-file#miniforge3), which is much more lightweight and more easily solves for the package dependencies. WEIS is currently supported on Linux, Mac, and Windows (natively or with the Linux sub-system (WSL)).
On laptop and personal computers, installation with [Anaconda](https://www.anaconda.com) is the recommended approach because of the ability to create self-contained environments suitable for testing and analysis. WEIS requires [Anaconda 64-bit](https://www.anaconda.com/distribution/). However, the `conda` command has begun to show its age and we now recommend the one-for-one replacement with the [Miniforge3 distribution](https://github.com/conda-forge/miniforge?tab=readme-ov-file#miniforge3), which is much more lightweight and more easily solves for the package dependencies. Sometimes, using `mamba` in place of `conda` with this distribution speeds up the installation process. WEIS is currently supported on Linux, MAC and Windows Sub-system for Linux (WSL). Installing WEIS on native Windows is not yet supported, but planned in 2024.

The installation instructions below use the environment name, "weis-env," but any name is acceptable. For those working behind company firewalls, you may have to change the conda authentication with `conda config --set ssl_verify no`. Proxy servers can also be set with `conda config --set proxy_servers.http http://id:pw@address:port` and `conda config --set proxy_servers.https https://id:pw@address:port`.

Expand All @@ -44,32 +44,35 @@ The installation instructions below use the environment name, "weis-env," but an
module purge
module load conda

1. Setup and activate the Anaconda environment from a command prompt:
1. Setup and activate the Anaconda environment from a prompt (WSL terminal on Windows or Terminal.app on Mac)

conda config --add channels conda-forge
conda env create --name weis-env -f https://raw.githubusercontent.com/WISDEM/WEIS/develop/environment.yml
conda install git
git clone https://github.com/WISDEM/WEIS.git
cd WEIS
git checkout branch_name # (Only if you want to switch branches, say "develop")
conda env create --name weis-env -f environment.yml
conda activate weis-env # (if this does not work, try source activate weis-env)
conda install -y petsc4py mpi4py pyoptsparse # (Mac / Linux only)


2. Clone the repository and install the software
2. Add in final packages and install the software

git clone https://github.com/WISDEM/WEIS.git
cd WEIS
git checkout branch_name # (Only if you want to switch branches, say "develop")
conda install -y petsc4py mpi4py pyoptsparse # (Mac / Linux only)
pip install -e .

3. Instructions specific for DOE HPC system Eagle. Before executing the setup script, do:

module load comp-intel intel-mpi mkl
module unload gcc
pip install -e .
pip install --no-deps -e . -v

**NOTE:** To use WEIS again after installation is complete, you will always need to activate the conda environment first with `conda activate weis-env` (or `source activate weis-env`). On Eagle, make sure to reload the necessary modules

For Windows users, we recommend installing `git` and the `m264` packages in separate environments as some of the libraries appear to conflict such that WISDEM cannot be successfully built from source. The `git` package is best installed in the `base` environment.

## Developer guide

If you plan to contribute code to WEIS, please first consult the [developer guide](https://weis.readthedocs.io/en/latest/how_to_contribute_code.html). You are also likely to want to install some of the compiled WEIS dependencies (OpenFAST or WISDEM or pyHAMS or ROSCO) from a local copy instead of relying on the conda packages.
If you plan to contribute code to WEIS, please first consult the [developer guide](https://weis.readthedocs.io/en/latest/how_to_contribute_code.html).

## Feedback

Expand Down
Empty file added docs/inputs/analysis_schema.rst
Empty file.
Empty file.
Empty file added docs/inputs/modeling_schema.rst
Empty file.
Loading

0 comments on commit 48804ba

Please sign in to comment.