Open Mandera opened 1 year ago
Might not be such a good idea to have generate.py to setup the dev environment, because it would require generalpackager to be installed. Although I guess generalpackager could be put in every repos [dev] dependencies. Having circular dependency through the optional [dev] might be fine. These dev deps should be ignored by the mermaid graph too
generate.py
is just something I made because I got tired of generating the workflow by hand, then it turned out to be pretty useful to keep git hooks in sync as well. Also nice to make sure the readme has been generated properly
It's basically what happens in the sync stage of the workflow as well. Running it once will enable the pre-push hook to run it automatically, but only important (non-aesthetic) files
To summarize, generate_localfiles
is used in a few places:
generate.py
The linting should probably be included in all of these places
Since the
.git
folder isn't versioned for security reasons to execute arbitrary code we have an issue;pre-commit
andpre-push
hooks won't be there when forked or cloned.Options
generate.py
to create all hooks for us - already implementedpre-commit install
command somewhere, insidegenerate_localfiles
or make a new method probably coupled to https://github.com/ManderaGeneral/generalpackager/blob/bd361ec6f4b4d3fad71e2ddf6b66be47666e3916/generalpackager/packager_files.py#L7generate_localfiles
step in.pre-commit-config.yaml
as a pre-commit repo perhaps?I don't want developers to have to write
pre-commit install
. Everything should go throughgenerate.py
- I like it especially because it's very transparent for devs to look through the python code before running the file