Skip to content

Commit fe9bac0

Browse files
committed
Add Poetry file
1 parent 80e200c commit fe9bac0

File tree

2 files changed

+189
-0
lines changed

2 files changed

+189
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ __pycache_
1919
/venv
2020
.coverage
2121
.pypirc
22+
poetry.lock
2223

2324
*.key
2425
*.crt

pyproject.toml

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
[tool.poetry]
2+
name = "python-saml"
3+
version = "2.12.0"
4+
description = "Saml Python Toolkit. Add SAML support to your Python software using this library"
5+
license = "Apache-2.0"
6+
authors = ["SAML-Toolkits <[email protected]>"]
7+
maintainers = ["Sixto Martin <[email protected]>"]
8+
readme = "README.md"
9+
homepage = "https://saml.info"
10+
repository = "https://github.com/SAML-Toolkits/python-saml"
11+
keywords = [
12+
"saml",
13+
"saml2",
14+
"sso",
15+
"xmlsec",
16+
"federation",
17+
"identity",
18+
]
19+
classifiers = [
20+
"Topic :: Software Development :: Build Tools",
21+
"Topic :: Software Development :: Libraries :: Python Modules",
22+
]
23+
packages = [
24+
{ include = "onelogin", from = "src" },
25+
{ include = "onelogin/saml2", from = "src" },
26+
]
27+
28+
include = [
29+
{ path = "src/onelogin/saml2/schemas"},
30+
{ path = "tests", format = "sdist" }
31+
]
32+
33+
[tool.poetry.urls]
34+
"Bug Tracker" = "https://github.com/SAML-Toolkits/python-saml/issues"
35+
36+
[tool.poetry.dependencies]
37+
python = "2.7"
38+
lxml = ">=4.6.5, !=4.7.0"
39+
"dm.xmlsec.binding" = "1.3.7"
40+
isodate = ">=0.6.1"
41+
defusedxml = ">=0.7.1"
42+
43+
#[tool.poetry.group.dev]
44+
#optional = true
45+
46+
#[tool.poetry.group.dev.dependencies]
47+
#black = "*"
48+
#isort = {version = "^5.10.1", extras = ["pyproject"]}
49+
flake8 = { version = ">=3.6.0, <=4.0", optional = true}
50+
#Flake8-pyproject = "^1.1.0.post0"
51+
#flake8-bugbear = "^22.8.23"
52+
#flake8-logging-format = "^0.7.5"
53+
#ipdb = "^0.13.9"
54+
55+
#[tool.poetry.group.test.dependencies]
56+
freezegun= { version = ">=0.3.11, <=0.4", optional = true}
57+
pytest = { version = ">=4.6.11", optional = true}
58+
coverage = { version = ">=5.5, <6.0", optional = true}
59+
coveralls = { version = ">=1.1, <2.0", optional = true}
60+
#pylint = ">=1.9.4"
61+
62+
[tool.poetry.extras]
63+
test = ["flake8", "freezegun", "pytest", "coverage", "coveralls"]
64+
65+
#[tool.poetry.group.test]
66+
#optional = true
67+
68+
#[tool.poetry.group.coverage]
69+
#optional = true
70+
71+
#[tool.poetry.group.coverage.dependencies]
72+
#coverage = ">=4.5.2"
73+
#pytest-cov = "*"
74+
75+
#[tool.poetry.group.docs]
76+
#optional = true
77+
78+
#[tool.poetry.group.docs.dependencies]
79+
#sphinx = "*"
80+
81+
[build-system]
82+
requires = [
83+
"poetry>=1.1.15",
84+
"setuptools >= 40.1.0",
85+
"wheel"
86+
]
87+
build-backend = "poetry.core.masonry.api"
88+
89+
[tool.pytest.ini_options]
90+
minversion = "4.6.11"
91+
addopts = "-ra -vvv"
92+
testpaths = [
93+
"tests",
94+
]
95+
pythonpath = [
96+
"tests",
97+
]
98+
99+
[tool.coverage.run]
100+
branch = true
101+
source = ["src/onelogin/saml2"]
102+
ignore_errors = true
103+
104+
[tool.coverage.report]
105+
exclude_lines = [
106+
"pragma: no cover",
107+
"def __repr__",
108+
"def __str__",
109+
"raise AssertionError",
110+
"raise NotImplementedError",
111+
"if __name__ == .__main__.:",
112+
"if TYPE_CHECKING:",
113+
"if typing.TYPE_CHECKING:",
114+
]
115+
116+
[tool.coverage.html]
117+
directory = "cov_html"
118+
119+
[tool.flake8]
120+
max-line-length = 210
121+
max-complexity = 22
122+
count = true
123+
show-source = true
124+
statistics = true
125+
disable-noqa = false
126+
# 'ignore' defaults to: E121,E123,E126,E226,E24,E704,W503,W504
127+
extend-ignore = [
128+
'B904',
129+
'B006',
130+
'B950',
131+
'B017',
132+
'C901',
133+
'E501',
134+
'E731',
135+
]
136+
per-file-ignores = [
137+
'__init__.py:F401',
138+
]
139+
# 'select' defaults to: E,F,W,C90
140+
extend-select = [
141+
# * Default warnings reported by flake8-bugbear (B) -
142+
# https://github.com/PyCQA/flake8-bugbear#list-of-warnings
143+
'B',
144+
# * The B950 flake8-bugbear opinionated warnings -
145+
# https://github.com/PyCQA/flake8-bugbear#opinionated-warnings
146+
'B9',
147+
]
148+
extend-exclude = [
149+
'.github', '.gitlab',
150+
'.Python', '.*.pyc', '.*.pyo', '.*.pyd', '.*.py.class', '*.egg-info',
151+
'venv*', '.venv*', '.*_cache',
152+
'lib', 'lib64', '.*.so',
153+
'build', 'dist', 'sdist', 'wheels',
154+
]
155+
156+
[tool.black]
157+
line-length = 200
158+
extend-exclude = '''
159+
# A regex preceded with ^/ will apply only to files and directories
160+
# in the root of the project.
161+
(
162+
\.pytest_cache
163+
)
164+
'''
165+
166+
[tool.isort]
167+
profile = 'black'
168+
# The 'black' profile means:
169+
# multi_line_output = 3
170+
# include_trailing_comma = true
171+
# force_grid_wrap = 0
172+
# use_parentheses = true
173+
# ensure_newline_before_comments = true
174+
# line_length = 88
175+
line_length = 200 # override black provile line_length
176+
force_single_line = true # override black profile multi_line_output
177+
star_first = true
178+
group_by_package = true
179+
force_sort_within_sections = true
180+
lines_after_imports = 2
181+
honor_noqa = true
182+
atomic = true
183+
ignore_comments = true
184+
skip_gitignore = true
185+
src_paths = [
186+
'src',
187+
'tests',
188+
]

0 commit comments

Comments
 (0)