-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (117 loc) · 4.1 KB
/
pyproject.toml
File metadata and controls
134 lines (117 loc) · 4.1 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
[tool.poetry]
name = "python-hfgt-toolbox"
version = "0.1.0"
description = ""
authors = ["Jane Doe <jane.doe@csiro.au>"]
packages = [
{ include = "python_hfgt_toolbox/**/*", from = "src" }, # need to specify the packages for `poetry build` to include
{ include = "tests/**/*", from = "src" }
]
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
loguru = "^0.5.3"
numpy = "^1.23.2"
pandas = "^1.4.4"
scipy = "^1.9.1"
numba = "^0.57.0"
sparse= "^0.13.0"
pyproject-toml = "^0.0.11"
[tool.poetry.dev-dependencies]
pytest = "^6.2.3"
Sphinx = "^4.2.0"
sphinx-rtd-theme = "^1.0.0"
myst-parser = "^0.15.2"
rst-to-myst = { extras = ["sphinx"], version = "^0.3.2" }
coverage = "^5.5"
pip-licenses = "^3.5.2"
pylint = "^2.11.1"
pre-commit = "^2.19.0"
pyproject-flake8 = "^0.0.1-alpha.4"
pytest-cov = "^3.0.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# Add our private package index. Add via thispoe command in poetry >=1.2: `poetry source add --secondary csiroenergy https://pkgs.dev.azure.com/csiro-energy/csiro-energy/_packaging/csiro-python-packages/pypi/simple/`
# If uncommenting this block, you also need to generate a token at https://dev.azure.com/csiro-energy/_usersSettings/tokens and run these commands for authentication:
# poetry config repositories.csiroenergy https://pkgs.dev.azure.com/csiro-energy/csiro-energy/_packaging/csiro-python-packages/pypi/upload
# poetry config http-basic.csiroenergy <ident> <paste-your-token>
#[[tool.poetry.source]]
#name = "csiroenergy"
#url = "https://pkgs.dev.azure.com/csiro-energy/csiro-energy/_packaging/csiro-python-packages/pypi/simple/"
#secondary = true # if this is true, it will be checked after the main index
#default = false # if true, this index will be checked before other repos declared in pyproject.toml.
# Config for various pre-commit checks are below
[tool.autopep8]
max-line-length = 200
ignore = "E501,W6,E704,W505"
in-place = true
recursive = true
aggressive = 3
[tool.flake8]
max-line-length = 200
extend-ignore = "E203," # See https://flake8.pycqa.org/en/3.1.1/user/error-codes.html for descriptions
max-complexity = 40
directories = "src,src/tests"
exclude = "scripts/*.py"
[tool.black]
line-length = 200
target-version = ['py38']
include = '.pyi?$'
[tool.mypy]
# Static type-checking. Debug with `pre-commit run mypy`.
# This config will only enforce typing if you choose to add type annotations. It will ignore code without any annotations.
# Cheat sheet: https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html
# Good guide: https://breadcrumbscollector.tech/mypy-how-to-use-it-in-my-project/
warn_unused_configs = true
ignore_missing_imports = true
pretty = false
exclude = "src/tests/**/*.py"
files = ["src/**/*.py"]
implicit_reexport = true
# 'false' enables basic checks on optional type hints
ignore_errors = false
# Uncomment to enable more checks - forcing type hints to be used everywhere.
#strict_optional = true
#warn_unused_ignores = true
#check_untyped_defs = true
#disallow_untyped_defs = true
#warn_return_any = true
#warn_unreachable = true
#warn_redundant_casts = true
# these options are quite restrictive, disabled
disallow_any_generics = true
no_implicit_reexport = true
# Checks that no 'viral' licensed libraries are in use.
[tool.liccheck]
authorized_licenses = [
"bsd",
"new bsd",
"bsd license",
"new bsd license",
"simplified bsd",
"apache",
"apache 2.0",
"apache software license",
"gnu lgpl",
"lgpl with exceptions or zpl",
"isc license",
"isc license (iscl)",
"mit",
"mit license",
"python software foundation license",
"zpl 2.1",
]
unauthorized_licenses = [
"gpl",
"gpl v2",
"gpl v3",
]
level = "STANDARD"
reporting_txt_file = "docs/source/license-check.txt"
dependencies = true # to load [project.dependencies]
optional_dependencies = ["test"] # to load extras from [project.optional-dependencies]
[tool.liccheck.authorized_packages]
uuid = 1.30
# see https://docs.pytest.org/en/6.2.x/customize.html and https://docs.pytest.org/en/6.2.x/reference.html#ini-options-ref
[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning"]