New dev tool - Burocrata: Check and insert copyright and license notices into source code #139
leouieda
announced in
Announcements
Replies: 1 comment 2 replies
-
Love to see this! I write a little script and @leouieda turns it into a full CLI with I'm leaving the link to Burocrata's repo (that I didn't see in your post): https://github.com/fatiando/burocrata Just a few ideas (nothing urgent):
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
About
For a while now, we've had a Python script that @santisoler wrote to check if all our source code files start with a copyright and license notice (like this one. This script was copied to every repository in our organization and was used to make sure we don't forget to add the notice to new source files we create.
Found myself wanting to code something yesterday and finally got around to building a proper command-line (CLI) app for doing this. Burocrata is a little Python app that can check if the license notice is in the source files and optionally add it to any missing files. Our previous script hard-coded the license notice but Burocrata can read it from the
pyproject.toml
files.Using
Check that very
.py
file in a directory has a license notice:Removing the
--check
option will make Burocrata add the license notice tothe files that don't have them:
The license and copyright notice can be configured in a
pyproject.toml
filelocated in the directory where
burocrata
is run:Installing
Burocrata is available from PyPI:
A conda-forge package will be coming soon.
What do you think?
Feedback and code contributions are more than welcome!
Beta Was this translation helpful? Give feedback.
All reactions