-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from RangamaniLabUCSD/development
Major updates to infrastructure
- Loading branch information
Showing
111 changed files
with
16,706 additions
and
6,336 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,42 @@ | ||
# How to contribute | ||
|
||
We welcome contributions from external contributors, and this document | ||
describes how to merge code changes into `Mem3dg`. | ||
|
||
## Getting Started | ||
|
||
* Make sure you have a [GitHub account](https://github.com/#/free). | ||
* [Fork](https://help.github.com/articles/fork-a-repo/) this repository on GitHub. | ||
* On your local machine, | ||
[clone](https://help.github.com/articles/cloning-a-repository/) your fork of | ||
the repository. | ||
|
||
## Making Changes | ||
|
||
* Add some really awesome code to your local fork. It's usually a [good | ||
idea](http://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/) | ||
to make changes on a | ||
[branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) | ||
with the branch name relating to the feature you are going to add. | ||
* When you are ready for others to examine and comment on your new feature, | ||
navigate to your fork of `Mem3dg` on GitHub and open a [pull | ||
request](https://help.github.com/articles/using-pull-requests/) (PR). Note that | ||
after you launch a PR from one of your fork's branches, all | ||
subsequent commits to that branch will be added to the open pull request | ||
automatically. Each commit added to the PR will be validated for | ||
mergability, compilation and test suite compliance; the results of these tests | ||
will be visible on the PR page. | ||
* If you're providing a new feature, you must add test cases and documentation. | ||
* When the code is ready to go, make sure you run the test suite using pytest. | ||
* When you're ready to be considered for merging, check the "Ready to go" | ||
box on the PR page to let the Mem3dg devs know that the changes are complete. | ||
The code will not be merged until this box is checked, the continuous | ||
integration returns checkmarks, | ||
and multiple core developers give "Approved" reviews. | ||
|
||
# Additional Resources | ||
|
||
* [General GitHub documentation](https://help.github.com/) | ||
* [PR best practices](http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/) | ||
* [A guide to contributing to software packages](http://www.contribution-guide.org) | ||
* [Thinkful PR example](http://www.thinkful.com/learn/github-pull-request-tutorial/#Time-to-Submit-Your-First-PR) |
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,12 @@ | ||
## Description | ||
Provide a brief description of the PR's purpose here. | ||
|
||
## Todos | ||
Notable points that this PR has either accomplished or will accomplish. | ||
- [ ] TODO 1 | ||
|
||
## Questions | ||
- [ ] Question1 | ||
|
||
## Status | ||
- [ ] Ready to go |
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,228 @@ | ||
name: Testing and release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- development | ||
tags: | ||
# The regex: /^v?((\d+)(\.\d+)*)(-?(a|b|c|rc|alpha|beta)([0-9]+)?)?$ | ||
- 'v[0-9].[0-9]+.[0-9]+*' | ||
pull_request: | ||
branches: | ||
- master | ||
- development | ||
|
||
jobs: | ||
build_linux: | ||
name: Build-Test Linux | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-18.04, ubuntu-20.04] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Setup python libs | ||
id: pyexe | ||
run: | | ||
python3 --version | ||
python3 -m pip install pytest | ||
py_exe_path=$(which python3) | ||
echo ::set-output name=path::$py_exe_path | ||
- name: Resolve dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libnetcdf-c++4-dev libnetcdf-dev xorg-dev libeigen3-dev pybind11-dev | ||
- name: Build and test | ||
run: | | ||
mkdir -p build && cd build; | ||
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_PYMEM3DG=ON -DSUITESPARSE=OFF -DWITH_NETCDF=ON -DPython_EXECUTABLE:FILEPATH=${{ steps.pyexe.outputs.path }} .. | ||
cmake --build . --config Release -j 4 | ||
ctest -C Release -V -j 4 | ||
build_macos: | ||
name: Build-Test macOS | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-10.15] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Setup python libs | ||
id: pyexe | ||
run: | | ||
python3 --version | ||
python3 -m pip install pytest | ||
py_exe_path=$(which python3) | ||
echo ::set-output name=path::$py_exe_path | ||
- name: Resolve dependencies | ||
run: brew install netcdf eigen pybind11 | ||
|
||
- name: Build and test | ||
run: | | ||
mkdir -p build && cd build; | ||
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_PYMEM3DG=ON -DSUITESPARSE=OFF -DWITH_NETCDF=ON -DPython_EXECUTABLE:FILEPATH=${{ steps.pyexe.outputs.path }} .. | ||
cmake --build . --config Release -j 4 | ||
ctest -C Release -V -j 4 | ||
build_windows: | ||
name: Build-Test Windows | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Setup python libs | ||
id: pyexe | ||
run: | | ||
python --version | ||
python -m pip install pytest | ||
py_exe_path=$(which python) | ||
echo ::set-output name=path::$py_exe_path | ||
- name: Restore from cache and install vcpkg | ||
# Download and build vcpkg, without installing any port. If content is cached already, it is a no-op. | ||
uses: lukka/run-vcpkg@v6 | ||
with: | ||
vcpkgGitCommitId: 5568f110b509a9fd90711978a7cb76bae75bb092 | ||
setupOnly: true | ||
|
||
- name: Download libraries | ||
run: $VCPKG_ROOT/vcpkg install netcdf-c:x64-windows netcdf-cxx4:x64-windows eigen3:x64-windows | ||
|
||
- name: Build and test | ||
run: | | ||
mkdir -p build && cd build; | ||
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_PYMEM3DG=ON -DSUITESPARSE=OFF -DWITH_NETCDF=ON -DPython_EXECUTABLE:FILEPATH=${{ steps.pyexe.outputs.path }} -DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" .. | ||
cmake --build . --config Release -j 4 | ||
ctest -C Release -V -j 4 | ||
deploy_documentation: | ||
name: Deploy documentation to Github pages | ||
runs-on: ubuntu-latest | ||
# needs: [build_windows, build_linux, build_macos] | ||
# if: github.ref == 'refs/heads/master' | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Get Project Version | ||
id: version | ||
run: | | ||
mem3dg_version=$(git describe --tags --always --dirty) | ||
echo $mem3dg_version | ||
echo ::set-output name=version::$mem3dg_version | ||
- name: Configure python version | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Setup python libs | ||
id: pyexe | ||
run: | | ||
python3 --version | ||
python3 -m pip install -r ./docs/rtd-requirements.txt | ||
py_exe_path=$(which python3) | ||
echo ::set-output name=path::$py_exe_path | ||
- name: Resolve dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libnetcdf-c++4-dev libnetcdf-dev xorg-dev libeigen3-dev pybind11-dev ninja-build doxygen | ||
- name: Build pymem3dg and install | ||
run: | | ||
${{ steps.pyexe.outputs.path }} setup.py install -- -DWITH_NETCDF=ON | ||
- name: Build docs | ||
run: | | ||
mkdir -p build && cd build; | ||
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_MEM3DG_DOCS=ON -DBUILD_PYMEM3DG=ON -DSUITESPARSE=OFF -DWITH_NETCDF=ON -DPython_EXECUTABLE:FILEPATH=${{ steps.pyexe.outputs.path }} .. | ||
cmake --build . --target mem3dg_doxy_docs --config Release -j 4 | ||
cmake --build . --target mem3dg_sphinx_docs --config Release -j 4 | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
destination_dir: ${{ steps.version.outputs.version }}/cpp | ||
publish_dir: ./build/docs/cpp/html | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
destination_dir: ${{ steps.version.outputs.version }}/py | ||
publish_dir: ./build/docs/py/html | ||
|
||
|
||
deploy_to_pypi: | ||
name: Deploy to PyPI | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-latest | ||
needs: [build_windows, build_linux, build_macos] | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Update python libs | ||
run: python -m pip install scikit-build pytest | ||
|
||
- name: Configures source dist | ||
run: python setup.py sdist | ||
|
||
- name: Display structure of files | ||
run: ls -R | ||
|
||
- name: Publish package | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
# - name: Publish package to TestPyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
# repository_url: https://test.pypi.org/legacy/ |
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,31 @@ | ||
name: Tracking Documentation Versions | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9].[0-9]+.[0-9]+*' | ||
|
||
jobs: | ||
check_for_doc_versions: | ||
name: Update documented versions | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
ref: gh-pages | ||
|
||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
|
||
- run: | | ||
echo "- tag: ${{ steps.get_version.outputs.VERSION }}" >> _data/tags.yml | ||
cat _data/tags.yml | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add _data/tags.yml | ||
git commit -m "Auto adding tag ${{ steps.get_version.outputs.VERSION }}" | ||
git push |
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
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
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,26 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
build: | ||
image: latest | ||
|
||
submodules: | ||
include: all | ||
recursive: true | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
builder: html | ||
configuration: docs/src/conf.py | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
version: 3 | ||
install: | ||
- requirements: docs/rtd-requirements.txt | ||
- method: setuptools | ||
path: . |
Oops, something went wrong.