-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
129 lines (107 loc) · 3.99 KB
/
pyproject.toml
File metadata and controls
129 lines (107 loc) · 3.99 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
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
# PEP 621 Storing project metadata in pyproject.toml
# https://peps.python.org/pep-0621/
[tool.poetry]
# https://python-poetry.org/docs/pyproject/
name = "packagename"
version = "0.1.0"
description = "Python project boilerplate"
license = "MIT"
authors = ["Guillaume Gautier <guillaume.gga@gmail.com>"]
maintainers = ["Guillaume Gautier <guillaume.gga@gmail.com>"]
readme = "README.md" # path to README file (.md or .rst)
homepage = "https://github.com/guilgautier/template-python-project" # url
repository = "https://github.com/guilgautier/template-python-project" # url
documentation = "https://guilgautier.github.io/template-python-project" # url
keywords = [
"python",
"packaging",
"python-package",
"template",
] # ["optimization", "gradrient descent"] at most 5 keywords
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Mathematics",
] # https://pypi.org/classifiers/
# https://python-poetry.org/docs/pyproject/#packages
packages = []
# https://python-poetry.org/docs/pyproject/#include-and-exclude
include = []
exclude = [] # ["src/data/**/*"]
[tool.poetry.dependencies] # python-poetry.org/docs/managing-dependencies/
# Mandatory dependencies of the project
# Equivalent to [tool.poetry.group.main.dependencies]
# `poetry install` is equivalent to poetry install --with main
python = ">=3.8,<3.10" # >=3.7.1 required by pandas, <3.10 required by scipy
# To add a package to the main dependency group use
# poetry add PACKAGENAME
numpy = "^1.23.5"
scipy = "^1.9.3"
matplotlib = "^3.6.2"
pandas = "^1.5.2"
# Organize dependencies by group
# poetry add PACKAGENAME --group GROUPNAME
[tool.poetry.group.test]
optional = true # makes the `dev` dependency group optional
[tool.poetry.group.test.dependencies]
pytest = "^7.2.0"
pytest-cov = "^4.0.0" # generate coverage report see --cov --cov-report flags
[tool.poetry.group.dev]
optional = true # makes the `dev` dependency group optional
# poetry install --with dev
# poetry install --only dev
[tool.poetry.group.dev.dependencies]
# poetry add PACKAGENAME --group dev
# Testing (same as group.test)
pytest = "^7.2.0"
pytest-cov = "^4.0.0" # generate coverage report see --cov --cov-report flags
# Formatting, linting
pre-commit = "^2.20.0" # https://pre-commit.com/
black = { extras = [
"jupyter",
], version = "^22.12.0" } # uncompromising formatter
isort = "^5.11.2"
pydocstyle = "^6.1.1"
rstcheck = "^6.1.1"
pylint = "^2.15.8"
[tool.poetry.group.docs]
optional = true # makes the `docs` dependency group optional
# poetry install --with docs
# poetry install --only docs
[tool.poetry.group.docs.dependencies]
# poetry add PACKAGENAME --group dev
# Documentation is generated with Sphinx
# https://www.sphinx-doc.org/en/master/index.html
# - locally `poetry run sphinx-build -b docs docs/_build/html`
# - online either with
# - ReadTheDocs see .readthedocs.yaml file, or
# - GitHub pages see .github/workflows/docs.yml
# Configuration file is docs/conf.py
Sphinx = "^5.3.0"
# Extensions https://www.sphinx-doc.org/en/master/usage/extensions/index.html
sphinxcontrib-bibtex = "^2.5.0" # Manage bibliography .bib files
rstcheck = "^6.1.1"
esbonio = "^0.15.0" # Language server for .rst files
[tool.poetry.group.notebook]
optional = true
[tool.poetry.group.notebook.dependencies]
jupyter = "^1.0.0"
[tool.pytest.ini_options]
# poetry run pytest
minversion = "6.0"
addopts = "-ra -q -vv --cov=packagename --cov-report=term-missing --cov-report=xml"
testpaths = ["tests"]
# For other tools to be black compliant
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html
[tool.isort]
profile = "black"
[tool.pylint.messages_control]
disable = "C0330, C0326"
[tool.pylint.format]
max-line-length = "88"