Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release version 1.2 #86

Merged
merged 283 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
283 commits
Select commit Hold shift + click to select a range
f5ec149
tests: major improvements in spectrum testing
n-claes Apr 15, 2021
956d441
updated regression tests for matrix splitting framework
n-claes Apr 16, 2021
445a07d
typo fix
n-claes Apr 16, 2021
e51bde4
added option to keep files after testing
n-claes Apr 16, 2021
896c453
relaxed eigenvalue testing for specific cases
n-claes Apr 16, 2021
3f58cbb
enabled khi and kh-cd flow tests
n-claes Apr 16, 2021
1458a1a
pylbo: avoid B0 division in hydro cases
n-claes Apr 16, 2021
3f34eea
regression tests CI: add image directory and disable unimplemented tests
n-claes Apr 16, 2021
af89a7c
enabled MRI and internal kink regression tests
n-claes Apr 16, 2021
6e44cb0
updated MRI and internal kink regression answers
n-claes Apr 16, 2021
a107c58
regression: updated artifact saving
n-claes Apr 16, 2021
7206ba9
enabled all flow tests
n-claes Apr 16, 2021
9ff1bc3
more stringent regression tests + close figures
n-claes Apr 16, 2021
1958a40
added resistivity matrix elements
n-claes Apr 19, 2021
16fd33b
enabled resistive regression tests
n-claes Apr 19, 2021
00776a8
added radiative cooling terms
n-claes Apr 19, 2021
0747553
framework for conduction, viscosity and hall
n-claes Apr 21, 2021
b10ebd0
added second velocity derivatives to velocity field
n-claes Apr 21, 2021
516115e
added viscosity matrix elements
n-claes Apr 21, 2021
e14df08
implemented splitting of boundary conditions
n-claes Apr 22, 2021
8ca8334
fix core test build, link to new routine
n-claes Apr 22, 2021
df62345
natural boundary conditions hierarchy + regular and resistive terms
n-claes Apr 23, 2021
ca35a0c
added natural boundaries for flow
n-claes Apr 23, 2021
474c48e
added natural boundaries for viscosity
n-claes Apr 23, 2021
ffe84ab
moved operator shortcuts into dedicated module
n-claes Apr 23, 2021
91900fb
added thermal conduction prefactor calculations
n-claes Apr 23, 2021
3a23ed0
added temperature derivative of kappa_parallel
n-claes Apr 23, 2021
6b16a45
added second T0 derivative to equilibrium
n-claes Apr 23, 2021
19d0e28
added conduction matrix elements
n-claes Apr 23, 2021
df178ab
enabled conduction + cooling regression tests
n-claes Apr 23, 2021
dbc2194
added natural boundaries for conduction
n-claes Apr 26, 2021
e961b3a
avoid 1/B0 division in unit tests
n-claes Apr 26, 2021
6e484ef
taylor-couette flexibility
jordidj Apr 14, 2021
5a30486
incompressible switch
jordidj Apr 15, 2021
fc6e386
magnetic taylor-couette
jordidj Apr 19, 2021
54ff1c5
additional taylor-couette variations
jordidj Apr 21, 2021
cd1ff61
tc_pinch fix
jordidj Apr 28, 2021
dd2c027
Hall terms
jordidj Apr 29, 2021
9bc5bf2
electron inertia parameter no longer set when not included
jordidj Apr 30, 2021
900a97c
input parameter cte_B01
jordidj Apr 30, 2021
43baf71
minus sign fix in K(5, 8)
n-claes May 6, 2021
aeee7ed
matrix element fixes and Hall B matrix boundaries
jordidj May 10, 2021
5920c5b
matrix element Sigma(4,2) and natural boundary R(5,8) fix
jordidj May 11, 2021
aa0780d
fix matrix element Sigma(2, 4)
n-claes May 11, 2021
15dd20b
regularity conditions update
jordidj May 12, 2021
25239df
energy regularity condition fix
jordidj May 14, 2021
cf89683
do equilibrium inspections after setting physics
n-claes May 18, 2021
a080a93
added temporary warning if viscosity/hall is used
n-claes May 18, 2021
43ac4e2
enforce energy balance instead of checking for it
n-claes May 18, 2021
fabf35f
fix forgotten change in conduction prefactor for natural bounds
n-claes May 18, 2021
46a5156
added additional check for L0 = 0
n-claes May 18, 2021
490e413
updated GH, magnetothermal and resistive tearing baseline answers
n-claes May 19, 2021
419208f
improved eigenfunction testing, this is now image-based
n-claes May 19, 2021
fb230d2
tweaked RMS tolerances on magnetothermal tests
n-claes May 19, 2021
93d2100
pylbo: do not set small eigenfunctions to zero
n-claes Jun 7, 2021
58f783e
added possibility to use a custom base grid
n-claes Jun 7, 2021
8ad297c
custom grid bugfix
jordidj Jun 7, 2021
6ea8402
added option to check cooling/atmosphere curves if in debug mode
n-claes Jun 8, 2021
85116dd
pylbo: fixed dry_run flag in parfile generation
n-claes Jun 8, 2021
8dd6e2d
fixed edge case in integration routine, sometimes this returned array…
n-claes Jun 8, 2021
57c4e95
pylbo: fixed minor issue when overlaying continua
n-claes Jun 8, 2021
5c23673
pylbo: special treatment if slow continuum has a real part approachin…
n-claes Jun 8, 2021
e7d1491
black + flake8 fixes
n-claes Jun 8, 2021
b83313b
bump version numbers
n-claes Jun 8, 2021
7cdbb7a
Merge pull request #66 from n-claes/feature/matrix_rework
n-claes Jun 8, 2021
21e4250
make _add_subplot_axes compatible with mpl 3.4
n-claes Jun 9, 2021
0e985a2
updated figure_manager so individual windows are not closed
n-claes Jun 9, 2021
6875e52
Merge pull request #69 from n-claes/bugfix/mpl-3.4-support
n-claes Jun 9, 2021
a357c99
pylbo: fixed datfile name issue for multiruns (fixes #68)
n-claes Jun 9, 2021
0c1827c
pylbo: better handling of multispectrum ydata when datasets have diff…
n-claes Jun 9, 2021
29ed6fc
pylbo: fixed a bug where basename_datfile was overwritten by its defa…
n-claes Jun 14, 2021
660979c
Merge Bugfix/b01-v01-output (#71)
n-claes Jun 18, 2021
2666961
updated CI workflow, added code coverage
n-claes Jun 15, 2021
f85a713
enable coverage in regression tests
n-claes Jun 16, 2021
fd3d0a1
minor unit tests edits for readability
n-claes Jun 16, 2021
61e3d00
improved grid-related unit tests
n-claes Jun 16, 2021
93a06ac
removed mesh accumulation in favour of custom_grid
n-claes Jun 16, 2021
f6efbf2
improved testing of input module
n-claes Jun 17, 2021
d191bb4
simplification and updates of mod_check_values
n-claes Jun 17, 2021
c600f92
fix fluxtube regression tests after removal of mesh accumulation
n-claes Jun 17, 2021
cabcd32
improved testing of value checks
n-claes Jun 17, 2021
c93891a
minor modifications to testing of units
n-claes Jun 17, 2021
b1e0a6c
use inferred size for rosner cooling + test updates
n-claes Jun 17, 2021
42d057b
minor unit test updates
n-claes Jun 17, 2021
6e2a60d
rework of thermal conduction unit tests
n-claes Jun 17, 2021
83af765
disable unittests in progress in cmakelists
n-claes Jun 17, 2021
54af3f1
updated boundary unit tests, added viscosity
n-claes Jun 18, 2021
a0b5c67
spline and subblock unit tests
n-claes Jun 18, 2021
6da7319
extended matrix operation unit tests
n-claes Jun 18, 2021
ef438e0
updated interpolation unit tests
n-claes Jun 21, 2021
e84c4c4
updated integration unit tests
n-claes Jun 21, 2021
8ecda76
use procedures for solvers in submodules
n-claes Jun 21, 2021
ded7a4b
extended lapack solver unit tests
n-claes Jun 21, 2021
4723f99
extended arpack unit tests
n-claes Jun 21, 2021
4bb03d1
switch from gcovr to lcov for coverage report
n-claes Jun 22, 2021
3e9baff
added geometry_override unit tests
n-claes Jun 22, 2021
89a7ec9
added unit tests for inspections
n-claes Jun 22, 2021
10c4343
modify exclusion flags for lcov
n-claes Jun 22, 2021
423e20c
logging unit tests + bugfix str complex function
n-claes Jun 22, 2021
c8d1299
added unit tests for matrix operators
n-claes Jun 22, 2021
1b495f9
unit tests for cooling curves
n-claes Jun 22, 2021
f5afcbb
exclude equilibria defaults from coverage + formatting
n-claes Jun 23, 2021
63fea8e
added is_constant method to available checks
n-claes Jun 23, 2021
5770139
minor bugfixes in solar atmosphere module
n-claes Jun 23, 2021
7f0a802
added unit tests for solar atmosphere module
n-claes Jun 23, 2021
2a30822
added regression test for couette flow
n-claes Jul 2, 2021
1f080f0
fix directory issue in yml script
n-claes Jul 2, 2021
43650d7
regression test for taylor_couette added
n-claes Jul 5, 2021
c1cf85d
exclude user file from code coverage
n-claes Jul 5, 2021
aec2099
improved testing of multiruns
n-claes Jul 5, 2021
0d25d46
remove untested warning from gravito mhd modules
n-claes Jul 6, 2021
ebbe0dc
add regression tests for nye-thomas atmosphere
n-claes Jul 6, 2021
e1f5c70
remove baseline images (no longer used)
n-claes Jul 6, 2021
515d366
re-enable pylbo tests
n-claes Jul 8, 2021
3c70a4f
Merge pull request #70 from n-claes/tests/improved_testing
n-claes Jul 8, 2021
e960cf1
added mean molecular weight for electron-proton plasma support
n-claes Jul 7, 2021
1ee63fa
unit tests for mean molecular weight
n-claes Jul 8, 2021
fe4b0fe
Merge pull request #72 from n-claes/feature/mean_molecular_weight
n-claes Jul 8, 2021
06f2f45
added custom codecov file
n-claes Jul 8, 2021
89b50e2
equilibria cleanup
jordidj Jul 8, 2021
3225295
in-code postprocessing init (no pylbo support yet)
jordidj Jun 18, 2021
6b18fca
postprocessing init fix
jordidj Jun 21, 2021
56d68a0
pylbo reading postprocessed quantities from legolas
jordidj Jun 22, 2021
e6bc7d4
write_postprocessed added to automation
jordidj Jun 22, 2021
7877ae3
older datfile compatibility fix
jordidj Jun 22, 2021
9bb55ae
old datfile multirun compatibility
jordidj Jun 22, 2021
bec9a79
postprocessing parallel/perpendicular to B0 (B01 = 0)
jordidj Jun 24, 2021
a41802d
bugfix when not postprocessing
jordidj Jul 1, 2021
d0b9e4f
small cleanup
jordidj Jul 12, 2021
4de5dea
incompressible gamma test and pylbo version check
jordidj Jul 12, 2021
98a1b80
extracted baseclass from eigenfunctions/postprocessing + cleanup
n-claes Jul 13, 2021
5317452
fix version issue during logging + flake8 fix
n-claes Jul 13, 2021
7a4eb93
addition of entropy perturbation to mod_postprocessing
jordidj Jul 15, 2021
35ec9ea
Merge pull request #73 from n-claes/postprocessing
n-claes Jul 29, 2021
b7245a8
pylbo: extended generator and loading tests
n-claes Jul 14, 2021
df65a9f
pylbo: moved some visualisation properties to superclass
n-claes Jul 15, 2021
f110e10
pylbo: tests for datasets/series + extra for loading and running
n-claes Jul 15, 2021
dcedd33
pylbo: fixed a bug where sometimes plots were not shown using custom …
n-claes Jul 16, 2021
5da0aa9
pylbo: visualisation tests
n-claes Jul 16, 2021
ef43ccb
pylbo: tests for continua
n-claes Jul 16, 2021
bea6fe8
pylbo: add code coverage
n-claes Jul 16, 2021
e0937d9
pylbo: fix missing file + flake8 issue
n-claes Jul 16, 2021
76a6e64
update yml files to reflect pylbo code coverage
n-claes Jul 16, 2021
bee1504
pylbo: bump version number
n-claes Jul 29, 2021
d10a3a3
Merge pull request #74 from n-claes/tests/pylbo_testing
n-claes Jul 30, 2021
d14ca83
added eigenfunction subset switches
n-claes Jul 30, 2021
3a76f53
rework of eigenfunction module to support subset selection
n-claes Aug 3, 2021
cf7acf1
saved subset info to file + updated pylbo reader
n-claes Aug 4, 2021
b73999a
pylbo: updated eigenfunction plotting to new subset data
n-claes Aug 4, 2021
257782d
added subset test datasets + updated loading tests for pylbo
n-claes Aug 5, 2021
3f76bcc
pylbo: added eigenfunction subset tests + subset bugfix in data conta…
n-claes Aug 5, 2021
116169c
added regression tests for ef subset data
n-claes Aug 5, 2021
38c84bc
removed old mod_eigenfunctions
n-claes Aug 5, 2021
6bf9e22
moved postprocessing to eigenfunctions directory + renamed
n-claes Aug 5, 2021
af2dd3c
refactoring post_processed -> derived eigenfunctions to avoid confusion
n-claes Aug 5, 2021
4decb7b
added is_zero function to mod_check_values
n-claes Aug 5, 2021
4ba83c9
updated & cleaned eigenfunction initialisation routines
n-claes Aug 5, 2021
d768053
reworked interpolation logic for derived eigenfunction quantities
n-claes Aug 5, 2021
86e4898
simplified entropy calculation routine
n-claes Aug 5, 2021
757fb63
extracted eigenfunction operations into new submodule
n-claes Aug 5, 2021
4a80276
simplified velocity divergence eigenfunction routine
n-claes Aug 5, 2021
f071c8f
simplified velocity curl eigenfunction routine
n-claes Aug 5, 2021
1368cd0
simplified parallel/perp velocity curl components in eigenfunctions
n-claes Aug 6, 2021
103fdea
simplified magnetic field eigenfunction components
n-claes Aug 6, 2021
cd4312f
simplified div(B) eigenfunction calculation
n-claes Aug 6, 2021
049a9ec
simplified curl(B) eigenfunction calculation
n-claes Aug 10, 2021
606d2b4
simplified vpara/vperp eigenfunction calculation
n-claes Aug 10, 2021
4e6f72b
compilation fixes and minor edits
n-claes Aug 12, 2021
b15f3e8
modified interpolation routine to allow for optional out-of-array loo…
n-claes Aug 13, 2021
da0f237
minor refactoring & cleaning
n-claes Aug 13, 2021
4f03f60
pylbo: minor bugfixes in plotting pp quantities
n-claes Aug 13, 2021
1145f03
pylbo: updates to datfile reader
n-claes Aug 13, 2021
87360ce
fix weird compilation error
n-claes Aug 13, 2021
00dede2
added regression test for derived ef quantities
n-claes Aug 13, 2021
581f2fb
cleanup of entropy and div(v) routines
n-claes Aug 13, 2021
543a1c1
cleanup of derived eigenfunction quantities submodule
n-claes Aug 13, 2021
3a44d50
segfault bugfix when accessing eigenfunction arrays
n-claes Aug 16, 2021
733f383
added docstrings to new routines
n-claes Aug 16, 2021
837f4d0
refactored some module names
n-claes Aug 16, 2021
c4a338f
moved pp quantities to dedicated submodule
n-claes Aug 16, 2021
c9b19e3
added unit tests for new spline functions & valuechecks
n-claes Aug 16, 2021
0657f94
cleaned up unnecessary before routine calls during unit testing
n-claes Aug 16, 2021
87110f1
bugfix array access pp quantities
n-claes Aug 16, 2021
29c62a0
added unit tests for eigenfunctions
n-claes Aug 16, 2021
cffb164
unit tests for eigenfunction subset selection
n-claes Aug 16, 2021
e227766
pylbo: added unit tests for derived eigenfunctions
n-claes Aug 17, 2021
27a174d
pylbo: refactored postprocessed -> derived eigenfunctions
n-claes Aug 17, 2021
f862e0b
implemented custom findloc function for gfortran <9.0 compatibility
n-claes Aug 21, 2021
9beff37
Merge pull request #75 from n-claes/feature/eigenfunc_selection
n-claes Sep 7, 2021
ddde518
enable generation of develop docs
n-claes Jul 2, 2021
bb0c12d
restructured docs folder
n-claes Jul 8, 2021
476efe0
docs: text alignment + smaller font size
n-claes Jul 9, 2021
5ab3590
docs: updated installation page
n-claes Jul 26, 2021
8234820
docs: updated first problem page
n-claes Jul 26, 2021
1d63eb2
docs: updated parfile page
n-claes Jul 26, 2021
53bdddd
docs: updated equilibria page
n-claes Jul 26, 2021
4d3cdd4
docs: updated solver page
n-claes Jul 26, 2021
2d2c834
docs: updated custom submodule docs
n-claes Jul 26, 2021
86d6254
docs: added physics section
n-claes Jul 27, 2021
dc5b3c1
docs: updated page on equilibrium balance
n-claes Jul 27, 2021
6c5aa3a
docs: updated units section
n-claes Jul 27, 2021
2cbcb2a
docs: updated pylbo documentation
n-claes Jul 27, 2021
2b95df1
docs: updated testing documentation
n-claes Jul 27, 2021
02321f7
docs: removed unused images + move source docs to getting-started
n-claes Jul 28, 2021
ef5f578
docs: updated homepage
n-claes Jul 28, 2021
82d4b29
docs: updated about section
n-claes Jul 28, 2021
ec1ac55
added docs for eigenfunction subset selection
n-claes Sep 7, 2021
6987172
pylbo: fix packaging dependency
n-claes Sep 8, 2021
0e31508
pylbo: generalised subplot addition, fixed deprecationwarning
n-claes Sep 8, 2021
41f89b3
bugfix referencing axis object when adding subplot
n-claes Sep 8, 2021
23bbcf4
modified failing test, no longer throws an error
n-claes Sep 8, 2021
b0ad1d3
replace change_geometry with updated _add_subplot_axes method
n-claes Sep 8, 2021
775e11b
Merge pull request #77 from n-claes/bugfix/mpl_geometry
n-claes Sep 8, 2021
6582509
Compile in release mode by default
eprovst Sep 13, 2021
cc6b4a5
Add assert macro
eprovst Sep 13, 2021
a300e27
Add timing facilities
eprovst Sep 13, 2021
41647e3
Modified timing and assert routines to use mod_logging's str
eprovst Sep 14, 2021
79affb7
Merge pull request #78 from elecprog/dev_utils
n-claes Sep 15, 2021
f7ed57c
fix release build warnings
n-claes Sep 15, 2021
5481972
fixed wrong article link for gold-hoyle equilibrium
n-claes Sep 17, 2021
5dbd9ff
fixed typo in docs
n-claes Sep 17, 2021
f583571
updated doc generation script with link to stable/dev version
n-claes Sep 17, 2021
3f5fd24
pylbo: added convenience timing function
n-claes Sep 13, 2021
ec9f5c1
pylbo: added tooltips for eigenfunction plotting
n-claes Sep 17, 2021
453a0a3
improved console logging
n-claes Sep 17, 2021
8af4bf7
updated repository readmes
n-claes Sep 22, 2021
6cd24f7
updated docs .yml
n-claes Sep 22, 2021
367dc8f
added Slack shield to readme
n-claes Sep 23, 2021
e50c85e
fixed some lcov exclusion flags
n-claes Sep 30, 2021
981352a
tests for new logical_to_str procedure
n-claes Sep 30, 2021
2470750
exclude timing wrapper from pylbo coverage
n-claes Oct 1, 2021
597cabd
Merge pull request #80 from n-claes/feature/better_logging
n-claes Oct 1, 2021
18d7a47
Merge pull request #79 from n-claes/docs/devdocs
n-claes Oct 1, 2021
8549afb
fixed macos segfault when write_eigenfunctions is false
n-claes Oct 6, 2021
da63375
Merge pull request #84 from n-claes/bugfix/segfault_macOS
n-claes Oct 6, 2021
f924530
remove old modules (reworked/moved)
n-claes Sep 16, 2021
b1bf3ce
pylbo: cleanup continua
n-claes Sep 16, 2021
1bdc60a
updated parfile template
n-claes Sep 27, 2021
1fa18f0
updated PR and issue templates
n-claes Sep 29, 2021
067dab5
pylbo: bugfix for derived eigenfunctions on a multispectrum plot
n-claes Oct 5, 2021
bd7816a
pylbo: fixes broken colourmapping for interactive legends on multispe…
n-claes Oct 5, 2021
71864c7
minor tweaks to internal kink equilibrium
n-claes Oct 5, 2021
794bf3d
pylbo: fix AttributeError for non-continua legend items
n-claes Oct 6, 2021
5d8b3a3
remove viscosity warning
n-claes Oct 6, 2021
ec940db
Merge pull request #83 from n-claes/cleanup
n-claes Oct 6, 2021
ff23dd0
fix CMake ranlib build no-symbols warnings on macOS
n-claes Oct 6, 2021
0764bb3
Merge pull request #85 from n-claes/bugfix/no_symbols_macOS
n-claes Oct 6, 2021
3bfa2c6
updated parfile template
n-claes Oct 6, 2021
c304d84
update custom user submodule template
n-claes Oct 6, 2021
bcc3402
bump version number to 1.2 for release
n-claes Oct 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
codecov:
require_ci_to_pass: yes
notify:
after_n_builds: 3 # allow regression + unit tests + pylbo to pass before notification

comment:
require_changes: true
layout: "diff, flags"

coverage:
status:
patch: off
project:
default:
threshold: 2%
27 changes: 27 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Issue description
<!-- A short description of the issue. Also add label(s) indicating if it is a feature request, bug report or something else.
Feel free to delete sections that are not applicable. -->

## Feature request
<!-- What would you like to see added to the code?
If you want start a discussion instead, feel free to open a discussion in the corresponding repository tab or ask us through Slack. -->


## Bug report
**Minimal example for reproduction**
<!-- Paste your code between the quotation marks below. -->
```

```

**Actual result**
<!-- Result obtained when the above piece of code is run. This can be a description, screenshot, console statements etc. -->

**Expected result**
<!-- Which result do you expect instead? -->

**Version info**
- Legolas version:
- Pylbo version:
- Python version:
- Version of relevant libraries (matplotlib, numpy, etc.):
45 changes: 11 additions & 34 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,19 @@
Hi, thanks for the pull request! To make sure everything stays nice and consistent, here is a default template which you can use.
It also includes a checklist of small things that are usually forgotten or overlooked. You may remove parts that are not applicable to the current PR
(including these sentences).

Cheers,

Legolas dev team

## PR description

> fill or delete
<!-- A short description of the pull request. Feel free to delete sections that are not applicable.-->

## New features
**Legolas**
-

> fill or delete
**Pylbo**
-

## Bugfixes
**Legolas**
-

> fill or delete

**Pylbo**
-
## Checklist

**Source code stuff**
- [ ] everything is nicely formatted using [Black-like code style](https://black.readthedocs.io/en/stable/the_black_code_style.html)
- [ ] use-statements should use `use mod_xxx, only:` as much as possible
- [ ] things that can go in a separate module, should go in a separate module
- [ ] code additions|changes are also added|changed in the docstrings

**Testing stuff**
- [ ] all tests pass
- [ ] in case of new features, new tests are added

**Website stuff**
- [ ] relevant pages on the website are edited, if relevant
- [ ] on the edited pages, the `last_modified_at` frontmatter key is updated
- [ ] all links render as they should, check through a local `bundle exec jekyll serve` in the `docs` directory
- [ ] additions to the parfile are also added to `parameters_file.md`

**Release stuff**
(only if this is a merge-in-master release)
- [ ] bump version number
- [ ] changelog pages on the website are updated
- [ ] all tests pass (and for new features, new tests are added)
- [ ] documentation has been updated (if applicable)
83 changes: 83 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: docs

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ develop ]

jobs:
develop:
runs-on: ubuntu-latest

# only run on PR or push to develop, skip on master
if: ${{ contains(github.base_ref, 'develop') || contains(github.ref, 'refs/heads/develop') }}

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ford graphviz
sudo apt-get install graphviz
pip install -U sphinx
pip install numpydoc sphinx-rtd-theme lazy-object-proxy==1.4 sphinx-autoapi

- name: Generate documentation
run: |
cd docs
python generate_docs.py develop

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ contains(github.ref, 'refs/heads/develop') }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: n-claes/legolas.science-dev
publish_branch: main
publish_dir: ./docs
cname: dev.legolas.science
enable_jekyll: true
full_commit_message: 'dev: deploy n-claes/legolas@${{ github.sha }}'

stable:
runs-on: ubuntu-latest

# only run on push to master, skip for develop
if: ${{ contains(github.ref, 'refs/heads/master') }}

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ford graphviz
sudo apt-get install graphviz
pip install -U sphinx
pip install numpydoc sphinx-rtd-theme lazy-object-proxy==1.4 sphinx-autoapi

- name: Generate documentation
run: |
cd docs
python generate_docs.py stable

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY_STABLE }}
external_repository: n-claes/legolas.science-stable
publish_branch: main
publish_dir: ./docs
cname: legolas.science
enable_jekyll: true
full_commit_message: 'stable: deploy n-claes/legolas@${{ github.sha }}'
147 changes: 147 additions & 0 deletions .github/workflows/legolas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: legolas

