Improve template
This commit is contained in:
parent
c06b25fe05
commit
cd4457a528
12 changed files with 69 additions and 3 deletions
21
LICENSE
Normal file
21
LICENSE
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 Yehuda Deutsch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
README.md
Normal file
3
README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# Ajal Template - Python
|
||||
|
||||
An opinionated python template, managed using [copier](https://copier.readthedocs.io/)
|
||||
14
copier.yml
14
copier.yml
|
|
@ -1,3 +1,5 @@
|
|||
_subdirectory: template
|
||||
|
||||
# Questions
|
||||
project_name:
|
||||
type: str
|
||||
|
|
@ -6,17 +8,25 @@ project_name:
|
|||
project_description:
|
||||
type: str
|
||||
help: Describe your project
|
||||
default: A project based on ajal-template-python
|
||||
default: A python project based on ajal-template-python
|
||||
|
||||
minimum_python_version:
|
||||
type: str
|
||||
help: Minmum python version
|
||||
help: Minimum python version
|
||||
choices:
|
||||
- "3.10"
|
||||
- "3.11"
|
||||
- "3.12"
|
||||
- "3.13"
|
||||
|
||||
license:
|
||||
type: str
|
||||
help: A license for the project
|
||||
default: MIT
|
||||
choices:
|
||||
- ""
|
||||
- "MIT"
|
||||
|
||||
dependency_manager:
|
||||
type: str
|
||||
help: Python dependency manager
|
||||
|
|
|
|||
0
.gitignore → template/.gitignore
vendored
0
.gitignore → template/.gitignore
vendored
10
template/.pre-commit-config.yaml.jinja
Normal file
10
template/.pre-commit-config.yaml.jinja
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
1
template/project-name.jinja
Normal file
1
template/project-name.jinja
Normal file
|
|
@ -0,0 +1 @@
|
|||
{{ project_name | lower | replace(' ', '_') | replace('-', '_') }}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[project]
|
||||
name = "{{project_name}}"
|
||||
name = "{{ project_name | lower | replace(' ', '-') }}"
|
||||
version = "0.1.0"
|
||||
description = "{{project_description}}"
|
||||
authors = [
|
||||
21
template/{% if license == 'MIT' %}LICENSE{% endif %}.jinja
Normal file
21
template/{% if license == 'MIT' %}LICENSE{% endif %}.jinja
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 {{user_name}}
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Loading…
Add table
Reference in a new issue