Skip to content

Feature #591 remove unused dependencies - #592

Merged
bikegeek merged 3 commits into
developfrom
feature_591_remove_unused_deps
Oct 27, 2026
Merged

bikegeek merged 3 commits into
developfrom
feature_591_remove_unused_deps

Conversation

@georgemccabe

@georgemccabe georgemccabe commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Change Summary

Describe the changes proposed by this pull request:

Resolves #591.

  • Remove imutils, eofs and pint from requirements.txt (and pint from nco_requirements.txt). None are imported by METplotpy; pint is still installed as a dependency of metpy.
  • Remove the process-wide warnings.filterwarnings("error") from ROCDiagramSeries. It was only there for test_pct_no_warnings, which now uses pytest.mark.filterwarnings("error::FutureWarning") instead. This fixes the 8 ROC diagram failures with pandas 3.1.
  • Taylor diagram: pass apply_theta_transforms=False to PolarTransform so Matplotlib 3.10 does not warn on creation or inversion, and ignore only the one-time warning Matplotlib 3.11 gives for passing the argument. A comment notes that both can be removed once the minimum Matplotlib is 3.11.
  • Resolve pandas 3.1 deprecations: remove float_precision='round_trip' from read_csv calls, replace inplace= calls with reassignment, and remove the mode.chained_assignment option, which has had no effect since pandas 3.0.
  • Unit test workflow: the Python 3.12 job's pandas<3 pin was overridden by pandas>=3.0.2 in the requirements files. The job now installs the minimum versions listed in the METplotpy and METcalcpy requirements files, and the Python 3.14 job still installs the latest versions.

Pull Request Testing

  • Describe testing already performed for these changes:

    Ran the full pytest suite locally in the v13.0 conda environment (Python 3.14, pandas 3.0.2, Matplotlib 3.10.8): 62 passed, 21 skipped, no warnings from METplotpy code. Before these changes, the 3 Taylor diagram tests failed locally, and the 8 ROC diagram tests failed in GitHub Actions with pandas 3.1.0.

  • Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:

    Review the GitHub Actions results for both Python versions. The Python 3.12 job prints the pinned minimum versions in the "Install dependencies" step. Remaining warnings from METcalcpy (sort_by_thresh, _calc_pct_roc, event_equalize) and from metpy's skewt.py are expected until those packages are updated.

  • Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [No] The weather regime and TC RMW docs still list eofs and pint as prerequisites.

  • Do these changes include sufficient testing updates? [Yes]

  • Will this PR result in changes to the test suite? [No]

    If yes, describe the new output and/or changes to the existing output:

    No changes to output are expected. Removing float_precision='round_trip' makes no difference on pandas 3.1, but on pandas 3.0.x parsed floats could differ in the last digit.

  • Do these changes introduce new SonarQube findings? [No]

    If yes, please describe:

  • Please complete this pull request review by 10/28/2026.

Pull Request Checklist

See the METplus Workflow for details.

  • Add any new Python packages to the METplus Components Python Requirements table.
  • Review the source issue metadata (required labels, projects, and milestone).
  • Complete the PR definition above.
  • Ensure the PR title matches the feature or bugfix branch name.
  • Define the PR metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the version that will include these changes
    Select: Coordinated METplus-X.Y Support project for bugfix releases and/or METplus-X.Y Development project for the next coordinated release
  • After submitting the PR, select the ⚙️ icon in the Development section of the right hand sidebar. Search for the issue that this PR will close and select it, if it is not already selected.
  • After the PR is approved, merge your changes. If permissions do not allow this, request that the reviewer do the merge.
  • Close the linked issue and delete your feature or bugfix branch from GitHub.

🤖 Generated with Claude Code

georgemccabe and others added 3 commits October 26, 2026 11:32
None of these packages are imported by METplotpy. imutils and eofs were
carried over from a requirements list shared with METcalcpy, and pint is
installed as a dependency of metpy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Remove the process-wide warnings.filterwarnings("error") from
  ROCDiagramSeries. It was added only so test_pct_no_warnings could detect
  FutureWarnings, but it turned every later warning into an exception, which
  broke the ROC tests when pandas 3.1 added new deprecation warnings. The
  test now scopes the check with pytest.mark.filterwarnings.
- Taylor diagram: pass apply_theta_transforms=False to PolarTransform so
  Matplotlib 3.10 does not warn on creation or inversion, and ignore the
  one-time warning Matplotlib 3.11 gives for passing the argument.
- Remove the deprecated float_precision argument from read_csv calls.
- Replace inplace= calls with reassignment (PDEP-8).
- Remove the mode.chained_assignment option, which has no effect since
  pandas 3.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pandas<3 pin for the Python 3.12 job was overridden by pandas>=3.0.2 in
the requirements files. Instead, install the minimum versions listed in the
METplotpy and METcalcpy requirements files for Python 3.12, while Python 3.14
continues to install the latest versions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@georgemccabe georgemccabe added this to the METplotpy-13.0.0 milestone Oct 26, 2026
@github-project-automation github-project-automation Bot moved this to 🩺 Needs Triage in METplus-13.0 Development Oct 26, 2026
@georgemccabe georgemccabe moved this from 🩺 Needs Triage to 🔎 In review in METplus-13.0 Development Oct 26, 2026
@georgemccabe
georgemccabe marked this pull request as ready for review October 26, 2026 22:24
@georgemccabe
georgemccabe requested a review from bikegeek October 26, 2026 22:24
@bikegeek
bikegeek merged commit 5fb6ef0 into develop Oct 27, 2026
11 of 14 checks passed
@github-project-automation github-project-automation Bot moved this from 🔎 In review to 🏁 Done in METplus-13.0 Development Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏁 Done

Development

Successfully merging this pull request may close these issues.

Remove unused dependencies and resolve pandas 3.1 and Matplotlib deprecation warnings

2 participants