on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]

env:
CC: /usr/bin/gcc-9
FC: /usr/bin/gfortran-9
PFUNIT_DIR: /home/runner/work/legolas/legolas/tests/pFUnit/build/installed
LEGOLASDIR: /home/runner/work/legolas/legolas
ARPACK_ROOT: /home/runner/work/legolas/legolas/tests/arpack-ng

jobs:
test:
name: "${{ matrix.name }}"
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- name: unit-tests
coverage: true
- name: regression
coverage: true

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install gfortran-9
sudo apt-get -y install cmake
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
sudo apt-get install lcov
gfortran-9 --version
cmake --version
which gcov
which gcov-9

- name: Install Python dependencies & Pylbo
run: |
python -m pip install --upgrade pip
pip install pytest numpy matplotlib f90nml tqdm psutil pytest-mpl
cd post_processing
python setup.py develop

- name: Cache pFUnit
id: pfunit-cache
uses: actions/cache@v1
with:
path: tests/pFUnit/
key: ${{ runner.os }}-pfunitv1

- name: Build pFUnit
if: steps.pfunit-cache.outputs.cache-hit != 'true'
run: |
cd tests/
git clone https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git
cd pFUnit
mkdir build
cd build
cmake .. -DSKIP_MPI=YES -DSKIP_OPENMP=YES -DSKIP_FHAMCREST=YES
make -j 2 tests
make -j 2 install

