-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
135 lines (114 loc) · 3.32 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
[project]
name = "floquet"
version = "0.1.0"
requires-python = ">=3.10"
description = "Floquet simulations for identifying resonances in quantum systems."
dependencies = [
"numpy>=2.0",
"scipy",
"scqubits>=4.2",
"qutip>=5.0",
"matplotlib",
"jupyter",
"h5py",
"ipython",
"pathos",
]
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project.optional-dependencies]
dev = [
"taskipy",
"ruff",
"codespell",
"pygments",
"pytest",
"pytest-xdist",
"pymdown-extensions",
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocs-section-index",
"mkdocs-simple-hooks",
"mkdocs-glightbox",
"mkdocs-exclude",
"mknotebooks",
"nbconvert==6.5.0",
"sybil[pytest]",
"black", # needed by mkdocstrings to format function signatures
]
[tool.ruff]
extend-include = ["*.ipynb"]
exclude = ["examples/*.py", "examples/*.ipynb"]
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.ruff.lint]
fixable = ["I001", "F401"]
select = ["F", "E", "W", "C90", "I", "D", "UP", "YTT", "ANN", "BLE", "B", "A", "C4", "FA",
"INP", "NPY201", "PIE", "T20", "PYI", "PT", "RSE", "RET", "SLF", "SIM", "INT",
"ARG", "PTH", "PL", "TRY", "FLY", "NPY", "RUF",
]
extend-select = ["D204", "D400", "D404", "D406", "D410"]
ignore = [
"ANN101",
"C901",
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D417",
"E741",
"INP001",
"PLC0414",
"PLR0913", "PLR2004",
"T201",
]
[tool.ruff.lint.isort]
combine-as-imports = true
split-on-trailing-comma = false
lines-after-imports = 2
order-by-type = false
[tool.ruff.lint.flake8-annotations]
suppress-none-returning = true
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.codespell]
skip = ".git,*.ipynb"
# === taskipy tasks definition ===
[tool.taskipy.tasks.lint]
cmd = 'echo "\n>>> ruff check --fix" && ruff check --fix'
help = "lint the code (ruff)"
[tool.taskipy.tasks.format]
cmd = 'echo "\n>>> ruff format" && ruff format'
help = "auto-format the code (ruff)"
[tool.taskipy.tasks.codespell]
cmd = 'echo "\n>>> codespell" && codespell tests floquet'
help = "check for misspellings (codespell)"
[tool.taskipy.tasks.clean]
cmd = 'task lint && task format && task codespell'
help = "clean the code (ruff + codespell)"
[tool.taskipy.tasks.test]
cmd = 'echo "\n>>> pytest -n=auto tests" && pytest -n=auto tests'
help = "run the unit tests suite (pytest)"
[tool.taskipy.tasks.doctest]
cmd = 'echo "\n>>> pytest docs" && pytest docs'
help = "check documentation examples (doctest)"
[tool.taskipy.tasks.docbuild]
cmd = 'mkdocs build'
help = "build the documentation website"
[tool.taskipy.tasks.docserve]
cmd = 'mkdocs serve'
help = "preview documentation website with hot-reloading"
[tool.taskipy.tasks.all]
cmd = 'task clean && task test && task doctest'
help = "run all tasks before a commit (ruff + codespell + pytest + doctest)"
[tool.taskipy.tasks.ci]
cmd = '''echo "\n>>> ruff check" && ruff check &&
echo "\n>>> ruff format --check" && ruff format --check &&
task codespell &&
task test &&
task doctest &&
task docbuild'''
help = "run all the CI checks"