piccolbo / Pweave

Pweave is a scientific report generator and a literate programming tool for Python. It can capture the results and plots from data analysis and works well with numpy, scipy and matplotlib.

Home Page:http://mpastell.com/pweave

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tooling

piccolbo opened this issue · comments

@fgregg and I started a discussion about changing anything in the tooling for this project on the side of a PR. Let's have a dedicated place for this discussion. Multiple issues may be generated from this to track specific changes.

Formatting

We think of going with black because it provides a PEP-8 compliant normal form for the code, that is the actual formatting only depends on the parse tree. This minimizes diffs, enhances readability and reduces friction between devs. We were thinking of adding a CI action or a pre-commit one to implement this.

Reproducibility

Right now the normal setup.py build process doesn't freeze deps for everyone. That's good because we'd like pweave to work on a variety of environments, but on the other hand it's hard to just run a command and be in a controlled setting. The way I (@piccolbo) am currently solving this for other recent projects is a combination of setup.py for user builds and pipenv for devs. It does work, but pipenv breaks often, has been oversold and the main author has become downright abrasive in his interactions. poetry is the new kid on the block, covers both the regular user and the devs needs but is it going to last? Discuss, other options ....

Code quality

I find integrations with pyup and codeclimate useful and not costly. pyup helps with updating deps when necessary and codeclimate is surprisingly helpful in promoting code quality. The code duplication feature is great to fight code bloat. I would add the badge without forcing us to implement any recommendations. It's only a source of suggestions.

For me, i think we should decide on linters and the flavors of python you want to support, and then integrate into the CI. How people adjust the developement patterns to comply with those CI requirements is up to them.

OK, I thought a 0-effort solution was best but this is a good start anyway. Will reformat as soon as I merge the last open PR -- changes can be extensive and code tends to spread out a little so if you have lots of branches open let me know and I will wait -- don't want to have you spend time on conflict resolution, better avoid the conflicts.

black formatting is done merged and all. Integration with codeclimate done (https://codeclimate.com/github/piccolbo/Pweave/issues) not looking great. Will open some issues about that. @fgregg please pull master right away it's a big diff, will complicate any merge in the future.