spacetelescope / style-guides

An opinionated guide on how we work.
Creative Commons Attribution 4.0 International
55 stars 33 forks source link

Adopt the Scientific Python Developers Guide #122

Open WilliamJamieson opened 1 year ago

WilliamJamieson commented 1 year ago

The Scientific Python Project is an organization dedicated to coordinating the efforts of contributors and maintainers of scientifically focused python packages by enabling coordination across the scientific python community. Among the things it provides is the Scientific Python Library Development Guide. This guide is intended to be a living (continually updated) set of recommendations and procedures built from the consensus of scientific python ecosystem to make current best practice recommendations. Among the things it covers are:

I propose that STScI should adopt this guide as a basis for its style guide (for at least Python based projects. This guide has evolved out of the lessons learned throughout the greater scientific python ecosystem. As a large percentage of STScI's projects are python based and directly contribute to or use the scientific python ecosystem, I believe that STScI should adopt this guide so that it can both benefit from and contribute to the lessons learned in the scientific python ecosystem. Furthermore, since this guide is actively maintained by the scientific python community STScI does not have to actively create or maintain the additional tools provided by Scientific Python to aid developers in following this guide.

In addition to the written documentation provided by this guide, the Scientific Python Organization has developed a tool (sp-repo-review)to evaluate how well the style of a project conforms to its style guide. This tool is both configurable to account for partial adoption of the guide (its recommendations by their nature cannot be totally universal) and run able by CI in order to ensure that a project conforms to the parts of the style guide the project has agreed to adopt.

Moreover, Scientific Python maintains a cookiecutter template (and other similar options) so that new projects can be started using the automated tooling to ensure the style guide is followed. This should make it much simpler for us to setup new projects in a way that can follow the recommendations from the guide.