From fe5523fb355df8ede319c444faea2280fff30960 Mon Sep 17 00:00:00 2001 From: Frederik Kratzert Date: Thu, 11 Dec 2025 09:14:31 +0000 Subject: [PATCH 1/2] Add CI-tests --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ .gitignore | 1 + requirements.txt | 7 +++++++ setup.py | 12 +++++++++--- 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 requirements.txt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..73107b0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Python Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Test with unittest + run: | + python -m unittest discover -s tests \ No newline at end of file diff --git a/.gitignore b/.gitignore index 219eafe..7c18eb2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ rrmpg.egg-info/ .settings/ debug/ .ipynb_checkpoints/ +.venv/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6936c3a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +numpy +matplotlib +numba +jupyter +ipython +pandas +scipy \ No newline at end of file diff --git a/setup.py b/setup.py index 0407972..787fcc4 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,10 @@ -from setuptools import setup +from setuptools import find_packages, setup import rrmpg + +with open("requirements.txt", "r", encoding="utf-8") as f: + requirements = f.read().splitlines() + setup( name="rrmpg", version=rrmpg.__reversion__, @@ -9,13 +13,15 @@ description=("Rainfall-Runoff-Model-PlayGround: a Python library for" "hydrological modeling."), url="https//www.github.com/kratzert/RRMPG", - packages=["rrmpg", "rrmpg.models", "rrmpg.tools", "rrmpg.utils", "rrmpg.data"], + packages=find_packages(), include_package_data=True, + install_requires=requirements, license="MIT-License", keywords="hydrology rainfall-runoff modeling", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Education", "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License"] + "License :: OSI Approved :: MIT License"], + python_requires=">=3.11", ) From 1055bf05a11c928933f431692d347d265ca838db Mon Sep 17 00:00:00 2001 From: Frederik Kratzert Date: Thu, 11 Dec 2025 09:17:38 +0000 Subject: [PATCH 2/2] Fix typo --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 73107b0..7cd238a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,4 +28,4 @@ jobs: - name: Test with unittest run: | - python -m unittest discover -s tests \ No newline at end of file + python -m unittest discover -s test \ No newline at end of file