-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
893 changed files
with
242,439 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,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 |
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,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 | ||
- … |
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,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 |
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,144 @@ | ||
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_conda: | ||
name: Conda Build-Test (${{ matrix.os }} Python ${{ matrix.python-version }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
strategy: | ||
fail-fast: False | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] #macos-latest, | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install conda/mamba | ||
uses: conda-incubator/setup-miniconda@v2 | ||
# https://github.com/marketplace/actions/setup-miniconda | ||
with: | ||
# To use mamba, uncomment here, comment out the miniforge line | ||
#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 | ||
|
||
# Install dependencies of WEIS specific to ubuntu | ||
- name: Add dependencies ubuntu specific | ||
if: false == contains( matrix.os, 'windows') | ||
run: | | ||
conda install -y petsc4py gfortran | ||
# Install dependencies of WISDEM specific to windows | ||
- name: Add dependencies windows specific | ||
if: contains( matrix.os, 'windows') | ||
run: | | ||
conda install -y m2w64-toolchain libpython | ||
- name: Debug config | ||
run: | | ||
conda list | ||
which -a gfortran | ||
which pip | ||
# Install WISDEM with setup | ||
# Note: For some reason, pip --no-deps doesn't find conda packages and downloads everything | ||
- name: Install WISDEM with setup | ||
run: | | ||
python setup.py install | ||
# Install WISDEM with pip | ||
#- name: Install WISDEM with pip for Unix | ||
# if: false == contains( matrix.os, 'windows') | ||
# run: | | ||
# python setup.py install | ||
|
||
# Install WISDEM with pip | ||
#- name: Install WISDEM with pip for Windows | ||
# if: contains( matrix.os, 'windows') | ||
# run: | | ||
# python setup.py install | ||
|
||
# Debugging session | ||
#- name: Setup tmate session | ||
# uses: mxschmitt/action-tmate@v3 | ||
|
||
# Run all tests | ||
- name: Run tests | ||
if: false == contains( matrix.os, 'windows') | ||
run: | | ||
pytest -p no:warnings --disable-warnings --cov=wisdem | ||
# Run limited test on WINDOWS | ||
- name: Limited Windows test | ||
if: contains( matrix.os, 'windows') | ||
run: | | ||
cd wisdem/test/test_gluecode | ||
pytest -p no:warnings --disable-warnings test_g* | ||
# 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 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
coveralls --service=github | ||
build_pip: | ||
name: Pip Build-Test (${{ matrix.os }} Python ${{ matrix.python-version }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
strategy: | ||
fail-fast: False | ||
matrix: | ||
os: [ubuntu-latest] #, windows-latest, macos-latest, | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Setup GNU Fortran | ||
uses: awvwgk/setup-fortran@v1 | ||
#with: | ||
# compiler: intel-classic | ||
|
||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
id: cp | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
update-environment: true | ||
|
||
# Install WISDEM with setup | ||
# Note: For some reason, pip --no-deps doesn't find conda packages and downloads everything | ||
- name: Install WISDEM with setup | ||
run: | | ||
'${{ steps.cp.outputs.python-path }}' -m pip install --upgrade pip install pytest | ||
'${{ steps.cp.outputs.python-path }}' -m pip install -vv . | ||
# Run limited tests | ||
- name: Limited test | ||
run: | | ||
cd wisdem/test/test_gluecode | ||
pytest -p no:warnings --disable-warnings test_g* |
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,66 @@ | ||
name: Build and upload to PyPI | ||
# https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml | ||
|
||
# Build on every branch push, tag push, and pull request change: | ||
#on: [push, pull_request] | ||
# Alternatively, to publish when a (published) GitHub Release is created, use the following: | ||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- name: Setup GNU Fortran | ||
uses: awvwgk/setup-fortran@v1 | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
# To test: repository_url: https://test.pypi.org/legacy/ |
Oops, something went wrong.