|
1 |
| -[build-system] |
2 |
| -requires = ["mina-build>=0.2.5"] |
3 |
| -build-backend = "pdm.backend" |
4 |
| - |
5 |
| -#[build-system] |
6 |
| -#requires = ["pdm-backend", "pdm-polylith-workspace"] |
7 |
| -#build-backend = "pdm.backend" |
8 |
| - |
9 | 1 | [project]
|
10 |
| -authors = [ |
11 |
| - { name = "{{author_name}}", email = "{{author_email}}" }, |
12 |
| -] |
13 |
| -classifiers = [ |
14 |
| - "Development Status :: 3 - Alpha", |
15 |
| - "License :: OSI Approved :: MIT License", |
16 |
| - "Operating System :: OS Independent", |
17 |
| - "Programming Language :: Python :: 3.10", |
18 |
| - "Programming Language :: Python :: 3.11", |
19 |
| - "Programming Language :: Python :: 3.12", |
20 |
| - "Programming Language :: Python :: 3.8", |
21 |
| - "Programming Language :: Python :: 3.9", |
22 |
| -] |
23 |
| -description = "{{project_description}}" |
24 |
| -dynamic = [ |
25 |
| - "version", |
26 |
| -] |
27 |
| -keywords = [ |
28 |
| - "copier-template", |
29 |
| - "full-development-lifecycle", |
30 |
| - "project-template", |
31 |
| - "scaffold", |
32 |
| -] |
33 |
| -license = {text = "UNDEFINED"} |
34 | 2 | name = "{{project_name}}"
|
| 3 | +version = "0.1.0" |
| 4 | +description = "{{project_description}}" |
35 | 5 | readme = "README.md"
|
36 |
| -requires-python = ">=3.9" |
37 |
| -dependencies = [ |
38 |
| - # "pydantic-settings", |
39 |
| - # "typer[all]", |
40 |
| - "dynaconf>=3.2.5", |
41 |
| - "pydantic>=2.7.4", |
42 |
| -] |
43 | 6 |
|
44 |
| -[tool.pdm.scripts] |
45 |
| -lint = "ruff ." |
46 |
| -fmt = "ruff format . --check" |
47 |
| -test = "pytest " |
48 |
| -docs = "mkdocs serve" |
49 |
| -docs-deploy ="mkdocs gh-deploy --force" |
50 |
| -cleanup = "sh scripts/cleanup.sh" |
51 |
| - |
52 |
| -[project.urls] |
53 |
| -issue = "https://github.com/{{organization_name}}/{{project_name}}/issues" |
54 |
| -repository = "https://github.com/{{organization_name}}/{{project_name}}" |
55 |
| - |
56 |
| -[tool.pdm] |
57 |
| -distribution = true |
58 |
| - |
59 |
| -[tool.pdm.dev-dependencies] |
60 |
| -docs = [ |
61 |
| - "mkdocs-material>=9.5.27", |
62 |
| - "mkdocs>=1.6.0", |
63 |
| -] |
| 7 | +requires-python = ">=3.10" |
| 8 | +dependencies = [] |
64 | 9 |
|
65 |
| -lint = [ |
66 |
| - "ruff>=0.4.9" |
67 |
| -] |
68 |
| -test = [ |
69 |
| - "pytest-cov>=5.0.0", |
70 |
| -] |
| 10 | +[project.scripts] |
| 11 | +{{project_name}} = "{{project_name}}:main" |
| 12 | +cleanup = "qpyci.commands:clean" |
| 13 | +cov = "ci:coverage" |
| 14 | +badge = "qpyci.commands:generate_badge" |
| 15 | +check_format = "ci:check_format" |
| 16 | +ci = "ci:ci" |
71 | 17 |
|
| 18 | +[build-system] |
| 19 | +requires = ["hatchling"] |
| 20 | +build-backend = "hatchling.build" |
72 | 21 |
|
73 |
| -[tool.pytest.ini_options] |
74 |
| -addopts = "-l -s --durations=0" |
75 |
| -log_cli = true |
76 |
| -log_cli_level = "info" |
77 |
| -log_date_format = "%Y-%m-%d %H:%M:%S" |
78 |
| -log_format = "%(asctime)s %(levelname)s %(message)s" |
79 |
| -minversion = "6.0" |
80 |
| -cov="qpytpl" |
81 |
| -cov-report="html" |
82 | 22 |
|
83 |
| -[tool.coverage] |
84 | 23 |
|
85 |
| -[tool.coverage.report] |
86 |
| -fail_under = 100 |
| 24 | +[tool.hatch.build.targets.wheel.force-include] |
| 25 | +"ci.py" = "ci.py" |
87 | 26 |
|
88 |
| -[tool.coverage.run] |
89 |
| -source = [ |
90 |
| - "src/qpytpl", |
91 |
| -] |
| 27 | +[tool.uv] |
| 28 | +default-groups = ["dev"] |
92 | 29 |
|
93 |
| -[tool.mypy] |
94 |
| -check_untyped_defs = true |
95 |
| -disallow_any_unimported = true |
96 |
| -disallow_untyped_defs = true |
97 |
| -enable_error_code = [ |
98 |
| - "ignore-without-code", |
99 |
| -] |
100 |
| -exclude = [ |
101 |
| - "build", |
102 |
| - "template", |
103 |
| -] |
104 |
| -no_implicit_optional = true |
105 |
| -show_error_codes = true |
106 |
| -warn_return_any = true |
107 |
| -warn_unused_ignores = true |
| 30 | +[tool.uv.sources] |
| 31 | +qpyci = { git = "https://github.com/fluent-qa/qpyci.git", rev = "main" } |
108 | 32 |
|
| 33 | +[tool.hatch.build.targets.wheel] |
| 34 | +packages = ["src/qpyapp"] |
109 | 35 |
|
110 |
| -[tool.ruff] |
111 |
| -extend-exclude = [ |
112 |
| - "template", |
| 36 | +[tool.pyright] |
| 37 | +typeCheckingMode = "strict" |
| 38 | +reportUnnecessaryTypeIgnoreComment = true |
| 39 | +reportMissingTypeStubs = false |
| 40 | +include = ["src", "tests"] |
| 41 | +venvPath = ".venv" |
| 42 | +# see https://github.com/microsoft/pyright/issues/7771 - we don't want to error on decorated functions in tests |
| 43 | +# which are not otherwise used |
| 44 | +executionEnvironments = [{ root = "tests", reportUnusedFunction = false }] |
| 45 | + |
| 46 | + |
| 47 | +[dependency-groups] |
| 48 | +lint = ["ruff>=0.8.3"] |
| 49 | +dev = [ |
| 50 | + "allure-pytest>=2.13.5", |
| 51 | + "pytest-cov>=6.0.0", |
| 52 | + "pytest>=8.3.4", |
| 53 | + "coverage-badge>=1.1.2", |
113 | 54 | ]
|
114 |
| -fix = true |
115 |
| -src = ["src"] |
| 55 | + |
| 56 | +[tool.ruff] |
| 57 | +line-length = 120 |
| 58 | +target-version = "py39" |
| 59 | +include = ["qpyapp/**/*.py", "tests/**/*.py", "docs/**/*.py"] |
116 | 60 |
|
117 | 61 | [tool.ruff.lint]
|
118 |
| -select = [ |
119 |
| - "B", # flake8-bugbear |
120 |
| - "D", # pydocstyle |
121 |
| - "E", # pycodestyle error |
122 |
| - "F", # Pyflakes |
123 |
| - "I", # isort |
124 |
| - "RUF100", # Unused noqa directive |
125 |
| - "S", # flake8-bandit |
126 |
| - "SIM", # flake8-simplify |
127 |
| - "UP", # pyupgrade |
128 |
| - "W", # pycodestyle warning |
| 62 | +extend-select = ["Q", "RUF100", "C90", "UP", "I", "D"] |
| 63 | +flake8-quotes = { inline-quotes = "single", multiline-quotes = "double" } |
| 64 | +isort = { combine-as-imports = true, known-first-party = ["qpyconf"] } |
| 65 | +mccabe = { max-complexity = 15 } |
| 66 | +ignore = [ |
| 67 | + "D100", # ignore missing docstring in module |
| 68 | + "D102", # ignore missing docstring in public method |
| 69 | + "D104", # ignore missing docstring in public package |
| 70 | + "D105", # ignore missing docstring in magic methods |
| 71 | + "D107", # ignore missing docstring in __init__ methods |
129 | 72 | ]
|
130 | 73 |
|
131 |
| -[tool.ruff.lint.per-file-ignores] |
132 |
| -"tests/*" = ["S101"] |
133 |
| - |
134 | 74 | [tool.ruff.lint.pydocstyle]
|
135 | 75 | convention = "google"
|
136 | 76 |
|
| 77 | +[tool.ruff.format] |
| 78 | +# don't format python in docstrings, pytest-examples takes care of it |
| 79 | +docstring-code-format = false |
| 80 | +quote-style = "single" |
137 | 81 |
|
138 |
| -[tool.tomlsort] |
139 |
| -all = true |
140 |
| -in_place = true |
141 |
| -trailing_comma_inline_array = true |
| 82 | +[tool.ruff.lint.per-file-ignores] |
| 83 | +"tests/**/*.py" = ["D"] |
| 84 | +"docs/**/*.py" = ["D"] |
| 85 | +"src/qpyconf/**/*.py" = ["D101", "D103"] |
142 | 86 |
|
143 |
| -[[tool.pdm.source]] |
144 |
| -name = "mirrors" |
145 |
| -url = "https://pypi.tuna.tsinghua.edu.cn/simple/" |
146 | 87 |
|
147 |
| -[[tool.pdm.source]] |
148 |
| -name = "douban" |
149 |
| -url = "https://pypi.doubanio.com/simple/" |
| 88 | +[tool.pytest.ini_options] |
| 89 | +testpaths = ["tests"] |
| 90 | +pythonpath = ["src"] |
| 91 | +addopts = [ |
| 92 | + "--alluredir", |
| 93 | + "allure-results", |
| 94 | + "--clean-alluredir", |
| 95 | + "-l", |
| 96 | + "-s", |
| 97 | + "--durations", |
| 98 | + "0", |
| 99 | + "--cov", |
| 100 | + "qpyconf", |
| 101 | +] |
| 102 | +log_cli = true |
| 103 | +log_cli_level = "info" |
| 104 | +log_date_format = "%Y-%m-%d %H:%M:%S" |
| 105 | +log_format = "%(asctime)s %(levelname)s %(message)s" |
| 106 | +minversion = "6.0" |
0 commit comments