Skip to content

Commit

Permalink
Update meta package
Browse files Browse the repository at this point in the history
  • Loading branch information
wpreimes committed Nov 13, 2024
1 parent 28b28e8 commit 1f7b9de
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 99 deletions.
58 changes: 50 additions & 8 deletions .github/workflows/test.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: tests
name: CI/CD

on:
push:
Expand All @@ -19,15 +19,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]
python-version: [ '3.8', '3.9', '3.10']
os: ["ubuntu-latest"]
ymlfile: ["environment.yml"]
include:
- os: "windows-latest"
python-version: "3.10"
ymlfile: "environment.yml"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- uses: conda-incubator/setup-miniconda@v3
Expand All @@ -52,16 +52,26 @@ jobs:
mkdir -p artifacts
filename=env_py${{ matrix.python-version }}_${{ matrix.os }}.yml
conda env export --no-builds | grep -v "prefix" > artifacts/$filename
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts-py${{ matrix.python-version }}-${{ matrix.os }}
path: artifacts/*
- name: Install package and test
shell: bash -l {0}
run: |
pip install -e .
pytest
- name: Create wheel and dist package
shell: bash -l {0}
run: |
pip install -U setuptools
pip install setuptools_scm twine wheel
python setup.py --version
python setup.py sdist --dist-dir artifacts/dist
python setup.py bdist_wheel --dist-dir artifacts/dist
ls artifacts/dist
twine check artifacts/dist/*
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts-py${{ matrix.python-version }}-${{ matrix.os }}
path: artifacts/*
- name: Upload Coverage
shell: bash -l {0}
run: |
Expand All @@ -70,6 +80,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true

coveralls:
name: Submit Coveralls 👚
needs: build
Expand All @@ -81,3 +92,34 @@ jobs:
pip3 install --upgrade coveralls && coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-pypi-package:
name: Publish PyPI 🚀
# Will only trigger when Tests have passed on release/tag from the TUW-GEO repository
if: |
startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.repository, 'awst-austria')
needs: build
runs-on: ubuntu-latest
steps:
- name: Print environment variables
run: |
echo "GITHUB_REF = $GITHUB_REF"
echo "GITHUB_REPOSITORY = $GITHUB_REPOSITORY"
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: Artifacts
pattern: Artifacts-*
merge-multiple: true
- name: Display downloaded files
run: ls -aR
- name: Upload to PyPI
uses: pypa/[email protected]
with:
skip_existing: true
verbose: true
verify_metadata: true
packages_dir: Artifacts/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets
42 changes: 0 additions & 42 deletions .github/workflows/pypi.yml

This file was deleted.

3 changes: 2 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Contributors

* Lukas Rachbauer
* Wolfgang Preimesberger <[email protected]>
* Pietro Stradiotti <[email protected]>
* Pietro Stradiotti
* Daniel Aberer <[email protected]>
* Monika Tercjak <[email protected]>
* Samuel Scherrer
* Nicolas Bader <[email protected]>
90 changes: 76 additions & 14 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,131 @@
Changelog
=========

Unreleased
==========

Unreleased changes in master branch
===================================
-

Version 0.10
============
- Fix bugs with metadata plots by @wpreimes in https://github.com/awst-austria/qa4sm-reader/pull/78
- Update environment.yml by @sheenaze in https://github.com/awst-austria/qa4sm-reader/pull/81
- fixed failing windows miniconda setup by @nfb2021 in https://github.com/awst-austria/qa4sm-reader/pull/82
- Required update to handle new QA4SM netCDF structure according to Jir… by @wpreimes in https://github.com/awst-austria/qa4sm-reader/pull/83
- Fix comparison plot creation logic by @nfb2021 in https://github.com/awst-austria/qa4sm-reader/pull/87
- Add Stability Metrics Plots by @daberer in https://github.com/awst-austria/qa4sm-reader/pull/86
- Bugfix labels for slopeR plots by @daberer in https://github.com/awst-austria/qa4sm-reader/pull/88
- Bugfix temporal sub-windows period by @daberer in https://github.com/awst-austria/qa4sm-reader/pull/89

Version 0.9.1
=============

- Added function to retrieve the package version


Version 0.9
===========

- QA4SM release 2 version
- Status maps and box plots
- FRM box plots added
- Scaling reference units used on plots
- SMOS and SMAP L2 added

Version 0.8
===========
- Reader adaptation for plotting validation error maps and barplots.
- Based on the "status_" keyword variable in the output netCDF files.

Version 0.4
Version 0.7.5
=============
- The comparison plots for TCA metrics were shown with inverted values. The issue is now fixed.

Version 0.7.4
=============
- New formula added for the averaging of non-additive scores (Pearson's and Spearman's correlation)
- Improved layout in comparison plots
- Code formatting established (through yapf and pep8)

Version 0.7.3
=============
- Fix bug in metadata plots download; improves some graphics

Version 0.7.2
=============
- Modified to generate mapplots from SMOS L3 as reference. Includes small change in metadata plots labels.

Version 0.7.1
=============
- Add alternative dataset names

Version 0.7
===========
- Added a new dataset to the reader (SMOS L3), including functions to deal with missing datasets specifications (version name, units, ..)

Version 0.6.4
=============
- Added a new dataset to the reader (SMOS L3), including functions to deal with missing datasets specifications (version name, units, ..)

Version 0.6.3
=============
- Updated project requirements.txt file to overcome VersionConflict exception in pypi

Version 0.6.2
=============
- Methods have been implemented to generate a .csv file including the statistics summary table at the end of the validation.

Version 0.6.1
=============
- Small release to fix compatibility with QA4SM and some code cleanup

Version 0.6.0
=============
- Includes methods to read the metadata variables from the output netCDF file. The plot_all function in qa4sm_reader.plot_all.py has now a switch that produces (if the necessary information is available in the output file) metadata boxplots based on:
- Land cover classes (CCI Landcover)
- Climate classes (Koeppen-Geiger classification)
- Soil granulometry (coarse - medium - fine)
- All the tests have been updated to accomodate for this.

Version 0.5.2
=============
- The environment of the reader was updated to cartopy==0.20.0 to solve issues with broken urls in the previous Cartopy version. The continuous integration tests were consequently updated to span on versions 3.7 to 3.9 of python - successfully

Version 0.5
===========
- The new comparison.py module has been added with relative tests
- A notebook has been included to show the usage of the comparison modul

Version 0.4
===========
- update on plots of datasets with irregular grids
- Quick inspection table added
- IQC instead of StdDev added to plots

Version 0.3.4
=============

- Switch from Travis CI to GitHub Actions
- Allow plotting from irregular grids (SMOS, ASCAT)

Version 0.3.3
=============

- Fix bug that lead to failing plots for CCI combined

Version 0.3.2
=============

- Fix bug that could break global overview maps
- Resolve deprecation warnings caused by cartopy

Version 0.3.1
=============

- Change how plots are named

Version 0.3
===========

- Fixes for integration in QA4SM Prod

Version 0.2
===========

- Updates for TC, refactoring

Version 0.1
===========

- First implementation


23 changes: 15 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,25 @@
qa4sm_reader
============

.. image:: https://github.com/TUW-GEO/qa4sm-reader/workflows/tests/badge.svg
:target: https://github.com/TUW-GEO/qa4sm-reader/actions?query=workflow%3Atests
|ci| |cov| |pip|

.. |ci| image:: https://github.com/awst-austria/qa4sm-reader/actions/workflows/build.yml/badge.svg?branch=master
:target: https://github.com/awst-austria/qa4sm-reader/actions

.. |cov| image:: https://coveralls.io/repos/awst-austria/qa4sm-reader/badge.png?branch=master
:target: https://coveralls.io/r/awst-austria/qa4sm-reader?branch=master

.. |pip| image:: https://badge.fury.io/py/qa4sm-reader.svg
:target: https://badge.fury.io/py/qa4sm-reader.

.. image:: https://coveralls.io/repos/github/awst-austria/qa4sm-reader/badge.svg?branch=master
:target: https://coveralls.io/github/awst-austria/qa4sm-reader?branch=master

qa4sm_reader is a python package to read and plot the result files of the `qa4sm service`_.


Installation
============

This package should be installable through pip (not yet tough, see development):
This package should be installable through pip

.. code::
Expand All @@ -38,9 +44,10 @@ For Development we recommend creating a ``conda`` environment.
.. code::
cd qa4sm-reader
conda env create # create environment from requirements.rst
conda activate qa4sm-reader
python setup.py develop # Links the code to the environment
conda env create python=3.10 # create environment from requirements.rst
conda activate qa4sm_reader
conda env update -f environment.yml -n qa4sm_reader
pip install -e .
To remove the environment again, run:

Expand Down
25 changes: 0 additions & 25 deletions requirements.txt

This file was deleted.

3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
name = qa4sm_reader
description = Processes output of qa4sm.eodc.eu (NetCDF file), creating plots and providing the data in other formats.
author = TU Wien
author-email = [email protected]
author-email = [email protected]
license = MIT
long-description = file: README.rst
long-description-content-type = text/x-rst; charset=UTF-8
# Add here all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers =
Expand Down

0 comments on commit 1f7b9de

Please sign in to comment.