forked from espressif/sync-jira-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
149 lines (130 loc) · 7.29 KB
/
pyproject.toml
File metadata and controls
149 lines (130 loc) · 7.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[build-system]
requires = ["setuptools-scm>=8.0", "setuptools>=60"]
[project]
authors = [
{ name = "Tomas Sebestik (Espressif Systems)", email = "tomas.sebestik@espressif.com" },
]
classifiers = ["Programming Language :: Python :: 3"]
description = "Espressif GitHub Actions for JIRA synchronization"
dynamic = ["version"]
name = "sync-jira-actions"
readme = "README.md"
requires-python = ">=3.11"
dependencies = ["PyGithub==2.2.0", "jira==3.10.5"]
[project.optional-dependencies]
dev = [
"commitizen",
"pip-tools~=7.3",
"pre-commit>=3.3",
"pytest",
"pytest-cov",
]
[tool.setuptools_scm]
write_to = "sync_jira_actions/version.py"
[tool.black]
line-length = 120 # The maximum line length for Python code formatting
skip-string-normalization = true # Avoids converting single quotes to double quotes in strings (pre-commit hook enforces single quotes in Python code)
[tool.ruff]
line-length = 120 # Specifies the maximum line length for ruff checks
select = ['E', 'F', 'W'] # Types of issues ruff should check for
target-version = "py311" # Specifies the target Python version for ruff checks
[tool.mypy]
disallow_incomplete_defs = false # Disallows defining functions with incomplete type annotations
disallow_untyped_defs = false # Disallows defining functions without type annotations or with incomplete type annotations
exclude = '^venv/' # Paths to ignore during type checking
ignore_missing_imports = true # Suppress error messages about imports that cannot be resolved
python_version = "3.11" # Specifies the Python version used to parse and check the target program
warn_no_return = true # Shows errors for missing return statements on some execution paths
warn_return_any = true # Shows a warning when returning a value with type Any from a function declared with a non- Any return type
[tool.pylint]
[tool.pylint.MASTER]
ignore-paths = ["tests/.*"] # Paths to ignore during linting
[tool.pylint.'BASIC']
variable-rgx = "[a-z_][a-z0-9_]{1,30}$" # Variable names must start with a lowercase letter or underscore, followed by any combination of lowercase letters, numbers, or underscores, with a total length of 2 to 30 characters.
[tool.pylint.'MESSAGES CONTROL']
disable = [
"duplicate-code", # R0801: Similar lines in %s files
"fixme", # W0511: Used when TODO/FIXME is encountered
"import-error", # E0401: Used when pylint has been unable to import a module
"import-outside-toplevel", # E0402: Imports should usually be on top of the module
"logging-fstring-interpolation", # W1202: Use % formatting in logging functions and pass the % parameters as arguments
"missing-class-docstring", # C0115: Missing class docstring
"missing-function-docstring", # C0116: Missing function or method docstring
"missing-module-docstring", # C0114: Missing module docstring
"no-name-in-module", # W0611: Used when a name cannot be found in a module
"too-few-public-methods", # R0903: Too few public methods of class
"too-many-branches", # R0912: Too many branches
"too-many-locals", # R0914: Too many local variables
"too-many-return-statements", # R0911: Too many return statements
"too-many-statements", # R0915: Too many statements
"ungrouped-imports", # C0412: Imports should be grouped by packages
]
[tool.pylint.'FORMAT']
max-line-length = 120 # Specifies the maximum line length for pylint checks
[tool.pytest.ini_options]
addopts = "-s --log-cli-level DEBUG --cov=. --cov-report=term"
python_classes = ["Test*"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
testpaths = ["tests"]
[tool.coverage.run]
omit = ["__*__.py", "tests/*"]
[tool.commitizen]
annotated_tag = true
bump_message = "change(bump-version): bump release version to v$new_version"
name = "cz_customize"
tag_format = "v$version"
update_changelog_on_bump = true
version_provider = "scm"
[tool.commitizen.customize]
bump_map = { "change" = "MINOR", "feat" = "MINOR", "fix" = "PATCH", "refactor" = "PATCH", "remove" = "PATCH", "revert" = "PATCH" }
bump_pattern = "^(change|feat|fix|refactor|remove|revert)"
change_type_order = [
"change",
"ci",
"docs",
"feat",
"fix",
"refactor",
"remove",
"revert",
]
example = "change: this is a custom change type"
message_template = "{% if scope %}{{change_type}}({{scope}}): {{message}}{% else %}{{change_type}}: {{message}}{% endif %}{% if body %}\n\n{{body}}{% endif %}{% if is_breaking_change %}\n\nBREAKING CHANGE{% endif %}{% if footer %}\n\n{{footer}}{% endif %}"
schema = "<type>(<scope>): <summary>"
schema_pattern = "^([a-z]+)(\\([\\w\\-\\.]+\\))?:\\s.*"
[[tool.commitizen.customize.questions]]
choices = [
{ value = "change", name = "change: A change made to the codebase." },
{ value = "ci", name = "ci: Changes to our CI configuration files and scripts." },
{ value = "docs", name = "docs: Documentation only changes." },
{ value = "feat", name = "feat: A new feature." },
{ value = "fix", name = "fix: A bug fix." },
{ value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature." },
{ value = "remove", name = "remove: Removing code or files." },
{ value = "revert", name = "revert: Revert to a commit." },
]
message = "Select the TYPE of change you are committing"
name = "change_type"
type = "list"
[[tool.commitizen.customize.questions]]
message = "What is the SCOPE of this change (press enter to skip)?"
name = "scope"
type = "input"
[[tool.commitizen.customize.questions]]
message = "Describe the changes made (SUMMARY of commit message):"
name = "message"
type = "input"
[[tool.commitizen.customize.questions]]
message = "Provide additional contextual information - commit message BODY: (press [enter] to skip)"
name = "body"
type = "input"
[[tool.commitizen.customize.questions]]
default = false
message = "Is this a BREAKING CHANGE? Correlates with MAJOR in SemVer"
name = "is_breaking_change"
type = "confirm"
[[tool.commitizen.customize.questions]]
message = "Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)"
name = "footer"
type = "input"