git-pyinit 1.3.4

Creator: bradpython12

Last updated:

Add to Cart

Description:

gitpyinit 1.3.4

git pyinit



Table of Contents

Installation
License
How to use

Example



Installation
pip install git-pyinit

License
git-pyinit is distributed under the terms of the MIT license.
How to use
Due to how git works in looking for commands, after you pip install you should have an executable along your path named git-pyinit. This means you can run the following command
git pyinit -h

and see the help. git-pyinit has a few args, and all others are assumed got be for git init. If you do not specify a directory argument, then it will act as if your current directory will be the init argument and will try to create it.
The config and you
The config, which can be opened by your default system editor using git pyinit --edit-config, or opened on your own using your own editor using the path generated from git pyinit --config, has a specific format to follow. Below is a list of sections, and what's applicable in each

Build, python build settings for workflows

python_version = [], a list of python versions that will be added to the yaml file (ie: python_version = ["3.8])
runs-on = "", what to run the workflow yaml on. Defaults to ubuntu-latest


yaml

active = [], what sections to use in order to create yaml files. For instance, active = ["lint", "pytest"] will create two yamls named 'lint.yml' and 'pytest.yml'


<SECTION>

A result from the yaml section, these are settings for this specific yaml file generated


active = [], a list of tools that are considered 'active' and each pip installed and added to the yaml file
default = [{}], a list of dictionary mappings of default command mappings that you'd like to change. For instance, if you'd like to add a default flag for every tool, you'd do

[tool]
default = [
{'flags' = ['--check-only']},
]



Also, for each tool specified in active, you can add additional flags and options using a [section.<TOOLNAME>] section. For example
[tool.isort]
flags = [
'--check-only',
]
file_command = "."

will generate isort . --check-only in your lint.yml. The default find command is $(git ls-files '*.py') for tools
Example
If you are unfamiliar with hatch, you should read up on it here
Running the following command:
git pyinit "test dir"

will create the following directory structure locally


A yaml file will look like the one below

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.