Skip to content

Commit

Permalink
Multiple small improvements (#263)
Browse files Browse the repository at this point in the history
Integration tests with new ISMN Interface
Add option to Validation Framework to ignore errors in Validation.calc()
ipynb files from docs/examples are now also used as (optional) tests
yapf for code formatting (see developers guide) (Fix #248)

Should also fix the broken docs build.
  • Loading branch information
wpreimes committed Jan 14, 2022
1 parent a882f1d commit 0500b3f
Show file tree
Hide file tree
Showing 20 changed files with 1,335 additions and 599 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9']
ymlfile: ['environment.yml']
name: Py${{ matrix.python-version }}@${{ matrix.os }}🐍
runs-on: ${{ matrix.os }}
Expand All @@ -26,7 +26,7 @@ jobs:
with:
submodules: true # does not work with self-hosted testdata
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2.0.1
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
Expand Down Expand Up @@ -55,8 +55,7 @@ jobs:
- name: Install package and test
shell: bash -l {0}
run: |
pip install .
# This separation avoids segfaults:
pip install -e .
pytest --cache-clear
- name: Upload Coverage
shell: bash -l {0}
Expand Down Expand Up @@ -99,7 +98,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish:
name: Upload to PyPI
if: startsWith(github.ref, 'refs/tags/v') && startsWith(github.repository, 'TUW-GEO')
if: |
startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.repository, 'TUW-GEO')
needs: build
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,8 @@ MANIFEST
# Per-project virtualenvs
.venv*/

#ismn testdata
**/python_metadata/**

# GithubActions
.artifacts/
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ conda:
environment: environment.yml

python:
version: 3.7
version: 3.8
install:
- method: pip
path: .
17 changes: 16 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@ Changelog

Unreleased
==========
-
- fixed bugs in resample_mean (PR `#262 <https://github.com/TUW-GEO/pytesmo/pull/262>`_)
- Integration tests with new ISMN Interface
- Add option to Validation Framework to ignore errors in ``Validation.calc()``
- ipynb files from docs/examples are now also used as (optional) tests
- ``yapf`` for code formatting (see developers guide) (Fix #248)


Version 0.13.3, 2022-01-12
==========================
- use `oldest-supported-numpy` in `pyproject.toml` to avoid errors due to incompatible numpy versions used in build-time.

Version 0.13.2, 2021-12-17
==========================
- monthly climatologies
- ``wraparound=True`` is the new default in the climatology calculation
- better error handling in validation framework

Version 0.12.0, 2021-08-19
==========================
Expand Down
8 changes: 8 additions & 0 deletions DEVELOPERS_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ Afterwards, `git push` is enough.

Once your done you can open a pull request on Github.

Code Formatting
---------------
To apply pep8 conform styling to any changed files [we use `yapf`](https://github.com/google/yapf). The correct
settings are already set in `setup.cfg`. Therefore the following command
should be enough:

yapf file.py --in-place

Testing
-------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ clone the Github repository and install from source:
git clone https://github.com/TUW-GEO/pytesmo.git --recursive
cd pytesmo
conda create -n pytesmo python=3.6 # or any supported python version
conda create -n pytesmo python=3.7 # or any supported python version
source activate pytesmo
conda env update -f environment.yml -n pytesmo
pip install -e .
Expand Down
125 changes: 99 additions & 26 deletions docs/examples/anomalies.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 0500b3f

Please sign in to comment.