|
| 1 | +{% if cookiecutter.package_manager == "poetry" -%} |
1 | 2 | [tool.poetry] |
2 | 3 | name = "{{ cookiecutter.project_slug }}" |
3 | 4 | version = "0.1.0" |
4 | 5 | description = "{{ cookiecutter.project_short_description }}" |
5 | 6 | authors = ["{{ cookiecutter.full_name }} <{{ cookiecutter.email }}>"] |
6 | 7 | license = "proprietary" |
7 | | -packages = [{ include = "{{ cookiecutter.module_name }}", from = "src" }, ] |
| 8 | +packages = [{ include = "{{ cookiecutter.module_name }}", from = "src" }] |
8 | 9 | include = ["src/{{ cookiecutter.module_name }}/res/*"] |
9 | | -{% if cookiecutter.create_cli == "yes" %} |
10 | | -[tool.poetry.scripts] |
11 | | -{{ cookiecutter.project_slug }} = "{{ cookiecutter.module_name }}.main:app"{% endif %} |
12 | 10 |
|
13 | 11 | [tool.poetry.dependencies] |
14 | | -python = "^3.11"{% if cookiecutter.config_file == 'hocon' %} |
15 | | -pyhocon = "^0.3.59"{% elif cookiecutter.config_file == 'yaml' %} |
16 | | -PyYAML = "^6.0"{% endif %}{% if cookiecutter.create_cli == 'yes' %} |
17 | | -typer = {extras = ["all"], version = "^0.9.0"}{% endif %} |
| 12 | +python = "^3.9" |
| 13 | +{% if cookiecutter.config_file == 'hocon' -%} |
| 14 | + pyhocon = "^0.3.59" |
| 15 | +{% elif cookiecutter.config_file == 'yaml' -%} |
| 16 | + PyYAML = "^6.0" |
| 17 | +{% endif -%} |
| 18 | +{% if cookiecutter.create_cli == 'yes' -%} |
| 19 | + typer = {extras = ["all"], version = "^0.9.0"} |
| 20 | +{% endif -%} |
18 | 21 |
|
19 | 22 | [tool.poetry.group.test.dependencies] |
20 | | -pytest = "^7.0" |
21 | | -pytest-cov = "^4.0" |
| 23 | + pytest = "^7.0" |
| 24 | + pytest-cov = "^4.0" |
22 | 25 |
|
23 | | -[tool.poetry.group.linter.dependencies]{% if cookiecutter.code_formatter == 'black' %} |
24 | | -black = "^23.11"{% else %} |
25 | | -ruff = "^0.1.7"{% endif %} |
26 | | -isort = "^5.12.0" |
| 26 | +[tool.poetry.group.linter.dependencies] |
| 27 | +{% if cookiecutter.code_formatter == 'black' -%} |
| 28 | + black = "^23.11" |
| 29 | +{% else -%} |
| 30 | + ruff = "^0.1.7" |
| 31 | +{% endif -%} |
| 32 | + isort = "^5.12.0" |
27 | 33 |
|
28 | 34 | [tool.poetry.group.dev.dependencies] |
29 | | -pre-commit = "^3.0"{% if cookiecutter.use_notebooks == 'yes' %} |
30 | | -jupyterlab = "^3.5"{% endif %} |
31 | | -{% if cookiecutter.code_formatter != 'black' %} |
32 | | -[tool.ruff] |
33 | | -line-length = 100 |
34 | | -src = ["src", "tests"] |
35 | | -ignore = ["F401"] |
36 | | -{% endif %} |
37 | | -[tool.isort]{% if cookiecutter.code_formatter == 'black' %} |
38 | | -profile = "black"{% else %} |
39 | | -py_version = 310 |
40 | | -line_length = 100 |
41 | | -multi_line_output = 3{% endif %} |
| 35 | + pre-commit = "^3.0" |
| 36 | +{% if cookiecutter.use_notebooks == 'yes' -%} |
| 37 | + jupyterlab = "^3.5" |
| 38 | +{% endif -%} |
| 39 | + |
| 40 | +[tool.poetry.extras] |
| 41 | + build = ["setuptools", "cython"] |
| 42 | + compile = ["cchardet"] |
| 43 | + |
| 44 | +[tool.poetry.scripts] |
| 45 | +{% if cookiecutter.create_cli == "yes" -%} |
| 46 | + {{ cookiecutter.project_slug }} = "{{ cookiecutter.module_name }}.main:app" |
| 47 | +{% endif -%} |
| 48 | + |
| 49 | +[tool.isort] |
| 50 | +{% if cookiecutter.code_formatter == 'black' -%} |
| 51 | + profile = "black" |
| 52 | +{% else -%} |
| 53 | + line_length = 100 |
| 54 | + multi_line_output = 3 |
| 55 | +{% endif -%} |
| 56 | + |
| 57 | +[tool.pytest.ini_options] |
| 58 | + minversion = "7.0" |
| 59 | + testpaths = ["tests"] |
| 60 | + |
| 61 | +[build-system] |
| 62 | + requires = ["poetry-core"] |
| 63 | + build-backend = "poetry.core.masonry.api" |
| 64 | + |
| 65 | +{% else -%} |
| 66 | + |
| 67 | +[project] |
| 68 | +name = "{{ cookiecutter.project_slug }}" |
| 69 | +version = "0.1.0" |
| 70 | +description = "{{ cookiecutter.project_short_description }}" |
| 71 | +authors = [{ name = "{{ cookiecutter.full_name }}", email = "{{ cookiecutter.email }}" }] |
| 72 | +license = "proprietary" |
| 73 | +requires-python = ">=3.9" |
| 74 | +dependencies = [ |
| 75 | +{% if cookiecutter.config_file == 'hocon' -%} |
| 76 | + "pyhocon>=0.3.59", |
| 77 | +{% elif cookiecutter.config_file == 'yaml' -%} |
| 78 | + "PyYAML>=6.0", |
| 79 | +{% endif -%} |
| 80 | +{% if cookiecutter.create_cli == 'yes' -%} |
| 81 | + "typer[all]>=0.9.0", |
| 82 | +{% endif -%} |
| 83 | +] |
| 84 | + |
| 85 | +[project.optional-dependencies] |
| 86 | + build = ["setuptools", "cython"] |
| 87 | + compile = ["cchardet"] |
| 88 | + |
| 89 | +[project.scripts] |
| 90 | +{% if cookiecutter.create_cli == "yes" -%} |
| 91 | + {{ cookiecutter.project_slug }} = "{{ cookiecutter.module_name }}.main:app" |
| 92 | +{% endif -%} |
| 93 | + |
| 94 | +[project.gui-scripts] |
| 95 | + hello_gui = "{{ cookiecutter.module_name }}.gui:main" |
| 96 | + |
| 97 | +[project.entry-points."example.plugins"] |
| 98 | + a = "{{ cookiecutter.module_name }}_plugin_a" |
| 99 | + |
| 100 | +[dependency-groups] |
| 101 | + dev = [ |
| 102 | +{% if cookiecutter.use_notebooks == 'yes' -%} |
| 103 | + "jupyterlab>=3.5", |
| 104 | +{% endif -%} |
| 105 | +{% if cookiecutter.code_formatter == 'black' -%} |
| 106 | + "black>=23.11", |
| 107 | +{% else -%} |
| 108 | + "ruff>=0.1.7", |
| 109 | +{% endif -%} |
| 110 | + "pytest>=7.0", |
| 111 | + "pytest-cov>=4.0", |
| 112 | + "pre-commit>=3.0", |
| 113 | + "isort>=5.12.0" |
| 114 | + ] |
| 115 | + |
| 116 | +[tool.isort] |
| 117 | +{% if cookiecutter.code_formatter == 'black' -%} |
| 118 | + profile = "black" |
| 119 | +{% else -%} |
| 120 | + line_length = 100 |
| 121 | + multi_line_output = 3 |
| 122 | +{% endif -%} |
42 | 123 |
|
43 | 124 | [tool.pytest.ini_options] |
44 | | -minversion = "7.0" |
45 | | -testpaths = ["tests"] |
| 125 | + minversion = "7.0" |
| 126 | + testpaths = ["tests"] |
46 | 127 |
|
47 | 128 | [build-system] |
48 | | -requires = ["poetry-core"] |
49 | | -build-backend = "poetry.core.masonry.api" |
| 129 | + requires = ["setuptools", "wheel"] |
| 130 | + build-backend = "setuptools.build_meta" |
| 131 | +{% endif -%} |
0 commit comments