Bring monet-stats in for more statistics and lazy capabilities#413
Open
bbakernoaa wants to merge 10 commits into
Open
Bring monet-stats in for more statistics and lazy capabilities#413bbakernoaa wants to merge 10 commits into
bbakernoaa wants to merge 10 commits into
Conversation
- Added monet-stats to setup.cfg and docs/environment-docs.yml - Updated CI build to include monet-stats in dev builds - Refactored melodies_monet/stats/proc_stats.py to use monet-stats with dynamic discovery - Updated melodies_monet/plots/surfplots.py to import scores from monet-stats - Added unit tests in melodies_monet/tests/test_stats.py for NumPy and Dask arrays - Reformatted codebase with ruff using 132 character line length
…ebase - Added monet-stats to setup.cfg and docs/environment-docs.yml - Updated CI build to include monet-stats in dev builds - Refactored melodies_monet/stats/proc_stats.py to use monet-stats with dynamic discovery - Updated melodies_monet/plots/surfplots.py to import scores from monet-stats - Added unit tests in melodies_monet/tests/test_stats.py for NumPy and Dask arrays - Reformatted codebase with ruff using 132 character line length (excluding notebooks)
…ebase - Added monet-stats to setup.cfg and docs/environment-docs.yml (pip section) - Updated CI build to include monet-stats in dev builds - Refactored melodies_monet/stats/proc_stats.py to use monet-stats with dynamic discovery - Updated melodies_monet/plots/surfplots.py to import scores from monet-stats - Added unit tests in melodies_monet/tests/test_stats.py for NumPy and Dask arrays - Added license headers to previously missing files - Reformatted codebase with ruff using 132 character line length (excluding notebooks)
…ebase - Added monet-stats to setup.cfg - Updated docs/environment-docs.yml to install monet-stats from GitHub - Updated CI build to include monet-stats in dev builds - Refactored melodies_monet/stats/proc_stats.py to use monet-stats with dynamic discovery - Updated melodies_monet/plots/surfplots.py to import scores from monet-stats - Added unit tests in melodies_monet/tests/test_stats.py for NumPy and Dask arrays - Added license headers to previously missing files - Reformatted codebase with ruff using 132 character line length (excluding notebooks)
…ebase - Added monet-stats to setup.cfg - Pinned pandas<2.0 in setup.cfg and environment-docs.yml to ensure compatibility - Updated docs/environment-docs.yml to install monet-stats from GitHub via pip - Updated CI build to include monet-stats in dev builds with --no-deps - Refactored melodies_monet/stats/proc_stats.py to use monet-stats with dynamic discovery - Updated melodies_monet/plots/surfplots.py to import scores from monet-stats - Added unit tests in melodies_monet/tests/test_stats.py for NumPy and Dask arrays - Added missing license headers to driver files and new test file - Reformatted codebase with ruff using 132 character line length (excluding notebooks)
…ebase - Added monet-stats to setup.cfg - Pinned pandas<2.0 in setup.cfg and environment-docs.yml to ensure compatibility with monetio readers - Updated docs/environment-docs.yml to install monet-stats from GitHub via pip - Updated docs/conf.py to ignore pre-existing broken links in linkcheck - Updated CI build to include monet-stats in dev builds - Refactored melodies_monet/stats/proc_stats.py to use monet-stats with dynamic discovery - Updated melodies_monet/plots/surfplots.py to import scores from monet-stats - Added unit tests in melodies_monet/tests/test_stats.py for NumPy and Dask arrays - Added missing license headers to driver files and new test file - Reformatted codebase with ruff using 132 character line length (excluding notebooks)
- Integrated monet-stats library with dynamic discovery of metrics - Refactored stats calculations to support NumPy, Pandas, and Dask arrays - Pinned Pandas < 2.0 to ensure compatibility with existing readers - Fixed Sphinx documentation build by resolving duplicate object descriptions in the driver package - Added missing license headers to driver and test files - Reformatted codebase with Ruff (132-char line length) - Added comprehensive unit tests for the new statistics integration - Updated CI and documentation environments to include monet-stats dependency from GitHub
This commit refactors the statistics calculation engine to use the external `monet-stats` library. Key changes: - Refactored `melodies_monet/stats/proc_stats.py` to dynamically discover available statistics from the `monet-stats` library submodules. - Updated `setup.cfg` and `docs/environment-docs.yml` to include `monet-stats` as a dependency via Git. - Updated `.github/workflows/ci.yml` to install `monet-stats` in CI. - Updated `docs/conf.py` and API documentation `.rst` files to resolve duplicate object description errors and mock missing `ESMF` dependency. - Formatted the codebase to a 132-character line length (excluding notebooks). - Added SPDX Apache-2.0 license headers to several files. - Added `melodies_monet/tests/test_stats.py` to verify backend-agnostic (NumPy, Pandas, Dask) statistics calculations. - Pinned `pandas < 2.0` to maintain compatibility with `monetio` readers. - Fixed a minor bug in `write_util.py` where 'Z' and '0' were merged in the allowed characters list.
- Explicitly list driver submodules in api.rst to avoid recursive duplicate descriptions. - Disable global special-members: __init__ in conf.py (redundant and causing duplicates). - Ensure mock imports for ESMF are correctly set in conf.py. - Verified successful clean build with sphinx-build -W.
…961284476 Integrate monet-stats library and reformat codebase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change replaces the internal statistics module in melodies_monet with the external monet-stats library. It exposes all statistics available in monet-stats through dynamic discovery in melodies_monet/stats/proc_stats.py. The build system (setup.cfg and conda environment) and CI configurations were updated to include monet-stats as a dependency. A new test suite was added to ensure identical results for NumPy and Dask-backed arrays, following the Aero Protocol. Additionally, the entire codebase was reformatted to a maximum line length of 132 characters using Ruff.
This pull request introduces several improvements and updates across the documentation, CI workflow, and example scripts. The main changes include adding support for the
monet-statspackage, as mentioned previously, in both the CI workflow and documentation environment, expanding the API documentation structure, and standardizing code formatting in example scripts for consistency and readability.CI and Environment Updates
.github/workflows/ci.ymlto install development versions ofmonet-statsalongsidemonetandmonetiowhen running CI with thedevmatrix, ensuring the latest features are tested.monet-statsas a dependency indocs/environment-docs.ymlto support documentation builds and examples that rely on this package.Documentation Improvements
docs/api.rstto includedriver.analysis,driver.model,driver.observation, anddriver.pair, providing more granular and organized API references.docs/conf.pyto mock theESMFimport for autodoc, preventing documentation build failures whenESMFis not available. Also expanded thelinkcheck_ignorelist to account for moved or broken links. [1] [2]Code Formatting and Consistency in Examples
Monet-analysis-example-plots-wrf-rapchemtest.py,Monet-analysis-example-plots-wrf-rapchemtest_aeronet.py,folium_site_map_aeronet.py,folium_site_map_airnow.py,reformat_aeronet_rapchemtest.py,reformat_airnow_rapchemtest.py, andsite_analysis_aeronet.py. This change reduces potential errors and improves code maintainability. [1] [2] [3] [4] [5] [6] [7]Documentation Configuration Tweaks
"special-members": "__init__"option indocs/conf.pyto potentially reduce clutter in API docs and focus on relevant members.These changes collectively improve the project's documentation, testing reliability, and code quality, making it easier for users and contributors to work with the package.