-
Notifications
You must be signed in to change notification settings - Fork 4
Move addheader to ./bin/ with various refactoring and lint style fixes. #198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: edge
Are you sure you want to change the base?
Conversation
* Change constants to `UPPER_CASE` as suggested by linters and PEP8 * Wrap action in main function for better isolation * Switch to fileio helpers instead of raw open+read/write+close * Automatic python module load path lookup from cmd parent path if insuffient * Simplify some `if X: return True` constructs as suggested by linters * Normalize path patterns to actually make the ../X ones work Adjust the addition of shebang interpreter and encoding lines to actually do what the label says. Add new bin, sbin and mig/lib dirs to projcode paths.
…bit and changed strings to use double quotes. Applied `isort` last to revert from the `black` import mangling and preserve our usual hanging indent imports.
…which optionally takes a list of languages to filter on or all by default. Make sure that there's at least a single blank line between license header and actual module content. Minor adjustments to fix style check warnings.
Fix language lookup and skip append if missing.
… and comment updates.
97cfd2a
to
9f9edb4
Compare
Hm - I'm not a fan of this in particular being in bin. It's not something that users of the system will invoke, it's an internal tool, so to me it feels like putting it there starts to dilute the purpose of the bin directory. Since this is really an internal thing and development facing I'd prefer to see it placed elsewhere - perhaps envhelp or similar as other development helpers. |
Well, on one hand I can see your point that it is not really relevant to site deployments, but that could be handled e.g. by simply filtering what we distribute in docker-migrid (or migrid releases) if that's a concern. As noted in the new associated milestone one important part of the motivation for having a shared We could consider introducing the corresponding FHS |
Fair enough. Given that interpretation I think we should place it in bin for consistency. |
Move addheader.py to ./bin/ with various refactoring and lint style fixes:
UPPER_CASE
as suggested by linters and PEP8shared.fileio
helpers instead of raw open+read/write+closeif X: return True
constructs as suggested by lintersprojcode
workAdjust the addition of shebang interpreter and encoding lines to actually do what the label says.
Add new
bin
,sbin
andmig/lib
dirs toprojcode
paths.