Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wpreimes committed Nov 13, 2024
1 parent f35ff96 commit 26b347e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/ci.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: Automated Tests
name: CI/CD

on:
push:
Expand All @@ -19,24 +19,22 @@ jobs:
# as we build C extension for users to download, we want to include as many python versions
# and OS versions as possible (especially windows to create .whl packages,
# see step "Create wheel and dist package")
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
os: ["ubuntu-latest", "windows-latest"]
name: py${{ matrix.python-version }} @ ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
submodules: true # does not work with self-hosted testdata
submodules: true
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
activate-environment: pytesmo # todo: must match with name in environment.yml
mamba-version: "*"
channel-priority: flexible
auto-activate-base: false
- name: Print Infos
shell: bash -l {0}
Expand All @@ -54,10 +52,13 @@ jobs:
mkdir -p artifacts
filename=env_py${{ matrix.python-version }}_${{ matrix.os }}.yml
conda env export --no-builds | grep -v "prefix" > artifacts/$filename
- name: Install package and test
- name: Install package and dependencies
shell: bash -l {0}
run: |
pip install -e .[testing]
- name: Run unit tests
shell: bash -l {0}
run: |
pytest --cache-clear
- name: Upload Coverage
shell: bash -l {0}
Expand All @@ -70,17 +71,17 @@ jobs:
- name: Create wheel and dist package
shell: bash -l {0}
run: |
git status
pip install setuptools_scm
python setup.py sdist --dist-dir .artifacts/dist
python setup.py bdist_wheel --dist-dir .artifacts/dist
ls .artifacts/dist
twine check dist/*
pip install setuptools_scm twine wheel
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-${{ matrix.python-version }}-${{ matrix.os }}
path: artifacts/*

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

publish:
name: Upload to PyPI
if: |
Expand Down Expand Up @@ -120,4 +122,4 @@ jobs:
verify_metadata: true
packages_dir: Artifacts/dist/
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets
password: ${{ secrets.PYPI_API_TOKEN }} # this needs to be uploaded to github actions secrets
18 changes: 10 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
pytesmo - a Python Toolbox for the Evaluation of Soil Moisture Observations
***************************************************************************

.. image:: https://github.com/TUW-GEO/pytesmo/workflows/Automated%20Tests/badge.svg?branch=master
|ci| |cov| |pip| |doc|

.. |ci| image:: https://github.com/TUW-GEO/pytesmo/actions/workflows/ci.yml/badge.svg?branch=master
:target: https://github.com/TUW-GEO/pytesmo/actions

.. image:: https://coveralls.io/repos/TUW-GEO/pytesmo/badge.png?branch=master
.. |cov| image:: https://coveralls.io/repos/TUW-GEO/pytesmo/badge.png?branch=master
:target: https://coveralls.io/r/TUW-GEO/pytesmo?branch=master

.. image:: https://badge.fury.io/py/pytesmo.svg
.. |pip| image:: https://badge.fury.io/py/pytesmo.svg
:target: https://badge.fury.io/py/pytesmo

.. image:: https://readthedocs.org/projects/pytesmo/badge/?version=latest
:target: https://pytesmo.readthedocs.io/en/latest/?badge=latest
.. |doc| image:: https://readthedocs.org/projects/pytesmo/badge/?version=latest
:target: https://pytesmo.readthedocs.io/en/latest/

pytesmo, the Python Toolbox for the Evaluation of Soil Moisture Observations, is
a package/python toolbox which aims to provide a library that can be used for
Expand Down Expand Up @@ -53,10 +55,10 @@ from the `python package repository Pypi <https://pypi.python.org/>`__.
pip install pytesmo
Note that ``pytesmo>=0.17`` will only work with ``numpy>=2.0``. If you still
require a version compatible with numpy v1, install ``pytesmo<0.17``.
Note that ``pytesmo>=0.17`` will only work with ``numpy>=2.0`` and ``python>=3.9``.
If you still require a version compatible with numpy v1, install ``pytesmo<0.17``.

Compiled C extensions are available Windows and Linux python 3.8 to 3.12.
Compiled C extensions are available Windows and Linux python 3.9 to 3.12.

For other operating systems and/or python versions, it might be necessary
to compile the C extensions yourself and install pytesmo from source.
Expand Down
6 changes: 2 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ exclude =
# PDF = ReportLab; RXP
# Add here test requirements (semicolon/line-separated)
testing =
ascat>=2.0
ismn==1.3.4
ascat==2.4.3
ismn==1.5.1
nbconvert
ipykernel
sphinx_rtd_theme
ascat>=2.0
ismn==1.3.4
matplotlib
pytest
pytest-cov
Expand Down

0 comments on commit 26b347e

Please sign in to comment.