tlgs / template.py Goto Github PK
View Code? Open in Web Editor NEWbarebones Python cookiecutter template
License: BSD Zero Clause License
barebones Python cookiecutter template
License: BSD Zero Clause License
Since Ruff rules are specified in pyproject.toml
and this file is removed for the bare
project type, Ruff hooks will revert to using the default configuration.
This is bad because all project types should ideally be linted the same way.
Possible solutions:
pyproject.toml
for the bare
project type - not ideal because the point behind this project type is for the repo to resemble a collection of independent Python scripts and not a cohesive Python project..pre-commit-config.yaml
for the bare
project type - not ideal because the arguments would likely become unwieldy. They would need to be duplicated for the ruff
and ruff-format
hooks and they would need to be synced with the configuration in pyproject.toml
.ruff.toml
configuration file for the bare
project type - not ideal because the file would need to be synced with the configuration in pyproject.toml
. Plus it's another file to manage.ruff.toml
for all project types - not ideal because I'd prefer if file configuration was always set in the pyproject.toml
. Plus it's another file to manage.bare
project type - maybe a bit extreme or maybe not such a bad idea. I mostly had repositories like Advent of Code in mind when I thought about this option. Perhaps adding this was a bit of feature creep and it's not that useful?I think the best way to go about this is a variation of option (3): create a ruff.toml
file in which to keep the Ruff configuration and use Cookiecutter's machinery to move this configuration to pyproject.toml
on the other project types. Or maybe keep the pyproject.toml
configuration as is and extract the tool.ruff
table into a ruff.toml
file for the bare
project type. This solves the keep-sync problem at the cost of more code.
Ah, that option has the benefit on deleting the wonky if
in the .pre-commit-config.yaml
template: the bare project will have a TOML file to deal with now!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.