forked from algorandfoundation/algokit-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
194 lines (183 loc) · 6.1 KB
/
pyproject.toml
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[tool.poetry]
name = "algokit"
version = "1.13.4"
description = "Algorand development kit command-line interface"
authors = ["Algorand Foundation <[email protected]>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.10,<3.13"
click = "^8.1.3"
httpx = "^0.23.1"
copier = "^9.0.0"
questionary = "^1.10.0"
pyclip = "^0.7.0"
shellingham = "^1.5.0.post1"
algokit-client-generator = "^1.1.1"
tomli = { version = "^2.0.1", python = "<3.11" }
python-dotenv = "^1.0.0"
mslex = "^1.1.0"
keyring = "24.3.0"
pyjwt = "^2.8.0"
auth0-python = "^4.4.0"
algokit-utils = "^2.2.1"
multiformats = "0.3.1"
multiformats_config = "0.3.1" # pinned this to be in lockstep with multiformats
aiohttp = "3.9.2"
jsondiff = "^2.0.0"
[tool.poetry.group.dev.dependencies]
pyinstaller = {version = "^6.3.0"}
pytest = "^7.2.0"
ruff = "^0.1.6"
pip-audit = "^2.4.7"
approvaltests = "^7.2.0"
pytest-mock = "^3.10.0"
mypy = "^1.0.0"
pytest-httpx = "^0.21.2"
python-semantic-release = "^7.32.2"
pytest-cov = "^4.0.0"
pre-commit = "^2.20.0"
sphinx = "^6.0.0"
sphinx-click = "^4.4.0"
sphinxnotes-markdown-builder = "^0.5.6"
poethepoet = "^0.17.1"
gfm-toc = "^0.0.7"
pytest-xdist = "^3.4.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
algokit = "algokit.cli:algokit"
[tool.poe.tasks]
docs_generate = "sphinx-build -b markdown -E docs/sphinx docs/cli"
docs_toc = "gfm-toc docs/cli/index.md -e 3"
docs_title = {shell = "(echo \"# AlgoKit CLI Reference Documentation\\n\\n\"; cat docs/cli/index.md) > docs/cli/temp.md && mv docs/cli/temp.md docs/cli/index.md"}
docs = ["docs_generate", "docs_toc", "docs_title"]
package_unix = "pyinstaller --clean --onedir --hidden-import jinja2_ansible_filters --hidden-import multiformats_config --copy-metadata algokit --name algokit --noconfirm src/algokit/__main__.py --add-data './misc/multiformats_config/multibase-table.json:multiformats_config/' --add-data './misc/multiformats_config/multicodec-table.json:multiformats_config/' --add-data './misc/distribution-method:algokit/'"
package_windows = "pyinstaller --clean --onedir --hidden-import jinja2_ansible_filters --hidden-import multiformats_config --copy-metadata algokit --name algokit --noconfirm src/algokit/__main__.py --add-data ./misc/multiformats_config;multiformats_config/ --add-data ./misc/distribution-method;algokit/"
[tool.ruff]
line-length = 120
select = [
# all possible codes as of this ruff version are listed here,
# ones we don't want/need are commented out to make it clear
# which have been omitted on purpose vs which ones get added
# in new ruff releases and should be considered for enabling
"F", # pyflakes
"E", "W", # pycodestyle
"C90", # mccabe
"I", # isort
"N", # PEP8 naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
# "S", # flake8-bandit
# "BLE", # flake8-blind-except
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
# "COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
# "DJ", # flake8-django
# "EM", # flake8-errmsg
# "EXE", # flake8-executable
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
# "G", # flake8-logging-format
# "INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
# "PD", # pandas-vet
"PGH", # pygrep-hooks
"PL", # pylint
# "TRY", # tryceratops
# "NPY", # NumPy-specific rules
"RUF", # Ruff-specific rules
]
ignore = [
"ANN101", # no type for self
"ANN102", # no type for cls
"RET505", # allow else after return
"SIM108", # allow if-else in place of ternary
# To avoid conflict with ruff formatter. More details on https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"E111", # indentation is not a multiple of four
"E117", # over-indented
"ISC001", # single line implicit string concatenation
"ISC002", # multi line implicit string concatenation
"Q000", # bad quotes inline string
"Q001", # bad quotes multiline string
"Q002", # bad quotes docstring
"Q003", # avoidable escaped quotes
"W191", # indentation contains tabs
]
# Exclude a variety of commonly ignored directories.
exclude = [
".direnv",
".git",
".mypy_cache",
".ruff_cache",
".venv",
"__pypackages__",
"_build",
"build",
"dist",
"node_modules",
"venv",
"docs/sphinx",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.10.
target-version = "py310"
[tool.ruff.per-file-ignores]
"tests/**/test_*.py" = ["PLR0913"] # too many args
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
suppress-none-returning = true
[tool.pytest.ini_options]
pythonpath = ["src", "tests"]
markers = [
"mock_platform_system",
"pyinstaller_binary_tests: mark as a test that require algokit binary to be passed via cli arg"
]
addopts = "-m 'not pyinstaller_binary_tests'" # by default, exclude pyinstaller_binary_tests
[tool.mypy]
files = ["src", "tests"]
exclude = ["dist"]
python_version = "3.10"
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
warn_return_any = true
strict = true
disallow_untyped_decorators = true
disallow_any_generics = false
implicit_reexport = false
[[tool.mypy.overrides]]
module = ["approvaltests.*", "jsondiff.*"]
ignore_missing_imports = true
[tool.semantic_release]
version_toml = "pyproject.toml:tool.poetry.version"
remove_dist = false
build_command = "poetry build --format wheel"
version_source = "tag"
major_on_zero = true
upload_to_repository = false
upload_to_pypi = false
tag_commit = true
branch = "main"
commit_message = "{version}\n\nskip-checks: true"