Skip to content

Commit

Permalink
Merge pull request WISDEM#33 from WISDEM/f/new_mod_options
Browse files Browse the repository at this point in the history
F/new mod options
  • Loading branch information
ptrbortolotti authored Dec 3, 2020
2 parents c82d34e + 8820638 commit aa5eb02
Show file tree
Hide file tree
Showing 751 changed files with 71,026 additions and 45,592 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/CI_WEIS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,14 @@ jobs:
- name: Run parallel examples rotor optimization
shell: pwsh
run: |
cd examples/rotor_opt
cd examples/05_IEA-3.4-130-RWT
mpirun -np 2 python weis_driver.py
# Run scripts within control_opt folder, with and without MPI
- name: Run examples control optimization
shell: pwsh
run: |
cd examples/control_opt
python runOptimization.py
cd examples/02_control_opt
mpirun -np 2 python runOptimization.py
# Run scripts within dac folder
Expand Down
97 changes: 94 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
*.py[cod]

# Emacs
*~

# pyMAP
outlist.map.sum

# Packages
*.egg
*.egg-info
Expand All @@ -6,7 +14,93 @@ build
local
.DS_Store
__pycache__
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Output files
outputs/
*.out

# Sphinx
_build
generated

# XCode
*.xcodeproj

# C extensions
*.so
*.dSYM

# Unit test / coverage reports
.coverage
.tox
nosetests.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.dylib

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db

# Jupyter notebooks #
#####################
.ipynb_checkpoints

# VSCode #
##########
.vscode/

# IntelliJ Things #
####################
.idea/

# Openfast
*.outb
Expand All @@ -15,9 +109,6 @@ __pycache__
*.ech
*.dbg

# vs code
.vscode

# Temp
*Temp*
*temp*
5 changes: 5 additions & 0 deletions WISDEM/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
ignore = E731,E402,F,W504,W503,E501,C901
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
max-complexity = 10
max-line-length=120
30 changes: 30 additions & 0 deletions WISDEM/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

## 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
-
14 changes: 14 additions & 0 deletions WISDEM/.github/ISSUE_TEMPLATE/feature_request.md
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?
28 changes: 28 additions & 0 deletions WISDEM/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Delete the text explanations below these headers and replace them with information about your PR.
Please first consult the [developer guide](https://weis.readthedocs.io/en/latest/how_to_contribute_code.html) to make sure your PR follows all code, testing, and documentation conventions.

## Purpose
Explain the goal of this pull request. If it addresses an existing issue be sure to link to it. Describe the big picture of your changes here, perhaps using a bullet list if multiple changes are done to accomplish a single goal. If it accomplishes multiple goals, it may be best to create separate PR's for each.

## 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)

## Testing
Explain the steps needed to test the new code to verify that it does indeed address the issue and produce the expected behavior.

## Checklist
_Put an `x` in the boxes that apply._

- [ ] I have run existing tests which pass locally with my changes
- [ ] I have added new tests or examples that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation
68 changes: 68 additions & 0 deletions WISDEM/.github/workflows/CI_WISDEM.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI_WISDEM

# We run CI on push commits and pull requests 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:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ["3.8"]

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
with:
miniconda-version: "latest"
channels: conda-forge
auto-update-conda: true
python-version: 3.8
environment-file: environment.yml

# Install dependencies of WEIS specific to ubuntu
- name: Add dependencies ubuntu specific
if: false == contains( matrix.os, 'windows')
#shell: pwsh # putting in a shell command makes for compile linking problems later
# (if you use the shell here, cannot use 'compiler' package)
run: |
conda install -y petsc4py mpi4py compilers
# Install dependencies of WISDEM specific to windows
- name: Add dependencies windows specific
if: contains( matrix.os, 'windows')
run: |
conda install -y m2w64-toolchain libpython
# Debugging session
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

# Install WISDEM
- name: Install WISDEM
shell: pwsh
run: |
python setup.py develop
# Run all tests
- name: Run tests
if: contains( matrix.os, 'ubuntu')
shell: pwsh
run: |
pytest --cov-config=.coverageac --cov=wisdem
# Run coveralls
- name: Run coveralls
if: contains( matrix.os, 'ubuntu')
# This also works, https://github.com/AndreMiras/coveralls-python-action
#uses: AndreMiras/coveralls-python-action@develop
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls
9 changes: 9 additions & 0 deletions WISDEM/.isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[settings]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=120
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
known_first_party=wisdem
length_sort=1
31 changes: 31 additions & 0 deletions WISDEM/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21
hooks:
- id: isort
name: isort
stages: [commit]

- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
name: black
stages: [commit]
language_version: python3.8

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
# - id: check-executables-have-shebangs
- id: check-json
- id: check-yaml
- id: check-merge-conflict
- id: check-symlinks
#- id: flake8
exclude: ^docs/
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix]
38 changes: 0 additions & 38 deletions WISDEM/.travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions WISDEM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The installation instructions below use the environment name, "wisdem-env," but
conda remove --force wisdem
conda install compilers # (Mac / Linux only)
conda install m2w64-toolchain libpython # (Windows only)
pip install simpy marmot-agents
git clone https://github.com/WISDEM/WISDEM.git
cd WISDEM
git checkout develop
Expand Down
Loading

0 comments on commit aa5eb02

Please sign in to comment.