ljvmiranda921 / pyswarms

A research toolkit for particle swarm optimization in Python
https://pyswarms.readthedocs.io/en/latest/
MIT License
1.28k stars 332 forks source link

Fix tests with Matplotlib 3.7 #509

Closed QuLogic closed 1 year ago

QuLogic commented 1 year ago

Description

SubplotBase is available in matplotlib.axes; there's no need to use the private path.

Related Issue

Fixes #508

Motivation and Context

How Has This Been Tested?

Ran tests with Matplotlib 3.7 and 3.6.3.

Types of changes

Checklist:

mmfarrugia commented 1 year ago

I ran into this issue and wasted hours working on it, so I thought I'd chime in to encourage someone to review this as it neither straightforward for the user to troubleshoot nor trivial for anyone trying to expand upon pyswarms or run tests. If more support is needed in reviewing code, I would be happy to volunteer.

ljvmiranda921 commented 1 year ago

Hi, sorry. I haven't been active in this repo for quite some time. I merged this PR since the diff is quite small. Thanks for bumping this up @mmfarrugia 🙇

mmfarrugia commented 1 year ago

Any time, I ran across it as one part of a project I am working on involves extending this framework to support constraints. If it is any additional validation, I made the same changes to my own fork and they have worked fine although I have not run the skipped tests or the flake yet.

On that note, I suppose I ought to then provide a heads up that I hope to submit my constrained support contribution to the open-source framework once it is completed and validated. It will undoubtedly be a much larger PR but won't be completed and submitted for a while as I have only just begun building out tests and probing the effectiveness of the architectural additions. If you attempted this in the past and have any thoughts they would be greatly appreciated, thank you for your work building and maintaining an accessible and well-constructed framework for researchers like myself.