- name: Cache ARPACK
id: arpack-cache
uses: actions/cache@v1
with:
path: tests/arpack-ng/
key: ${{ runner.os }}-arpackv2

- name: Build ARPACK
if: steps.arpack-cache.outputs.cache-hit != 'true'
run: |
cd tests
git clone https://github.com/opencollab/arpack-ng.git
cd arpack-ng
mkdir build
mkdir installed
cd build
cmake -DEXAMPLES=OFF -DMPI=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=../installed ..
make -j 2
sudo make -j 2 install

- name: Compile Legolas
run: |
mkdir build
cd build
if [[ "${{ matrix.coverage }}" ]]; then
cmake -DCoverage=ON ..
else
cmake ..
fi
make -j 2

- name: Run tests
run: |
# depending on unit or regression tests we use different coverage options
if [[ "${{ matrix.name }}" == "unit-tests" ]]; then
cd $LEGOLASDIR/tests/unit_tests
mkdir build
cd build
cmake -DCoverage=ON ..
make -j 2
cd ..
./test_legolas
elif [[ "${{ matrix.name }}" == "regression" ]]; then
cd $LEGOLASDIR/tests/regression_tests
pytest -v regression.py test*
fi
if [[ "${{ matrix.coverage }}" ]]; then
# generate coverage report
cd $LEGOLASDIR
mkdir coverage
cd coverage
lcov --capture --directory $LEGOLASDIR/build \
--output-file ${{ matrix.name }}.info \
--gcov-tool /usr/bin/gcov-9
fi
# filter out coverage files
find $LEGOLASDIR/build -name '*.gc*' -delete

- name: Archive failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: failed_logs
path: tests/regression_tests/image_comparisons

- name: Upload coverage report
uses: codecov/codecov-action@v1
if: ${{ matrix.coverage }}
with:
files: ./coverage/${{ matrix.name }}.info
flags: legolas
Loading