Skip to content

Commit 6216314

Browse files
committed
Adopt Poetry. Prepare for 1.15.0 release.
1 parent 379f906 commit 6216314

File tree

4 files changed

+187
-6
lines changed

4 files changed

+187
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ __pycache_
2323
/.idea
2424
.mypy_cache/
2525
.pytest_cache
26+
poetry.lock
2627

2728
*.key
2829
*.crt

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ install:
1919
- 'travis_retry pip install --force-reinstall --no-binary lxml lxml'
2020
- 'travis_retry pip install -e ".[test]"'
2121

22-
script:
22+
script:
2323
- 'coverage run --source=src/onelogin/saml2 --rcfile=tests/coverage.rc setup.py test'
2424
- 'coverage report -m --rcfile=tests/coverage.rc'
2525
# - 'pylint src/onelogin/saml2 --rcfile=tests/pylint.rc'
26-
- 'flake8 .'
26+
- 'flake8 --toml-config pyproject.toml'

pyproject.toml

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

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name='python3-saml',
9-
version='1.14.0',
9+
version='1.15.0',
1010
description='Saml Python Toolkit. Add SAML support to your Python software using this library',
1111
classifiers=[
1212
'Development Status :: 5 - Production/Stable',
@@ -23,7 +23,7 @@
2323
'Programming Language :: Python :: 3.10',
2424
],
2525
license='MIT',
26-
url='https://github.com/saml-toolkit/python3-saml',
26+
url='https://github.com/SAML-Toolkits/python3-saml',
2727
packages=['onelogin', 'onelogin/saml2'],
2828
include_package_data=True,
2929
package_data={
@@ -43,10 +43,10 @@
4343
'test': (
4444
'coverage>=4.5.2',
4545
'freezegun>=0.3.11, <=1.1.0',
46-
'pylint==1.9.4',
46+
# 'pylint>=1.9.4',
4747
'flake8>=3.6.0',
4848
'pytest>=4.6',
4949
),
5050
},
51-
keywords='saml saml2 xmlsec django flask pyramid python3',
51+
keywords='saml saml2 sso xmlsec federation identity',
5252
)

0 commit comments

Comments
 (0)