This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
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.
Merge remote-tracking branch 'origin/master'
- Loading branch information
Showing
17 changed files
with
3,776 additions
and
2,404 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,140 @@ | ||
# Python CircleCI 2.1 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-python/ for more details | ||
# | ||
version: 2.1 | ||
|
||
executors: | ||
# Define a parameterized executor which accepts two parameters to choose the python | ||
# version which will be used for the docker image and the tox actions. | ||
tester: | ||
working_directory: ~/repo | ||
parameters: | ||
tag: | ||
type: string | ||
default: "3.8" | ||
docker: | ||
- image: circleci/python:<< parameters.tag >> | ||
|
||
commands: | ||
# Reusable command to prepare the environment for testing. | ||
create_folders_and_venv: | ||
description: "Prepare everything." | ||
parameters: | ||
pyenv: | ||
type: string | ||
default: "py38" | ||
steps: | ||
# Checkout code. | ||
- checkout | ||
# Create test-result folder. | ||
- run: | ||
name: Create test result folder | ||
command: | | ||
mkdir test-results | ||
# Create PyDynamic_tutorials virtual environment. | ||
- run: | ||
name: Create virtual environment | ||
command: | | ||
python3 -m venv << parameters.pyenv >> | ||
source << parameters.pyenv >>/bin/activate | ||
pip install --upgrade pip setuptools pip-tools | ||
# Reusable command to install production dependencies. | ||
install_deps: | ||
description: "Install dependencies." | ||
parameters: | ||
pyenv: | ||
type: string | ||
default: "py38" | ||
steps: | ||
|
||
# Install dependencies. | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
source << parameters.pyenv >>/bin/activate | ||
python -m piptools sync requirements/requirements.txt requirements/requirements-dev.txt | ||
# Reusable command to conduct actual testing. | ||
execute_nbval: | ||
description: "Execute pytest with nbval plugin." | ||
parameters: | ||
pyenv: | ||
type: string | ||
steps: | ||
|
||
# Call pytest with nbval. | ||
- run: | ||
name: Perform pytest --nbval testing | ||
command: | | ||
source << parameters.pyenv >>/bin/activate | ||
pytest --nbval --current-env --sanitize-with nbval_sanitization | tee --append test-results/pytest.log | ||
# Reusable command to store the previously generated test results. | ||
store_results: | ||
description: "Store test results and artifacts." | ||
parameters: | ||
pyenv: | ||
type: string | ||
steps: | ||
# Store test results. | ||
- store_artifacts: | ||
path: test-results | ||
destination: test-results | ||
|
||
- store_test_results: | ||
path: test-results | ||
|
||
workflows: | ||
# Create workflow for testing PyDynamic_tutorials. | ||
test: | ||
jobs: | ||
# Create 'test' job to test and install PyDynamic_tutorials for every commit. | ||
- test: | ||
name: "test_python3.6" | ||
tag: "3.6" | ||
pyenv: "py36" | ||
- test: | ||
name: "test_python3.7" | ||
tag: "3.7" | ||
pyenv: "py37" | ||
- test: | ||
name: "test_python3.8" | ||
tag: "3.8" | ||
pyenv: "py38" | ||
|
||
jobs: | ||
|
||
# Define one 'test' job with parameters to deal with all desired cases. The | ||
# reason for this is the desire to ensure the following for all supported Python | ||
# versions referring to the docs: all notebooks are guaranteed to produce the same | ||
# output as they contain. | ||
test: | ||
# Define all parameters, where 'tag' is used for the docker image and 'pyenv' is | ||
# the string which is used to identify the current Python version. We reuse | ||
# this variable basically everywhere we deal with the virtual environment. | ||
parameters: | ||
tag: | ||
type: string | ||
default: "3.8" | ||
pyenv: | ||
type: string | ||
default: "py38" | ||
|
||
# Specify the executor and hand over the docker image tag parameter. | ||
executor: | ||
name: tester | ||
tag: << parameters.tag >> | ||
|
||
# Specify the steps to execute during this test jobs. | ||
steps: | ||
- create_folders_and_venv: | ||
pyenv: << parameters.pyenv >> | ||
- install_deps: | ||
pyenv: << parameters.pyenv >> | ||
- execute_nbval: | ||
pyenv: << parameters.pyenv >> | ||
- store_results: | ||
pyenv: << parameters.pyenv >> |
98 changes: 74 additions & 24 deletions
98
PyDynamic_tutorials/deconvolution/01 Basic measurement data pre-processing.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
75 changes: 54 additions & 21 deletions
75
PyDynamic_tutorials/deconvolution/02 Preparation of calibration data.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
88 changes: 64 additions & 24 deletions
88
...amic_tutorials/deconvolution/03 Interpolation and extrapolation of calibration data.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
45 changes: 33 additions & 12 deletions
45
PyDynamic_tutorials/deconvolution/04 Calculation of impulse response of hydrophone.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
66 changes: 48 additions & 18 deletions
66
PyDynamic_tutorials/deconvolution/05 Deconvolution in the frequency domain.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
118 changes: 77 additions & 41 deletions
118
PyDynamic_tutorials/deconvolution/06 Regularized deconvolution.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,582 changes: 879 additions & 703 deletions
1,582
PyDynamic_tutorials/uncertainty/01 Basic measurement data pre-processing.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1,752 changes: 1,025 additions & 727 deletions
1,752
PyDynamic_tutorials/uncertainty/02 Basic interpolation.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
2,017 changes: 1,252 additions & 765 deletions
2,017
PyDynamic_tutorials/uncertainty/03 Basic extrapolation.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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,9 @@ | ||
from nbval.plugin import IPyNbFile | ||
|
||
|
||
def pytest_collectstart(collector): | ||
if isinstance(collector, IPyNbFile): | ||
collector.skip_compare += 'stderr', \ | ||
'application/javascript', \ | ||
'application/vnd.holoviews_load.v0+json', \ | ||
'text/html', |
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,3 @@ | ||
[regex1] | ||
regex: \|█+\|\ (\d+\.)?\d+(G|MB|k)\/(\d+\.)?\d+(G|MB|k)\ \[(\d+)?\d+:\d+<(\d+)?\d+:\d+,\ ('\\n ')?(\d+\.)?\d+(G|MB|kB)\/s | ||
replace: DOWNLOAD_TIME |
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
Oops, something went wrong.