forked from NREL/ROSCO
-
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.
Squashed 'ROSCO/' content from commit c137a8c
git-subtree-dir: ROSCO git-subtree-split: c137a8c
- Loading branch information
0 parents
commit 2e84776
Showing
774 changed files
with
399,839 additions
and
0 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,33 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Desired use case | ||
_If you are able, please provide some background about your ROSCO use case. It helps guide our development and could help us better fix your issue._ | ||
|
||
## Description | ||
_Describe the bug here_ | ||
|
||
### Steps to reproduce issue | ||
_Please provide a minimum working example (MWE) if possible_ | ||
|
||
1. … | ||
2. … | ||
3. … | ||
|
||
### Current behavior | ||
… | ||
|
||
### Expected behavior | ||
… | ||
|
||
|
||
### Code versions | ||
_List versions only if relevant_ | ||
- Python | ||
- … |
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,14 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
# Description of feature | ||
Describe the feature here and provide some context. Under what scenario would this be useful? | ||
|
||
# Potential solution | ||
Can you think of ways to implement this? |
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,29 @@ | ||
## Description and Purpose | ||
|
||
## Type of change | ||
What types of change is it? | ||
_Select the appropriate type(s) that describe this PR_ | ||
|
||
- [ ] Bugfix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (non-backwards-compatible fix or feature) | ||
- [ ] Code style update (formatting, renaming) | ||
- [ ] Refactoring (no functional changes, no API changes) | ||
- [ ] Documentation update | ||
- [ ] Maintenance update | ||
- [ ] Other (please describe) | ||
|
||
TODO Items General: | ||
- [ ] Add example/test for new feature | ||
- [ ] Update registry | ||
- [ ] Run testing | ||
|
||
TODO Items API Change: | ||
- [ ] Update docs with API change | ||
- [ ] Run update_rosco_discons.py in Test_Cases/ | ||
- [ ] Update DISCON schema | ||
|
||
## Github issues addressed, if one exists | ||
|
||
## Examples/Testing, if applicable | ||
|
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,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
WHEEL=$1 | ||
DEST_DIR=$2 | ||
|
||
python -m pip install delvewheel | ||
python -m delvewheel show "$WHEEL" && python -m delvewheel repair -w "$DEST_DIR" "$WHEEL" --no-mangle-all |
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,185 @@ | ||
name: CI_rosco-compile | ||
|
||
# We run CI on push commits on all branches | ||
on: [push, pull_request] | ||
|
||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build_pip: | ||
name: Pip Build (${{ matrix.os }}) - ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
strategy: | ||
fail-fast: false #true | ||
matrix: | ||
os: ["ubuntu-latest", "macOS-latest", "windows-latest"] #mac-13 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: fortran-lang/[email protected] | ||
# with: | ||
# compiler: intel-classic | ||
|
||
- name: Install compiler | ||
if: false == contains( matrix.os, 'windows') | ||
id: install_cc | ||
uses: rlalik/setup-cpp-compiler@master | ||
with: | ||
compiler: clang | ||
|
||
- name: Install mingw-w64 on Windows | ||
if: contains( matrix.os, 'windows') | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
path-type: inherit | ||
install: | | ||
mingw-w64-x86_64-gcc | ||
mingw-w64-x86_64-gcc-fortran | ||
mingw-w64-x86_64-zeromq | ||
mingw-w64-x86_64-cmake | ||
mingw-w64-x86_64-pkg-config | ||
- name: Install zeromq ubuntu | ||
if: contains( matrix.os, 'ubuntu') | ||
run: | | ||
sudo apt install libzmq3-dev libzmq5 libczmq-dev libczmq4 | ||
- name: Install zeromq mac | ||
if: contains( matrix.os, 'mac') | ||
run: | | ||
brew install zeromq | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
id: cp | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
update-environment: true | ||
|
||
- name: Set compilers | ||
if: false == contains( matrix.os, 'windows') | ||
run: | | ||
echo "CC=${{ steps.install_cc.outputs.cc }}" >> $GITHUB_ENV | ||
echo "CXX=${{ steps.install_cc.outputs.cxx }}" >> $GITHUB_ENV | ||
#- name: Setup tmate session | ||
# if: contains( matrix.os, 'windows') | ||
# uses: mxschmitt/action-tmate@v3 | ||
|
||
# Install ZeroMQ- should be done via Conda | ||
#- name: Install ZeroMQ | ||
# run: | | ||
# sudo apt-get update | ||
# sudo apt-get install libzmq3-dev | ||
|
||
- name: Pip Install ROSCO | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' -m pip install -e . | ||
# Re-generate registry | ||
- name: Generate Registry | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' rosco/controller/rosco_registry/write_registry.py | ||
- name: Test run | ||
# skipping pip test on windows for now until wisdem pypi is ready | ||
if: false == contains( matrix.os, 'windows') | ||
run: | | ||
cd Examples | ||
'${{ steps.cp.outputs.python-path }}' 01_turbine_model.py | ||
build_and_test_conda: | ||
name: Conda Build (${{ matrix.os }}) - ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
strategy: | ||
fail-fast: false #true | ||
matrix: | ||
os: ["ubuntu-latest", "macOS-13", "windows-latest"] #mac-13 intel, mac-14 arm | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: conda-incubator/setup-miniconda@v2 | ||
# https://github.com/marketplace/actions/setup-miniconda | ||
with: | ||
#mamba-version: "*" | ||
miniforge-version: "latest" | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
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 m2w64-toolchain libpython | ||
gfortran --version | ||
- name: Add dependencies mac specific | ||
if: contains( matrix.os, 'mac') | ||
run: | | ||
conda install -y compilers | ||
gfortran --version | ||
# Install | ||
- name: Debug | ||
run: | | ||
conda list | ||
printenv | ||
- name: Conda Install ROSCO | ||
run: | | ||
python -m pip install -e . | ||
- name: Install OpenFAST | ||
run: | | ||
conda install openfast==3.5.3 | ||
- name: Generate Registry | ||
run: | | ||
python rosco/controller/rosco_registry/write_registry.py | ||
- name: Fix example file extensions | ||
run: | | ||
python Examples/Test_Cases/update_libdiscon_extension.py | ||
#- name: Setup tmate session | ||
# uses: mxschmitt/action-tmate@v3 | ||
# with: | ||
# detached: true | ||
# if: contains( matrix.os, 'windows') | ||
|
||
- name: Run ROSCO testing | ||
run: | | ||
cd rosco/test | ||
python ROSCO_testing.py | ||
- name: Run regression testing | ||
if: contains( matrix.os, 'ubuntu') | ||
run: | | ||
cd rosco/test | ||
pytest . | ||
- name: Test walkthrough notebook | ||
if: contains( matrix.os, 'ubuntu') | ||
run: | | ||
cd Examples | ||
treon ROSCO_walkthrough.ipynb | ||
Oops, something went wrong.