Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 2b829876 authored by Dorian Turba's avatar Dorian Turba
Browse files

template identifier name updated

parent d8f300b0
No related branches found
No related tags found
No related merge requests found
# Cookiecutter for DAL projects
BLABLABLA # TODO
## Install Cookiecutter
```bash
pip install cookiecutter
```
## Use template Cookiecutter
Go to the directory where you want to create your project and run:
```bash
cookiecutter https://lab.frogg.it/dorianturba/cookiecutter_dal_sqlalchemy.git
```
## Use a user configuration file
You can use a user configuration file to avoid to type the same values every time you create a new project.
Create a file named `~/.cookiecutterrc` with the following content:
```yaml
default_context:
full_name: "Your Name"
email: "
```
......@@ -3,11 +3,11 @@
"database_slug": "{{ cookiecutter.database_name.lower().replace(' ', '_') }}",
"package_name": "DAL {{ cookiecutter.database_name }}",
"package_slug": "{{ cookiecutter.package_name.lower().replace(' ', '_') }}",
"package_version": "0.0.1",
"package_author": "Author Name",
"package_author_email": "{{ cookiecutter.package_author.lower().replace(' ', '.') }}@example.com",
"package_version": "0.1.0",
"author_fullname": "Author Fullname",
"author_email": "{{ cookiecutter.author_fullname.lower().replace(' ', '.') }}@proton.me",
"package_description": "A DAL package for {{ cookiecutter.database_name }}",
"virtual_env_folder": "venv",
"flake8_max_complexity": 10,
"flake8_max_line_length": 100
"linter_max_line_length": 100
}
\ No newline at end of file
[flake8]
exclude = .git,__pycache__,{{ cookiecutter.virtual_env_folder }},dist
max-complexity = {{ cookiecutter.flake8_max_complexity }}
max-line-length = {{ cookiecutter.flake8_max_line_length }}
max-line-length = {{ cookiecutter.linter_max_line_length }}
......@@ -5,7 +5,7 @@ Credits
Development Lead
----------------
* {{ cookiecutter.package_author }} <{{ cookiecutter.package_author_email }}>
* {{ cookiecutter.author_fullname }} <{{ cookiecutter.author_email }}>
Contributors
------------
......
......@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
name = "{{ cookiecutter.package_slug }}"
version = "{{ cookiecutter.package_version }}"
authors = [
{ name = "{{ cookiecutter.package_author }}", email = "{{ cookiecutter.package_author_email }}" },
{ name = "{{ cookiecutter.author_fullname }}", email = "{{ cookiecutter.author_email }}" },
]
description = "{{ cookiecutter.package_description }}"
readme = "README.md"
......@@ -59,7 +59,7 @@ markers = [
]
[tool.black]
line-length = 100
line-length = {{ cookiecutter.linter_max_line_length }}
[tool.mypy]
packages = "{{ cookiecutter.package_slug }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment