From 04d644273d9a65386e9faec15844739daf7a8b16 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 13:12:43 -0500 Subject: [PATCH 1/7] ci: test w/ python 3.11 and 3.12 --- .github/workflows/deploy-gh-pages.yml | 8 ++++---- .github/workflows/run_caches.yml | 6 +++--- .github/workflows/run_events.yml | 6 +++--- .github/workflows/run_metrics.yml | 6 +++--- .github/workflows/run_nwis_client.yml | 6 +++--- .github/workflows/run_nwm_client.yml | 6 +++--- .github/workflows/run_nwm_client_new.yml | 6 +++--- .github/workflows/run_rest_client.yml | 6 +++--- .github/workflows/run_slow_unit_tests.yml | 6 +++--- .github/workflows/run_svi_client.yml | 6 +++--- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 76c23dab..8dc3322f 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -10,13 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip Sphinx furo diff --git a/.github/workflows/run_caches.yml b/.github/workflows/run_caches.yml index 38ddf916..2be90230 100644 --- a/.github/workflows/run_caches.yml +++ b/.github/workflows/run_caches.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_events.yml b/.github/workflows/run_events.yml index 591bbfa1..6c1c25a9 100644 --- a/.github/workflows/run_events.yml +++ b/.github/workflows/run_events.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_metrics.yml b/.github/workflows/run_metrics.yml index 3d27adde..b886b422 100644 --- a/.github/workflows/run_metrics.yml +++ b/.github/workflows/run_metrics.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_nwis_client.yml b/.github/workflows/run_nwis_client.yml index a91870e4..d8eed7c6 100644 --- a/.github/workflows/run_nwis_client.yml +++ b/.github/workflows/run_nwis_client.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_nwm_client.yml b/.github/workflows/run_nwm_client.yml index 0b337ccc..6a09064c 100644 --- a/.github/workflows/run_nwm_client.yml +++ b/.github/workflows/run_nwm_client.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_nwm_client_new.yml b/.github/workflows/run_nwm_client_new.yml index a4fe2231..3039fdfc 100644 --- a/.github/workflows/run_nwm_client_new.yml +++ b/.github/workflows/run_nwm_client_new.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_rest_client.yml b/.github/workflows/run_rest_client.yml index a0083dbe..4a5c7c98 100644 --- a/.github/workflows/run_rest_client.yml +++ b/.github/workflows/run_rest_client.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_slow_unit_tests.yml b/.github/workflows/run_slow_unit_tests.yml index e481bf69..3e218c3e 100644 --- a/.github/workflows/run_slow_unit_tests.yml +++ b/.github/workflows/run_slow_unit_tests.yml @@ -13,13 +13,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/run_svi_client.yml b/.github/workflows/run_svi_client.yml index c45d14cf..eff1a497 100644 --- a/.github/workflows/run_svi_client.yml +++ b/.github/workflows/run_svi_client.yml @@ -15,14 +15,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From d18f26a27dc292f7a55070af21e8203f4986b363 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 14:21:28 -0500 Subject: [PATCH 2/7] chore: migrate setup.cfg -> pyproject.toml --- pyproject.toml | 48 +++++++++++++++++++--- python/_restclient/pyproject.toml | 43 ++++++++++++++++++-- python/_restclient/setup.cfg | 47 ---------------------- python/caches/pyproject.toml | 40 ++++++++++++++++--- python/caches/setup.cfg | 44 --------------------- python/events/pyproject.toml | 37 +++++++++++++++-- python/events/setup.cfg | 43 -------------------- python/nwis_client/pyproject.toml | 46 ++++++++++++++++++++-- python/nwis_client/setup.cfg | 52 ------------------------ python/nwm_client/pyproject.toml | 47 ++++++++++++++++++++-- python/nwm_client/setup.cfg | 50 ----------------------- python/nwm_client_new/pyproject.toml | 55 ++++++++++++++++++++++++-- python/nwm_client_new/setup.cfg | 59 ---------------------------- python/svi_client/pyproject.toml | 44 +++++++++++++++++++-- python/svi_client/setup.cfg | 50 ----------------------- setup.cfg | 46 ---------------------- 16 files changed, 332 insertions(+), 419 deletions(-) delete mode 100644 python/_restclient/setup.cfg delete mode 100644 python/caches/setup.cfg delete mode 100644 python/events/setup.cfg delete mode 100644 python/nwis_client/setup.cfg delete mode 100644 python/nwm_client/setup.cfg delete mode 100644 python/nwm_client_new/setup.cfg delete mode 100644 python/svi_client/setup.cfg delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index f41dc8bb..50b3885b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,45 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel", - "pip" -] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" + +[project] +name = "hydrotools" +authors = [ + { name = "Jason A. Regina", email = "jason.regina@noaa.gov" }, + { name = "Austin Raney", email = "austin.raney@noaa.gov" }, +] +description = "Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", +] +dependencies = [ + "hydrotools.nwis_client>=3.2.1", + "hydrotools.nwm_client[gcp]>=5.0.3", + "hydrotools.events>=1.1.5", + "hydrotools.metrics>=1.2.3", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools" +Repository = "https://github.com/NOAA-OWP/hydrotools" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/_restclient/pyproject.toml b/python/_restclient/pyproject.toml index 7b52b9ba..c65d451c 100644 --- a/python/_restclient/pyproject.toml +++ b/python/_restclient/pyproject.toml @@ -1,6 +1,43 @@ [build-system] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=42", - "wheel", + +[project] +name = "hydrotools._restclient" +authors = [{ name = "Austin Raney", email = "aaraney@protonmail.com" }] +description = "General REST api client with built in request caching and retries." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", ] +dependencies = [ + "aiohttp", + "aiohttp_client_cache[sqlite]>=0.9.0", + "python-forge", + "aiosqlite", + "pandas", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools._restclient._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest", "pytest-aiohttp"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools._restclient.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/_restclient" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/_restclient/setup.cfg b/python/_restclient/setup.cfg deleted file mode 100644 index 2980abad..00000000 --- a/python/_restclient/setup.cfg +++ /dev/null @@ -1,47 +0,0 @@ -[metadata] -name = hydrotools._restclient -version = attr: hydrotools._restclient._version.__version__ -author = Austin Raney -author_email = aaraney@protonmail.com -description = General REST api client with built in request caching and retries. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools._restclient.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/_restclient - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - aiohttp - aiohttp_client_cache[sqlite]>=0.9.0 - python-forge - aiosqlite - pandas -python_requires = >=3.7 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest - pytest-aiohttp diff --git a/python/caches/pyproject.toml b/python/caches/pyproject.toml index f41dc8bb..0cbad438 100644 --- a/python/caches/pyproject.toml +++ b/python/caches/pyproject.toml @@ -1,7 +1,37 @@ [build-system] -requires = [ - "setuptools>=42", - "wheel", - "pip" -] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" + +[project] +name = "hydrotools.caches" +authors = [{ name = "Jason A. Regina", email = "jason.regina@noaa.gov" }] +description = "Variety of object caching utilities for OWPHydroTools." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", +] +dependencies = ["pandas", "tables"] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools.caches._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools.caches.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/caches" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/caches/setup.cfg b/python/caches/setup.cfg deleted file mode 100644 index 1b19c35a..00000000 --- a/python/caches/setup.cfg +++ /dev/null @@ -1,44 +0,0 @@ -[metadata] -name = hydrotools.caches -version = attr: hydrotools.caches._version.__version__ -author = Jason A. Regina -author_email = jason.regina@noaa.gov -description = Variety of object caching utilities for OWPHydroTools. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools.caches.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/caches - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - pandas - tables -python_requires = >=3.7 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest - \ No newline at end of file diff --git a/python/events/pyproject.toml b/python/events/pyproject.toml index 7b52b9ba..d9d08283 100644 --- a/python/events/pyproject.toml +++ b/python/events/pyproject.toml @@ -1,6 +1,37 @@ [build-system] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=42", - "wheel", + +[project] +name = "hydrotools.events" +authors = [{ name = "Jason A. Regina", email = "jason.regina@noaa.gov" }] +description = "Various methods to support event-based evaluations." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", ] +dependencies = ["pandas"] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools.events.event_detection._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools.events.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/events" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/events/setup.cfg b/python/events/setup.cfg deleted file mode 100644 index 63205390..00000000 --- a/python/events/setup.cfg +++ /dev/null @@ -1,43 +0,0 @@ -[metadata] -name = hydrotools.events -version = attr: hydrotools.events.event_detection._version.__version__ -author = Jason A. Regina -author_email = jason.regina@noaa.gov -description = Various methods to support event-based evaluations. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools.events.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/events - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - pandas -python_requires = >=3.7 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest - \ No newline at end of file diff --git a/python/nwis_client/pyproject.toml b/python/nwis_client/pyproject.toml index 7b52b9ba..c4857941 100644 --- a/python/nwis_client/pyproject.toml +++ b/python/nwis_client/pyproject.toml @@ -1,6 +1,46 @@ [build-system] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=42", - "wheel", + +[project] +name = "hydrotools.nwis_client" +authors = [{ name = "Austin Raney", email = "aaraney@protonmail.com" }] +description = "A convenient interface to the USGS NWIS Instantaneous Values (IV) REST Service API." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", ] +dependencies = [ + "pandas", + "numpy", + "hydrotools._restclient>=3.0.4", + "aiohttp", + "click", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools.nwis_client._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest", "pytest-aiohttp"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools.nwis_client.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/nwis_client" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" + +[project.scripts] +nwis-client = "hydrotools.nwis_client.cli:run" diff --git a/python/nwis_client/setup.cfg b/python/nwis_client/setup.cfg deleted file mode 100644 index 346417a8..00000000 --- a/python/nwis_client/setup.cfg +++ /dev/null @@ -1,52 +0,0 @@ -[metadata] -name = hydrotools.nwis_client -version = attr: hydrotools.nwis_client._version.__version__ -author = Austin Raney -author_email = aaraney@protonmail.com -description = A convenient interface to the USGS NWIS Instantaneous Values (IV) REST Service API. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools.nwis_client.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/nwis_client - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - pandas - numpy - hydrotools._restclient>=3.0.4 - aiohttp - click -python_requires = >=3.7 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest - pytest-aiohttp - -[options.entry_points] -console_scripts = - nwis-client = hydrotools.nwis_client.cli:run - \ No newline at end of file diff --git a/python/nwm_client/pyproject.toml b/python/nwm_client/pyproject.toml index 7b52b9ba..c7c27126 100644 --- a/python/nwm_client/pyproject.toml +++ b/python/nwm_client/pyproject.toml @@ -1,6 +1,47 @@ [build-system] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=42", - "wheel", + +[project] +name = "hydrotools.nwm_client" +authors = [{ name = "Jason A. Regina", email = "jason.regina@noaa.gov" }] +description = "Retrieve National Water Model data from various sources." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", ] +dependencies = [ + "numpy>=1.20.0", + "pandas", + "xarray", + "h5netcdf>=0.14.0", + "hydrotools.caches>=0.1.2", + "beautifulsoup4", + "requests", + "google-cloud-storage", + "pint", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools.nwm_client._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools.nwm_client.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/nwm_client" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/nwm_client/setup.cfg b/python/nwm_client/setup.cfg deleted file mode 100644 index 06f684b4..00000000 --- a/python/nwm_client/setup.cfg +++ /dev/null @@ -1,50 +0,0 @@ -[metadata] -name = hydrotools.nwm_client -version = attr: hydrotools.nwm_client._version.__version__ -author = Jason A. Regina -author_email = jason.regina@noaa.gov -description = Retrieve National Water Model data from various sources. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools.nwm_client.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/nwm_client - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - numpy>=1.20.0 - pandas - xarray - h5netcdf>=0.14.0 - hydrotools.caches>=0.1.2 - beautifulsoup4 - requests - google-cloud-storage - pint -python_requires = >=3.7 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest diff --git a/python/nwm_client_new/pyproject.toml b/python/nwm_client_new/pyproject.toml index 7b52b9ba..9ea48bbf 100644 --- a/python/nwm_client_new/pyproject.toml +++ b/python/nwm_client_new/pyproject.toml @@ -1,6 +1,55 @@ [build-system] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=42", - "wheel", + +[project] +name = "hydrotools.nwm_client_new" +authors = [{ name = "Jason A. Regina", email = "jason.regina@noaa.gov" }] +description = "Retrieve National Water Model data from various sources." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", ] +dependencies = [ + "numpy>=1.20.0", + "pandas", + "xarray", + "beautifulsoup4", + "google-cloud-storage", + "dask", + "pyarrow", + "aiohttp", + "aiofiles", + "netcdf4", + "tables", + "pint", + "azure-storage-blob", + "planetary-computer", + "adlfs", + "hydrotools._restclient", + "dask[dataframe]", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools.nwm_client_new._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools.nwm_client_new.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/nwm_client_new" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/nwm_client_new/setup.cfg b/python/nwm_client_new/setup.cfg deleted file mode 100644 index be28552d..00000000 --- a/python/nwm_client_new/setup.cfg +++ /dev/null @@ -1,59 +0,0 @@ -[metadata] -name = hydrotools.nwm_client_new -version = attr: hydrotools.nwm_client_new._version.__version__ -author = Jason A. Regina -author_email = jason.regina@noaa.gov -description = Retrieve National Water Model data from various sources. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools.nwm_client.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/nwm_client - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.12 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - numpy>=1.20.0 - pandas - xarray - beautifulsoup4 - google-cloud-storage - dask - pyarrow - aiohttp - aiofiles - netcdf4 - tables - pint - azure-storage-blob - planetary-computer - adlfs - hydrotools._restclient - dask[dataframe] -python_requires = >=3.8 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest diff --git a/python/svi_client/pyproject.toml b/python/svi_client/pyproject.toml index 7b52b9ba..171b1ae6 100644 --- a/python/svi_client/pyproject.toml +++ b/python/svi_client/pyproject.toml @@ -1,6 +1,44 @@ [build-system] +requires = ["setuptools>=70"] build-backend = "setuptools.build_meta" -requires = [ - "setuptools>=42", - "wheel", + +[project] +name = "hydrotools.svi_client" +authors = [{ name = "Austin Raney", email = "aaraney@protonmail.com" }] +description = "Retrieve Social Vulnerability Index data from The Center for Disease Control / The Agency for Toxic Substances and Disease Registry." +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: Free To Use But Restricted", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Topic :: Scientific/Engineering :: Hydrology", + "Operating System :: OS Independent", ] +dependencies = [ + "hydrotools._restclient", + "numpy >=1.20.0", + "pandas", + "geopandas", + "pydantic", + "typing_extensions", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = { attr = "hydrotools.svi_client._version.__version__" } + +[project.optional-dependencies] +develop = ["pytest", "pytest-aiohttp"] + +[project.urls] +Homepage = "https://github.com/NOAA-OWP/hydrotools" +Documentation = "https://noaa-owp.github.io/hydrotools/hydrotools.svi_client.html" +Repository = "https://github.com/NOAA-OWP/hydrotools/tree/main/python/svi_client" +"Bug Tracker" = "https://github.com/NOAA-OWP/hydrotools/issues" diff --git a/python/svi_client/setup.cfg b/python/svi_client/setup.cfg deleted file mode 100644 index 6085b585..00000000 --- a/python/svi_client/setup.cfg +++ /dev/null @@ -1,50 +0,0 @@ -[metadata] -name = hydrotools.svi_client -version = attr: hydrotools.svi_client._version.__version__ -author = Austin Raney -author_email = aaraney@protonmail.com -description = Retrieve Social Vulnerability Index data from The Center for Disease Control / The Agency for Toxic Substances and Disease Registry. -long_description = file: README.md -long_description_content_type = text/markdown -charset = UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/hydrotools.svi_client.html - Source = https://github.com/NOAA-OWP/hydrotools/tree/main/python/svi_client - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering - Topic :: Sociology - Intended Audience :: Science/Research - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - hydrotools._restclient - numpy >=1.20.0 - pandas - geopandas - pydantic - typing_extensions -python_requires = >=3.7 - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest - pytest-aiohttp diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index f64b61a1..00000000 --- a/setup.cfg +++ /dev/null @@ -1,46 +0,0 @@ -[metadata] -name = hydrotools -version = attr: hydrotools._version.__version__ -author = Jason A. Regina and Austin Raney -author_email = jason.regina@noaa.gov -description = Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data. -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -license = USDOC -license_files = - LICENSE -url = https://github.com/NOAA-OWP/hydrotools -project_urls = - Documentation = https://noaa-owp.github.io/hydrotools/ - Source = https://github.com/NOAA-OWP/hydrotools/ - Tracker = https://github.com/NOAA-OWP/hydrotools/issues -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Education - Intended Audience :: Science/Research - License :: Free To Use But Restricted - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Topic :: Scientific/Engineering :: Hydrology - Operating System :: OS Independent - -[options] -packages = find_namespace: -package_dir = - =src -install_requires = - hydrotools.nwis_client>=3.2.1 - hydrotools.nwm_client[gcp]>=5.0.3 - hydrotools.events>=1.1.5 - hydrotools.metrics>=1.2.3 -python_requires = >=3.7 -include_package_data = True - -[options.packages.find] -where = src - -[options.extras_require] -develop = - pytest - \ No newline at end of file From d9a511c0e8f613c032c1b134a7fa636730403a5e Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 15:23:38 -0500 Subject: [PATCH 3/7] test: provide loop explicitly; aiohttp >= 3.10 reqs a running event loop --- python/_restclient/tests/test_client.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/python/_restclient/tests/test_client.py b/python/_restclient/tests/test_client.py index 214adef0..1e0e145a 100644 --- a/python/_restclient/tests/test_client.py +++ b/python/_restclient/tests/test_client.py @@ -82,13 +82,11 @@ async def test_get_check_cache(basic_test_server): assert r2.from_cache is True -def test_get_non_async(basic_test_server, loop): - with pytest.warns(DeprecationWarning): - # throws DeprecationWarning b.c. session not create in async func - session = ClientSession() - resp_coro = session.get(basic_test_server["uri"]) - resp = loop.run_until_complete(resp_coro) - assert loop.run_until_complete(resp.json()) == basic_test_server["data"] +def test_get_non_async(basic_test_server, event_loop): + session = ClientSession(loop=event_loop) + resp_coro = session.get(basic_test_server["uri"]) + resp = event_loop.run_until_complete(resp_coro) + assert event_loop.run_until_complete(resp.json()) == basic_test_server["data"] @pytest.fixture From 9b9fcfa3c2fad0a41d10c48325568087157bf947 Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 16:09:40 -0500 Subject: [PATCH 4/7] fix: pin 1.20.0<=numpy<2 for python<3.10; see #263 --- python/nwm_client_new/pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/python/nwm_client_new/pyproject.toml b/python/nwm_client_new/pyproject.toml index 9ea48bbf..66390704 100644 --- a/python/nwm_client_new/pyproject.toml +++ b/python/nwm_client_new/pyproject.toml @@ -22,6 +22,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ + "numpy>=1.20.0, <2; python_version<'3.10'", "numpy>=1.20.0", "pandas", "xarray", From 17c00903902003eb45b5d9377bece086a55ac48e Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 16:25:05 -0500 Subject: [PATCH 5/7] fix: pin numpy<2 for python<3.10; see #263 --- python/caches/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/caches/pyproject.toml b/python/caches/pyproject.toml index 0cbad438..50c7e73a 100644 --- a/python/caches/pyproject.toml +++ b/python/caches/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Hydrology", "Operating System :: OS Independent", ] -dependencies = ["pandas", "tables"] +dependencies = ["numpy<2; python_version<'3.10'", "pandas", "tables"] dynamic = ["version"] [tool.setuptools.dynamic] From a478a3eac5465c619ee2309d88a525d077c5cdff Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 16:43:50 -0500 Subject: [PATCH 6/7] docs: add Jason as nwis_client co-author --- python/nwis_client/pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/nwis_client/pyproject.toml b/python/nwis_client/pyproject.toml index c4857941..648ccc3a 100644 --- a/python/nwis_client/pyproject.toml +++ b/python/nwis_client/pyproject.toml @@ -4,7 +4,10 @@ build-backend = "setuptools.build_meta" [project] name = "hydrotools.nwis_client" -authors = [{ name = "Austin Raney", email = "aaraney@protonmail.com" }] +authors = [ + { name = "Austin Raney", email = "aaraney@protonmail.com" }, + { name = "Jason A. Regina", email = "jason.regina@noaa.gov" }, +] description = "A convenient interface to the USGS NWIS Instantaneous Values (IV) REST Service API." readme = "README.md" requires-python = ">=3.8" From cf6972334dbb8e7f7f37633734816434429759dd Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Tue, 19 Nov 2024 16:48:13 -0500 Subject: [PATCH 7/7] chore: bump subpackage patch versions (sans metrics) --- python/_restclient/src/hydrotools/_restclient/_version.py | 2 +- python/caches/src/hydrotools/caches/_version.py | 2 +- python/events/src/hydrotools/events/event_detection/_version.py | 2 +- python/nwis_client/src/hydrotools/nwis_client/_version.py | 2 +- python/nwm_client/src/hydrotools/nwm_client/_version.py | 2 +- python/nwm_client_new/src/hydrotools/nwm_client_new/_version.py | 2 +- python/svi_client/src/hydrotools/svi_client/_version.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python/_restclient/src/hydrotools/_restclient/_version.py b/python/_restclient/src/hydrotools/_restclient/_version.py index f5f41e56..d539d50c 100644 --- a/python/_restclient/src/hydrotools/_restclient/_version.py +++ b/python/_restclient/src/hydrotools/_restclient/_version.py @@ -1 +1 @@ -__version__ = "3.1.0" +__version__ = "3.1.1" diff --git a/python/caches/src/hydrotools/caches/_version.py b/python/caches/src/hydrotools/caches/_version.py index ae736254..bbab0242 100644 --- a/python/caches/src/hydrotools/caches/_version.py +++ b/python/caches/src/hydrotools/caches/_version.py @@ -1 +1 @@ -__version__ = "0.1.3" +__version__ = "0.1.4" diff --git a/python/events/src/hydrotools/events/event_detection/_version.py b/python/events/src/hydrotools/events/event_detection/_version.py index 1436d8fe..bf788263 100644 --- a/python/events/src/hydrotools/events/event_detection/_version.py +++ b/python/events/src/hydrotools/events/event_detection/_version.py @@ -1 +1 @@ -__version__ = "1.1.6" +__version__ = "1.1.7" diff --git a/python/nwis_client/src/hydrotools/nwis_client/_version.py b/python/nwis_client/src/hydrotools/nwis_client/_version.py index 903a158a..a5cfdf59 100644 --- a/python/nwis_client/src/hydrotools/nwis_client/_version.py +++ b/python/nwis_client/src/hydrotools/nwis_client/_version.py @@ -1 +1 @@ -__version__ = "3.4.0" +__version__ = "3.4.1" diff --git a/python/nwm_client/src/hydrotools/nwm_client/_version.py b/python/nwm_client/src/hydrotools/nwm_client/_version.py index 36887081..1070cc03 100644 --- a/python/nwm_client/src/hydrotools/nwm_client/_version.py +++ b/python/nwm_client/src/hydrotools/nwm_client/_version.py @@ -1 +1 @@ -__version__ = "5.1.3" +__version__ = "5.1.4" diff --git a/python/nwm_client_new/src/hydrotools/nwm_client_new/_version.py b/python/nwm_client_new/src/hydrotools/nwm_client_new/_version.py index b5194969..b820814e 100644 --- a/python/nwm_client_new/src/hydrotools/nwm_client_new/_version.py +++ b/python/nwm_client_new/src/hydrotools/nwm_client_new/_version.py @@ -1 +1 @@ -__version__ = "7.4.3" +__version__ = "7.4.4" diff --git a/python/svi_client/src/hydrotools/svi_client/_version.py b/python/svi_client/src/hydrotools/svi_client/_version.py index 3b93d0be..27fdca49 100644 --- a/python/svi_client/src/hydrotools/svi_client/_version.py +++ b/python/svi_client/src/hydrotools/svi_client/_version.py @@ -1 +1 @@ -__version__ = "0.0.2" +__version__ = "0.0.3"