metoppv / improver

IMPROVER is a library of algorithms for meteorological post-processing.
http://improver.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
103 stars 85 forks source link

Using a more recent version of black #1703

Open cpelley opened 2 years ago

cpelley commented 2 years ago

As discussed in https://github.com/metoppv/improver/pull/1702, we currently pin 'black' to 19.10b0 for both environment_a.yml and environment_b.yml. This gives rise to problems without pinning of its dependency 'click' (more information here: https://github.com/psf/black/issues/2964).

For recent versions of black, this dependency issue with click has been resolved (>=22.3.0). The question is then whether our pinning of black to 19.10b0 for environment_a.yml and environment_b.yml are strictly necessary? Can we update this pinning to >=22.3.0 This does give rise to issues presented by black though I haven't looked at those changes in detail.

cpelley commented 2 years ago

@gavinevans @bayliffe is our pinning of black to 19.10b0 for environment_a.yml and environment_b.yml strictly necessary?

bayliffe commented 2 years ago

@cpelley I don't think we pin for any reason other than leaving it floating means it can change underneath us. The github actions environment that is built can then differ from the local environment and we get test failures on PRs. Updating this would be fine by me, as long as the PR captured all of the changes required to conform to the newer version. It would also be worth ensuring it plays nicely with whatever version of isort we end up with as the two can ping-pong back and forth with particular combinations of versions.