libres 0.7.3__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libres-0.7.3 → libres-0.9.0}/HISTORY.rst +27 -0
- {libres-0.7.3/src/libres.egg-info → libres-0.9.0}/PKG-INFO +44 -11
- {libres-0.7.3 → libres-0.9.0}/README.rst +6 -6
- libres-0.9.0/pyproject.toml +283 -0
- {libres-0.7.3 → libres-0.9.0}/setup.cfg +13 -6
- {libres-0.7.3 → libres-0.9.0}/src/libres/__init__.py +3 -1
- {libres-0.7.3 → libres-0.9.0}/src/libres/context/core.py +37 -31
- libres-0.9.0/src/libres/context/exposure.py +13 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/context/registry.py +15 -11
- {libres-0.7.3 → libres-0.9.0}/src/libres/context/session.py +8 -6
- {libres-0.7.3 → libres-0.9.0}/src/libres/context/settings.py +9 -6
- libres-0.9.0/src/libres/db/__init__.py +7 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/__init__.py +2 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/allocation.py +72 -59
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/base.py +2 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/other.py +12 -7
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/reservation.py +30 -25
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/reserved_slot.py +12 -10
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/timestamp.py +9 -7
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/types/__init__.py +2 -0
- libres-0.9.0/src/libres/db/models/types/json_type.py +46 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/types/utcdatetime.py +10 -8
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/models/types/uuid_type.py +10 -8
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/queries.py +32 -27
- {libres-0.7.3 → libres-0.9.0}/src/libres/db/scheduler.py +141 -131
- {libres-0.7.3 → libres-0.9.0}/src/libres/modules/errors.py +9 -7
- {libres-0.7.3 → libres-0.9.0}/src/libres/modules/events.py +57 -56
- {libres-0.7.3 → libres-0.9.0}/src/libres/modules/rasterizer.py +11 -7
- {libres-0.7.3 → libres-0.9.0}/src/libres/modules/utils.py +16 -14
- libres-0.9.0/src/libres/py.typed +0 -0
- {libres-0.7.3 → libres-0.9.0/src/libres.egg-info}/PKG-INFO +44 -11
- {libres-0.7.3 → libres-0.9.0}/src/libres.egg-info/requires.txt +6 -1
- {libres-0.7.3 → libres-0.9.0}/tests/test_allocation.py +1 -1
- {libres-0.7.3 → libres-0.9.0}/tests/test_scheduler.py +1 -1
- libres-0.7.3/pyproject.toml +0 -82
- libres-0.7.3/src/libres/context/exposure.py +0 -9
- libres-0.7.3/src/libres/db/__init__.py +0 -5
- libres-0.7.3/src/libres/db/models/types/json_type.py +0 -48
- libres-0.7.3/src/libres/modules/__init__.py +0 -1
- {libres-0.7.3 → libres-0.9.0}/LICENSE +0 -0
- {libres-0.7.3 → libres-0.9.0}/MANIFEST.in +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/Makefile +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/_static/custom.css +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/_static/favicon.ico +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/_static/logo.svg +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/api.rst +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/concepts.rst +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/conf.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/customizations.rst +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/faq.rst +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/index.rst +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/requirements.txt +0 -0
- {libres-0.7.3 → libres-0.9.0}/docs/under_the_hood.rst +0 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/.gitignore +0 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres/context/__init__.py +0 -0
- /libres-0.7.3/src/libres/py.typed → /libres-0.9.0/src/libres/modules/__init__.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres.egg-info/SOURCES.txt +0 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres.egg-info/dependency_links.txt +0 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres.egg-info/not-zip-safe +0 -0
- {libres-0.7.3 → libres-0.9.0}/src/libres.egg-info/top_level.txt +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_registry.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_reservation.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_reserved_slot.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_session.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_test.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_types.py +0 -0
- {libres-0.7.3 → libres-0.9.0}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
---------
|
|
3
3
|
|
|
4
|
+
0.9.0 (23.05.2025)
|
|
5
|
+
~~~~~~~~~~~~~~~~~~~
|
|
6
|
+
|
|
7
|
+
- Replaces `JSON` database type with `JSONB`, this means
|
|
8
|
+
Postgres as a backend is not required. You will also need
|
|
9
|
+
to write a migration for existing JSON columns. You may use
|
|
10
|
+
the following recipe using an alembic `Operations` object::
|
|
11
|
+
|
|
12
|
+
operations.alter_column(
|
|
13
|
+
'table_name',
|
|
14
|
+
'column_name',
|
|
15
|
+
type_=JSON,
|
|
16
|
+
postgresql_using='"column_name"::jsonb'
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
0.8.0 (15.01.2025)
|
|
20
|
+
~~~~~~~~~~~~~~~~~~~
|
|
21
|
+
|
|
22
|
+
- Adds support for Python 3.13
|
|
23
|
+
[Daverball]
|
|
24
|
+
|
|
25
|
+
- Drops support for Python 3.8
|
|
26
|
+
[Daverball]
|
|
27
|
+
|
|
28
|
+
- Modernizes type hints
|
|
29
|
+
[Daverball]
|
|
30
|
+
|
|
4
31
|
0.7.3 (2024-08-21)
|
|
5
32
|
~~~~~~~~~~~~~~~~~~~
|
|
6
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: libres
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: A library to reserve things
|
|
5
5
|
Home-page: http://github.com/seantis/libres/
|
|
6
6
|
Author: Denis Krienbühl
|
|
@@ -14,13 +14,13 @@ Classifier: License :: OSI Approved :: BSD License
|
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
24
|
Description-Content-Type: text/x-rst
|
|
25
25
|
License-File: LICENSE
|
|
26
26
|
Requires-Dist: python-dateutil
|
|
@@ -30,10 +30,15 @@ Requires-Dist: sedate>=1.0.0
|
|
|
30
30
|
Requires-Dist: SQLAlchemy<2,>=0.9
|
|
31
31
|
Provides-Extra: dev
|
|
32
32
|
Requires-Dist: bandit[toml]; extra == "dev"
|
|
33
|
+
Requires-Dist: bump-my-version; extra == "dev"
|
|
33
34
|
Requires-Dist: flake8; extra == "dev"
|
|
34
|
-
Requires-Dist: flake8-
|
|
35
|
+
Requires-Dist: flake8-type-checking; extra == "dev"
|
|
35
36
|
Requires-Dist: pre-commit; extra == "dev"
|
|
37
|
+
Requires-Dist: pre-commit-uv; extra == "dev"
|
|
38
|
+
Requires-Dist: ruff; extra == "dev"
|
|
39
|
+
Requires-Dist: uv; extra == "dev"
|
|
36
40
|
Requires-Dist: tox; extra == "dev"
|
|
41
|
+
Requires-Dist: tox-uv; extra == "dev"
|
|
37
42
|
Provides-Extra: test
|
|
38
43
|
Requires-Dist: jsonpickle; extra == "test"
|
|
39
44
|
Requires-Dist: pytest; extra == "test"
|
|
@@ -46,13 +51,14 @@ Requires-Dist: types-psycopg2; extra == "mypy"
|
|
|
46
51
|
Requires-Dist: types-python-dateutil; extra == "mypy"
|
|
47
52
|
Requires-Dist: types-pytz; extra == "mypy"
|
|
48
53
|
Requires-Dist: typing-extensions; extra == "mypy"
|
|
54
|
+
Dynamic: license-file
|
|
49
55
|
|
|
50
56
|
Libres
|
|
51
57
|
======
|
|
52
58
|
|
|
53
59
|
Libres is a reservations management library to reserve things like tables at
|
|
54
|
-
a restaurant or tickets at an event. It works with Python 3.
|
|
55
|
-
and requires Postgresql 9.
|
|
60
|
+
a restaurant or tickets at an event. It works with Python 3.9+
|
|
61
|
+
and requires Postgresql 9.2+.
|
|
56
62
|
|
|
57
63
|
`Documentation <http://libres.readthedocs.org/en/latest/>`_ | `Source <http://github.com/seantis/libres/>`_ | `Bugs <http://github.com/seantis/libres/issues>`_
|
|
58
64
|
|
|
@@ -91,19 +97,19 @@ Run the Tests
|
|
|
91
97
|
|
|
92
98
|
Install tox and run it::
|
|
93
99
|
|
|
94
|
-
pip install tox
|
|
100
|
+
pip install tox tox-uv
|
|
95
101
|
tox
|
|
96
102
|
|
|
97
103
|
Limit the tests to a specific python version::
|
|
98
104
|
|
|
99
|
-
tox -e
|
|
105
|
+
tox -e py311
|
|
100
106
|
|
|
101
107
|
Conventions
|
|
102
108
|
-----------
|
|
103
109
|
|
|
104
110
|
Libres follows PEP8 as close as possible. To test for it run::
|
|
105
111
|
|
|
106
|
-
tox -e
|
|
112
|
+
tox -e ruff,flake8
|
|
107
113
|
|
|
108
114
|
Libres uses `Semantic Versioning <http://semver.org/>`_
|
|
109
115
|
|
|
@@ -128,7 +134,7 @@ Making a new Release
|
|
|
128
134
|
|
|
129
135
|
Make sure all changes are in the HISTORY.rst, then bump the version::
|
|
130
136
|
|
|
131
|
-
|
|
137
|
+
bump-my-version bump major|minor|patch
|
|
132
138
|
git push && git push --tags
|
|
133
139
|
|
|
134
140
|
After this, create a new release on Github.
|
|
@@ -136,6 +142,33 @@ After this, create a new release on Github.
|
|
|
136
142
|
Changelog
|
|
137
143
|
---------
|
|
138
144
|
|
|
145
|
+
0.9.0 (23.05.2025)
|
|
146
|
+
~~~~~~~~~~~~~~~~~~~
|
|
147
|
+
|
|
148
|
+
- Replaces `JSON` database type with `JSONB`, this means
|
|
149
|
+
Postgres as a backend is not required. You will also need
|
|
150
|
+
to write a migration for existing JSON columns. You may use
|
|
151
|
+
the following recipe using an alembic `Operations` object::
|
|
152
|
+
|
|
153
|
+
operations.alter_column(
|
|
154
|
+
'table_name',
|
|
155
|
+
'column_name',
|
|
156
|
+
type_=JSON,
|
|
157
|
+
postgresql_using='"column_name"::jsonb'
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
0.8.0 (15.01.2025)
|
|
161
|
+
~~~~~~~~~~~~~~~~~~~
|
|
162
|
+
|
|
163
|
+
- Adds support for Python 3.13
|
|
164
|
+
[Daverball]
|
|
165
|
+
|
|
166
|
+
- Drops support for Python 3.8
|
|
167
|
+
[Daverball]
|
|
168
|
+
|
|
169
|
+
- Modernizes type hints
|
|
170
|
+
[Daverball]
|
|
171
|
+
|
|
139
172
|
0.7.3 (2024-08-21)
|
|
140
173
|
~~~~~~~~~~~~~~~~~~~
|
|
141
174
|
|
|
@@ -2,8 +2,8 @@ Libres
|
|
|
2
2
|
======
|
|
3
3
|
|
|
4
4
|
Libres is a reservations management library to reserve things like tables at
|
|
5
|
-
a restaurant or tickets at an event. It works with Python 3.
|
|
6
|
-
and requires Postgresql 9.
|
|
5
|
+
a restaurant or tickets at an event. It works with Python 3.9+
|
|
6
|
+
and requires Postgresql 9.2+.
|
|
7
7
|
|
|
8
8
|
`Documentation <http://libres.readthedocs.org/en/latest/>`_ | `Source <http://github.com/seantis/libres/>`_ | `Bugs <http://github.com/seantis/libres/issues>`_
|
|
9
9
|
|
|
@@ -42,19 +42,19 @@ Run the Tests
|
|
|
42
42
|
|
|
43
43
|
Install tox and run it::
|
|
44
44
|
|
|
45
|
-
pip install tox
|
|
45
|
+
pip install tox tox-uv
|
|
46
46
|
tox
|
|
47
47
|
|
|
48
48
|
Limit the tests to a specific python version::
|
|
49
49
|
|
|
50
|
-
tox -e
|
|
50
|
+
tox -e py311
|
|
51
51
|
|
|
52
52
|
Conventions
|
|
53
53
|
-----------
|
|
54
54
|
|
|
55
55
|
Libres follows PEP8 as close as possible. To test for it run::
|
|
56
56
|
|
|
57
|
-
tox -e
|
|
57
|
+
tox -e ruff,flake8
|
|
58
58
|
|
|
59
59
|
Libres uses `Semantic Versioning <http://semver.org/>`_
|
|
60
60
|
|
|
@@ -79,7 +79,7 @@ Making a new Release
|
|
|
79
79
|
|
|
80
80
|
Make sure all changes are in the HISTORY.rst, then bump the version::
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
bump-my-version bump major|minor|patch
|
|
83
83
|
git push && git push --tags
|
|
84
84
|
|
|
85
85
|
After this, create a new release on Github.
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=42", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.pytest.ini_options]
|
|
6
|
+
log_level = "INFO"
|
|
7
|
+
testpaths = ["tests"]
|
|
8
|
+
|
|
9
|
+
[tool.coverage.run]
|
|
10
|
+
branch = true
|
|
11
|
+
source = ["src"]
|
|
12
|
+
|
|
13
|
+
[tool.bumpversion]
|
|
14
|
+
current_version = "0.9.0"
|
|
15
|
+
commit = true
|
|
16
|
+
message = "Release {new_version}"
|
|
17
|
+
tag = true
|
|
18
|
+
tag_message = "Release {new_version}"
|
|
19
|
+
|
|
20
|
+
[[tool.bumpversion.files]]
|
|
21
|
+
filename = "src/libres/__init__.py"
|
|
22
|
+
search= "__version__ = '{current_version}'"
|
|
23
|
+
replace= "__version__ = '{new_version}'"
|
|
24
|
+
|
|
25
|
+
[[tool.bumpversion.files]]
|
|
26
|
+
filename = "HISTORY.rst"
|
|
27
|
+
search = """
|
|
28
|
+
---------
|
|
29
|
+
"""
|
|
30
|
+
replace = """
|
|
31
|
+
---------
|
|
32
|
+
|
|
33
|
+
{new_version} ({now:%d.%m.%Y})
|
|
34
|
+
~~~~~~~~~~~~~~~~~~~
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
[tool.mypy]
|
|
38
|
+
python_version = "3.9"
|
|
39
|
+
namespace_packages = true
|
|
40
|
+
explicit_package_bases = true
|
|
41
|
+
strict = true
|
|
42
|
+
warn_unreachable = true
|
|
43
|
+
# FIXME: remove this exclusion when upgrading to SQlAlchemy 2.0
|
|
44
|
+
untyped_calls_exclude = "sqlalchemy"
|
|
45
|
+
plugins = "sqlmypy"
|
|
46
|
+
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
|
|
47
|
+
|
|
48
|
+
[tool.bandit]
|
|
49
|
+
exclude_dirs = ["tests"]
|
|
50
|
+
skips = ["B101"]
|
|
51
|
+
|
|
52
|
+
[tool.ruff]
|
|
53
|
+
exclude = [
|
|
54
|
+
".bzr",
|
|
55
|
+
".direnv",
|
|
56
|
+
".eggs",
|
|
57
|
+
".git",
|
|
58
|
+
".git-rewrite",
|
|
59
|
+
".hg",
|
|
60
|
+
".ipynb_checkpoints",
|
|
61
|
+
".mypy_cache",
|
|
62
|
+
".nox",
|
|
63
|
+
".pants.d",
|
|
64
|
+
".pyenv",
|
|
65
|
+
".pytest_cache",
|
|
66
|
+
".pytype",
|
|
67
|
+
".ruff_cache",
|
|
68
|
+
".svn",
|
|
69
|
+
".tox",
|
|
70
|
+
".venv",
|
|
71
|
+
".vscode",
|
|
72
|
+
"__pypackages__",
|
|
73
|
+
"_build",
|
|
74
|
+
"buck-out",
|
|
75
|
+
"build",
|
|
76
|
+
"dist",
|
|
77
|
+
"node_modules",
|
|
78
|
+
"site-packages",
|
|
79
|
+
"venv",
|
|
80
|
+
]
|
|
81
|
+
src = ["src", "tests"]
|
|
82
|
+
include = [
|
|
83
|
+
"pyproject.toml",
|
|
84
|
+
"src/**/*.py",
|
|
85
|
+
"tests/**/*.py",
|
|
86
|
+
"stubs/**/*.pyi"
|
|
87
|
+
]
|
|
88
|
+
line-length = 79
|
|
89
|
+
indent-width = 4
|
|
90
|
+
target-version = "py39"
|
|
91
|
+
|
|
92
|
+
[tool.ruff.lint]
|
|
93
|
+
select = [
|
|
94
|
+
"B0",
|
|
95
|
+
"B904",
|
|
96
|
+
"B909",
|
|
97
|
+
"C4",
|
|
98
|
+
"COM818",
|
|
99
|
+
"D2",
|
|
100
|
+
"D301",
|
|
101
|
+
"D4",
|
|
102
|
+
"E",
|
|
103
|
+
"F",
|
|
104
|
+
"FLY002",
|
|
105
|
+
"I002",
|
|
106
|
+
"ISC",
|
|
107
|
+
"N",
|
|
108
|
+
"PERF",
|
|
109
|
+
"PGH004",
|
|
110
|
+
"PIE",
|
|
111
|
+
"PYI",
|
|
112
|
+
"Q",
|
|
113
|
+
"RUF",
|
|
114
|
+
"SIM",
|
|
115
|
+
"SLOT",
|
|
116
|
+
"UP",
|
|
117
|
+
"W"
|
|
118
|
+
]
|
|
119
|
+
ignore = [
|
|
120
|
+
"B007",
|
|
121
|
+
"C420",
|
|
122
|
+
"D200",
|
|
123
|
+
"D201",
|
|
124
|
+
"D202",
|
|
125
|
+
"D204",
|
|
126
|
+
"D205",
|
|
127
|
+
"D209",
|
|
128
|
+
"D210",
|
|
129
|
+
"D211",
|
|
130
|
+
"D400",
|
|
131
|
+
"D401",
|
|
132
|
+
"D412",
|
|
133
|
+
"E226",
|
|
134
|
+
"E402",
|
|
135
|
+
"E711",
|
|
136
|
+
"E712",
|
|
137
|
+
"E741",
|
|
138
|
+
"N818",
|
|
139
|
+
"PYI019",
|
|
140
|
+
"PYI041",
|
|
141
|
+
"RUF012",
|
|
142
|
+
"RUF013",
|
|
143
|
+
"RUF021",
|
|
144
|
+
"RUF022",
|
|
145
|
+
"RUF023",
|
|
146
|
+
"RUF031",
|
|
147
|
+
"RUF052",
|
|
148
|
+
"RUF056",
|
|
149
|
+
"SIM103",
|
|
150
|
+
"SIM105",
|
|
151
|
+
"SIM108",
|
|
152
|
+
"SIM110",
|
|
153
|
+
"SIM118",
|
|
154
|
+
"SIM210",
|
|
155
|
+
"SIM910",
|
|
156
|
+
"UP009",
|
|
157
|
+
"UP012",
|
|
158
|
+
"UP032",
|
|
159
|
+
"UP038",
|
|
160
|
+
]
|
|
161
|
+
unfixable = []
|
|
162
|
+
external = ["TC"]
|
|
163
|
+
allowed-confusables = ["×"]
|
|
164
|
+
preview = true
|
|
165
|
+
|
|
166
|
+
[tool.ruff.lint.extend-per-file-ignores]
|
|
167
|
+
"tests/**/*.py" = [
|
|
168
|
+
"C4",
|
|
169
|
+
"D",
|
|
170
|
+
"FLY002",
|
|
171
|
+
"I002",
|
|
172
|
+
"ISC",
|
|
173
|
+
"N",
|
|
174
|
+
"Q",
|
|
175
|
+
"PERF",
|
|
176
|
+
"PGH",
|
|
177
|
+
"PIE",
|
|
178
|
+
"PYI",
|
|
179
|
+
"RUF",
|
|
180
|
+
"SIM",
|
|
181
|
+
"UP",
|
|
182
|
+
]
|
|
183
|
+
|
|
184
|
+
[tool.ruff.lint.isort]
|
|
185
|
+
required-imports = ["from __future__ import annotations"]
|
|
186
|
+
|
|
187
|
+
[tool.ruff.lint.pep8-naming]
|
|
188
|
+
extend-ignore-names = [
|
|
189
|
+
"afterFlowable",
|
|
190
|
+
"HSTORE",
|
|
191
|
+
"sortKey",
|
|
192
|
+
"URL",
|
|
193
|
+
"UUID"
|
|
194
|
+
]
|
|
195
|
+
classmethod-decorators = [
|
|
196
|
+
# NOTE: We can potentially get rid some of these with SQLAlchemy 2.0
|
|
197
|
+
# since they should cleanly combine with classmethod
|
|
198
|
+
"declared_attr",
|
|
199
|
+
"expression",
|
|
200
|
+
"comparator",
|
|
201
|
+
]
|
|
202
|
+
|
|
203
|
+
[tool.ruff.lint.pydocstyle]
|
|
204
|
+
convention = "pep257"
|
|
205
|
+
ignore-decorators = ["typing.overload"]
|
|
206
|
+
|
|
207
|
+
[tool.ruff.lint.flake8-quotes]
|
|
208
|
+
avoid-escape = true
|
|
209
|
+
docstring-quotes = "double"
|
|
210
|
+
inline-quotes = "single"
|
|
211
|
+
multiline-quotes = "double"
|
|
212
|
+
|
|
213
|
+
[tool.ruff.format]
|
|
214
|
+
quote-style = "single"
|
|
215
|
+
indent-style = "space"
|
|
216
|
+
skip-magic-trailing-comma = false
|
|
217
|
+
line-ending = "lf"
|
|
218
|
+
docstring-code-format = true
|
|
219
|
+
docstring-code-line-length = "dynamic"
|
|
220
|
+
|
|
221
|
+
[tool.tox]
|
|
222
|
+
legacy_tox_ini = """
|
|
223
|
+
[tox]
|
|
224
|
+
envlist = py39,py310,py311,flake8,bandit,mypy,report
|
|
225
|
+
|
|
226
|
+
[gh-actions]
|
|
227
|
+
python =
|
|
228
|
+
3.9: py39
|
|
229
|
+
3.10: py310
|
|
230
|
+
3.11: py311,flake8,bandit,mypy
|
|
231
|
+
3.12: py312
|
|
232
|
+
3.13: py313
|
|
233
|
+
|
|
234
|
+
[testenv]
|
|
235
|
+
usedevelop = true
|
|
236
|
+
setenv =
|
|
237
|
+
py{39,310,311,312,313}: COVERAGE_FILE = .coverage.{envname}
|
|
238
|
+
deps =
|
|
239
|
+
-e{toxinidir}[test]
|
|
240
|
+
commands = pytest --cov --cov-report= {posargs}
|
|
241
|
+
|
|
242
|
+
[testenv:ruff]
|
|
243
|
+
basepython = python3.11
|
|
244
|
+
skip_install = true
|
|
245
|
+
deps =
|
|
246
|
+
ruff
|
|
247
|
+
commands = ruff check
|
|
248
|
+
|
|
249
|
+
[testenv:flake8]
|
|
250
|
+
basepython = python3.11
|
|
251
|
+
skip_install = true
|
|
252
|
+
deps =
|
|
253
|
+
flake8
|
|
254
|
+
flake8-type-checking
|
|
255
|
+
commands = flake8 src/ tests/
|
|
256
|
+
|
|
257
|
+
[testenv:bandit]
|
|
258
|
+
basepython = python3.11
|
|
259
|
+
skip_install = true
|
|
260
|
+
deps =
|
|
261
|
+
bandit[toml]
|
|
262
|
+
commands = bandit -q -c pyproject.toml -r src
|
|
263
|
+
|
|
264
|
+
[testenv:mypy]
|
|
265
|
+
basepython = python3.11
|
|
266
|
+
deps =
|
|
267
|
+
-e{toxinidir}[mypy]
|
|
268
|
+
commands =
|
|
269
|
+
mypy -p libres --python-version 3.9
|
|
270
|
+
mypy -p libres --python-version 3.10
|
|
271
|
+
mypy -p libres --python-version 3.11
|
|
272
|
+
mypy -p libres --python-version 3.12
|
|
273
|
+
mypy -p libres --python-version 3.13
|
|
274
|
+
|
|
275
|
+
[testenv:report]
|
|
276
|
+
deps =
|
|
277
|
+
coverage
|
|
278
|
+
skip_install = true
|
|
279
|
+
commands =
|
|
280
|
+
coverage combine
|
|
281
|
+
coverage report -m
|
|
282
|
+
|
|
283
|
+
"""
|
|
@@ -18,15 +18,15 @@ classifiers =
|
|
|
18
18
|
Operating System :: OS Independent
|
|
19
19
|
Programming Language :: Python
|
|
20
20
|
Programming Language :: Python :: 3
|
|
21
|
-
Programming Language :: Python :: 3.8
|
|
22
21
|
Programming Language :: Python :: 3.9
|
|
23
22
|
Programming Language :: Python :: 3.10
|
|
24
23
|
Programming Language :: Python :: 3.11
|
|
25
24
|
Programming Language :: Python :: 3.12
|
|
25
|
+
Programming Language :: Python :: 3.13
|
|
26
26
|
Topic :: Software Development :: Libraries :: Python Modules
|
|
27
27
|
|
|
28
28
|
[options]
|
|
29
|
-
python_requires = >= 3.
|
|
29
|
+
python_requires = >= 3.9
|
|
30
30
|
include_package_data = True
|
|
31
31
|
package_dir =
|
|
32
32
|
= src
|
|
@@ -47,10 +47,15 @@ libres =
|
|
|
47
47
|
[options.extras_require]
|
|
48
48
|
dev =
|
|
49
49
|
bandit[toml]
|
|
50
|
+
bump-my-version
|
|
50
51
|
flake8
|
|
51
|
-
flake8-
|
|
52
|
+
flake8-type-checking
|
|
52
53
|
pre-commit
|
|
54
|
+
pre-commit-uv
|
|
55
|
+
ruff
|
|
56
|
+
uv
|
|
53
57
|
tox
|
|
58
|
+
tox-uv
|
|
54
59
|
test =
|
|
55
60
|
jsonpickle
|
|
56
61
|
pytest
|
|
@@ -65,9 +70,11 @@ mypy =
|
|
|
65
70
|
typing-extensions
|
|
66
71
|
|
|
67
72
|
[flake8]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
select = TC0,TC1
|
|
74
|
+
per_file_ignores =
|
|
75
|
+
*.pyi: TC
|
|
76
|
+
tests/**.py: TC
|
|
77
|
+
exclude = .venv,venv,.git,.tox,dist,docs,*lib/python*,*egg,build
|
|
71
78
|
|
|
72
79
|
[egg_info]
|
|
73
80
|
tag_build =
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
1
3
|
from libres.context.registry import create_default_registry
|
|
2
4
|
from libres.db import new_scheduler
|
|
3
5
|
|
|
4
6
|
registry = create_default_registry()
|
|
5
7
|
|
|
6
|
-
__version__ = '0.
|
|
8
|
+
__version__ = '0.9.0'
|
|
7
9
|
__all__ = (
|
|
8
10
|
'new_scheduler',
|
|
9
11
|
'registry'
|