opencdms-dev / pyopencdms-old

⭐🐍 pyopencdms aims to build a common Python API on top of multiple Climate Data Management Systems (CDMS) that use different underlying database engines
MIT License
4 stars 6 forks source link

Adopt Black auto code formatter #96

Closed isedwards closed 1 year ago

isedwards commented 1 year ago

In the past I've avoided using "uncompromising code formatters" and I've preferred some flexibility in style, but I think it would be helpful in OpenCDMS where we are expecting to serve a wide audience.

I suggest we adopt black for automatic code formatting for the following reasons:

  1. It has achieved wide spread adoption and is now a project of the Python Software Foundation
  2. It has been adopted by some of our code dependencies, e.g. see SQLAlchemy dev docs and Pandas dev docs

It would remove the need for # noqa comments (instead we just accept Black's formatting) and it would automatically take care of conventions like adding a trailing comma to lists -- so we won't have to worry about conventions like this in code reviews.

isedwards commented 1 year ago

@david-i-berry @chinedu117

⚠️ I've moved the original version of pyopencdms to https://github.com/opencdms-dev ⚠️

The original version has code that is used by climsoft-api and also has other features like example pygeoapi providers for Climsoft and SURFACE.

There is now a new cleaned up version of pyopencdms at https://github.com/opencdms/pyopencdms -- everything in this new repository will be built around the Climate Data Model.

The new repo is now using black for automated code formatting.