lack / soundcraft-utils

Linux Utilities for Soundcraft Mixers
MIT License
30 stars 9 forks source link

Hacker housekeeping #10

Closed ndim closed 4 years ago

ndim commented 4 years ago

This does some housekeeping for hackers:

Feel free to compla^Wcomment and cherrypick.

lack commented 4 years ago

A couple general points before I dive too far in:

ndim commented 4 years ago

As to the flake8 settings...

I presume the end goal is to have code which does not generate flake8 errors at all. At this time however, running flake8 produces pages of flake8 errors which is many more than can be fixed in an easy and clear commit.

To move from pages of errors to no errors at all it can be a helpful tactic to first ignore everything, and then turn on the errors one error class after the other. The fixes for each error class will be a few related changes which can be read and understood in a commit. Eventually, there will be no ignored errors left, and the code will be clean. Doing that by ignoring error classes outside of the .flake8 file separates the flake8 errors we actually want to ignore indefinitely (those are .flake8 material) from the errors we ignore just as a tactic to keep the number of errors to be fixed down to a manageable number to help in fixing the source.

I agree that errors which need to be ignored indefinitely should be ignored from .flake8, e.g. the dbus XML docstrings in case they are actually needed as they are for the DBUS code working properly, I have not found out yet whether that is the case). Some of my followup commits in this series regarding flake8 deal with flake8 errors which must be ignored in the longer term, so those I should probably move to the .flake8 file.

As to the choice of a makefile...

Anyway, if you think it is a better idea to have that functionality in Python, I can write that in Python. E.g. move the generation of *.html from *.md to setup.py build, and everything else into tools/cleanup-sources.py and tools/run-all-checks.py scripts. That is a lot more to type (and I presume the tools/cleanup-sources.py will be run quite often while working on any Python sources).

And BTW...

The .gitignore and HACKING.md related commits are unrelated to anything makefile related.

I have put an updated, cleaned up version of this pull request at https://github.com/lack/soundcraft-utils/pull/11 which contains nothing makefile related until very late in the patch series.

ndim commented 4 years ago

Superseded by https://github.com/lack/soundcraft-utils/pull/12.