Tooling and configurations for the creation of better software.
Goals of this repository:
- Providing one configured toolchain that is fluent and valuable in research, development, and production settings.
- Resembling an awesome list for developer tooling.
- Being strict so that developers can think less, feel more relaxed, and be proud of their code.
- Not being stylistically restrictive or arduous to comply with.
Aspirations of this repository:
- Supporting auto-propagation of tooling configuration changes across repositories.
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes, |
Autoformatting files like JSON, Markdown, and YAML. |
|
Configure to use four space indent to match Python PEP 8. | |
Yes |
Formatting TOML |
| ||
Yes |
Miscellaneous file cleanup like end of file newlines |
|
When adding rules, try to avoid duplication of other tools like | |
Yes |
Autoformatting SQL |
| ||
No |
Autoformatting templates like Jinja, Nunjucks, etc. |
|
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes, |
Ensuring high quality YAML |
|
Configure to coexist with YAML autoformatting of | |
Yes, |
Checking for typos |
| ||
Yes |
|
|
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes, |
Markdown table of contents |
| ||
Yes |
Lint Markdown files |
|
There's also | |
No |
Confirm Markdown links are not dead. |
|
Slows down |
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes, |
|
|
I am a fan of the
| |
Yes, |
Formatting docstrings |
| ||
Yes, |
Cleaning Jupyter Notebooks |
|
Paired with |
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes |
Test runner |
Command line | ||
Yes |
Test runner parallelism via multiprocessing |
| ||
Yes |
Timing tests |
|
Use the | |
Yes |
User-friendly |
| ||
Yes |
Supporting subtesting |
|
Will be deprecated after pytest-dev/pytests-subtests#71. | |
No |
Easy decorator |
|
A third party alternative is | |
No |
Terminate long-running tests |
|
Useful when there's unsolved race conditions. | |
No |
Cache HTTP requests as cassettes |
|
Maintained successor to |
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes, |
Static analysis |
Command line |
Since | |
Yes, |
Static analysis |
|
Partially reimplements many other tools like | |
Yes, |
Static analysis |
Command line |
| |
Yes |
Static analysis |
|
Pair with Mostly reimplemented by | |
Yes |
Checking docstrings |
|
|
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes, |
Static type checking |
|
Some opt-in rules like | |
Yes |
Runtime type checking |
| ||
No |
Runtime type checking |
|
As of Feb. 20th in 2024,
Python 3.10's | |
No, |
Adopting |
Command line |
Equivalent of |
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
Yes |
Automated dependency updates |
GitHub Actions |
Pair with | |
Yes, |
Python environment and dependency management |
Command line | ||
No, |
Requirements compilation |
Command line | ||
Yes |
Checking requirements |
|
If invoking | |
No |
Auditing requirements |
Command line |
Alternative to |
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
No |
Validating |
|
By specifying
See Notes for | |
Yes |
Validating tool-specific |
|
This tool's versions change frequently because it tracks upstream tools' schemae.
It also depends on | |
Yes |
Checking SDist build |
|
Unclear if this tool is a subset of | |
No |
Checking SDist, wheel, and README. |
GitHub Actions | ||
No |
Migration from |
Command line |
Tool | Used Here? | Description | Invocation | Notes |
---|---|---|---|---|
No |
Propagating configurations |
|
Had tons of potential,
but |
pathver() {
: 'print PATH and VERsion; optionally assert version file matches'
source=$(type -p "$1")
if [[ -z $source ]]; then
source=$(type "$1")
fi
actual_version=$("$1" --version 2>&1 | gsed -En 's/(.+ )?(v?[0-9]+\.[0-9]+\.[^ ]+).*/\2/p')
echo "$source $actual_version"
}
a() {
: 'Activate virtual environment after changing directory'
if [[ ${1-} ]]; then
directory=~/code/$1
else
directory=.
fi
if ! [[ -d $directory ]]; then
echo "ERROR: $directory is not a directory"
return 1
fi
cd "$directory" || return 1
[[ ${CONDA_PREFIX-} && $(command -v conda) ]] && conda deactivate
if [[ ${VIRTUAL_ENV-} ]]; then
might_be_file=$(command -v deactivate)
if [[ $might_be_file ]]; then
if [[ -f $might_be_file ]]; then
# pyenv-virtualenv wants this
# shellcheck disable=SC1091
source deactivate
else
deactivate
fi
fi
fi
if [[ -f .venv/bin/activate ]]; then
# shellcheck disable=SC1091
source .venv/bin/activate
pathver python .python-version
elif [[ -d conda ]]; then
# shellcheck disable=SC1090
source ~/miniconda3/etc/profile.d/conda.sh
conda activate "$(basename "$PWD")"
pathver python .python-version
fi
if [[ -f .nvmrc ]]; then
pathver node .nvmrc
fi
}
This was taken from https://github.com/biobuddies/helicopyter/blob/main/.biobuddies/includes.bash.
curl -s \
https://raw.githubusercontent.com/github/gitignore/master/{Global/Vim,Global/JetBrains,Global/VisualStudioCode,Global/macOS,Python}.gitignore \
> .gitignore