No project description provided
Project description
git pyinit
Table of Contents
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 toubuntu-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 filedefault = [{}]
, 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file git_pyinit-1.3.4.tar.gz
.
File metadata
- Download URL: git_pyinit-1.3.4.tar.gz
- Upload date:
- Size: 57.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c29a5ecb3bbd86d2913c652ef38b53ecd993b19f7c7981ef8b7090b8a2fd342 |
|
MD5 | 615b046bb99d0c403e673f91fbb4c2fe |
|
BLAKE2b-256 | 95406028b7b4c22345dd25448d364251467de5483f7dbd52253016ec6d738289 |
File details
Details for the file git_pyinit-1.3.4-py3-none-any.whl
.
File metadata
- Download URL: git_pyinit-1.3.4-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b8d7e835169db7cf42e7e76785a338ab662d152abff6bde1e95fd287134fcac |
|
MD5 | 330bdce975563da8e8a0829b00b0b5a4 |
|
BLAKE2b-256 | 27e634477ea14d0b4bb859fc972626d6c98d7e5cbffb63b19df5beff9d2d85aa |