Skip to content

Commit 199e814

Browse files
committed
Groundwork for version 2.0
1 parent 25fa5ef commit 199e814

File tree

9 files changed

+113
-107
lines changed

9 files changed

+113
-107
lines changed

.gitignore

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ __pycache__/
77
*.so
88

99
# Distribution / packaging
10-
.build/
1110
.Python
1211
build/
1312
develop-eggs/
@@ -21,10 +20,13 @@ parts/
2120
sdist/
2221
var/
2322
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
2425
*.egg-info/
2526
.installed.cfg
2627
*.egg
2728
MANIFEST
29+
.hatch/
2830

2931
# PyInstaller
3032
# Usually these files are written by a python script from a template
@@ -39,12 +41,14 @@ pip-delete-this-directory.txt
3941
# Unit test / coverage reports
4042
htmlcov/
4143
.tox/
44+
.nox/
4245
.coverage
4346
.coverage.*
4447
.cache
4548
nosetests.xml
4649
coverage.xml
4750
*.cover
51+
*.py,cover
4852
.hypothesis/
4953
.pytest_cache/
5054

@@ -56,6 +60,7 @@ coverage.xml
5660
*.log
5761
local_settings.py
5862
db.sqlite3
63+
db.sqlite3-journal
5964

6065
# Flask stuff:
6166
instance/
@@ -73,11 +78,26 @@ target/
7378
# Jupyter Notebook
7479
.ipynb_checkpoints
7580

81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
7685
# pyenv
7786
.python-version
7887

79-
# celery beat schedule file
88+
# pipenv
89+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
91+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
92+
# install all needed dependencies.
93+
#Pipfile.lock
94+
95+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
96+
__pypackages__/
97+
98+
# Celery stuff
8099
celerybeat-schedule
100+
celerybeat.pid
81101

82102
# SageMath parsed files
83103
*.sage.py
@@ -103,3 +123,28 @@ venv.bak/
103123

104124
# mypy
105125
.mypy_cache/
126+
.dmypy.json
127+
dmypy.json
128+
129+
# Pyre type checker
130+
.pyre/
131+
132+
# WingIDE
133+
*.wpr
134+
*.wpu
135+
136+
# VSCode
137+
.vscode
138+
139+
# Personal
140+
notes/
141+
store/
142+
143+
# Sphinx build
144+
.build/
145+
docs/
146+
docs/_build
147+
docs/firebird-driver.docset
148+
149+
# Personal files
150+
personal/

python/pyproject.toml

Lines changed: 43 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "firebird-butler-protobuf"
77
dynamic = ["version"]
88
description = 'Firebird Butler protocol buffers'
99
readme = "README.md"
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.11"
1111
license = { file = "LICENSE" }
1212
keywords = ["Firebird", "Butler", "protobuf"]
1313
authors = [
@@ -18,17 +18,16 @@ classifiers = [
1818
"Intended Audience :: Developers",
1919
"License :: OSI Approved :: MIT License",
2020
"Programming Language :: Python :: 3 :: Only",
21-
"Programming Language :: Python :: 3.8",
22-
"Programming Language :: Python :: 3.9",
23-
"Programming Language :: Python :: 3.10",
2421
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
2524
"Operating System :: POSIX :: Linux",
2625
"Operating System :: Microsoft :: Windows",
2726
"Operating System :: MacOS",
2827
"Topic :: Software Development",
2928
]
3029
dependencies = [
31-
"protobuf>=4.23.4",
30+
"protobuf~=5.29",
3231
]
3332

3433
[project.urls]
@@ -52,95 +51,46 @@ include = ["src"]
5251
[tool.hatch.build.targets.wheel]
5352
packages = ["src/firebird"]
5453

55-
[tool.hatch.envs.test]
54+
[tool.hatch.metadata]
55+
allow-direct-references = true
56+
57+
[tool.hatch.envs.default]
58+
dependencies = [
59+
]
60+
61+
[tool.hatch.envs.hatch-test]
62+
extra-args = ["-vv"]
5663
dependencies = [
5764
"coverage[toml]>=6.5",
5865
"pytest",
5966
]
60-
[tool.hatch.envs.test.scripts]
61-
test = "pytest {args:tests}"
62-
test-cov = "coverage run -m pytest {args:tests}"
63-
cov-report = [
64-
"- coverage combine",
65-
"coverage report",
66-
]
67-
cov = [
68-
"test-cov",
69-
"cov-report",
70-
]
71-
version = "python --version"
7267

73-
[[tool.hatch.envs.test.matrix]]
74-
python = ["3.8", "3.9", "3.10", "3.11"]
68+
[[tool.hatch.envs.hatch-test.matrix]]
69+
python = ["3.11", "3.12", "3.13"]
7570

7671
[tool.hatch.envs.doc]
7772
detached = false
7873
platforms = ["linux"]
7974
dependencies = [
80-
"Sphinx>=7.1",
75+
"Sphinx==7.2.6",
8176
"sphinx-bootstrap-theme>=0.8.1",
8277
"sphinx-autodoc-typehints>=1.24.0",
78+
"doc2dash>=3.0.0"
8379
]
8480
[tool.hatch.envs.doc.scripts]
8581
build = "cd docs ; make html"
86-
87-
[tool.hatch.envs.lint]
88-
detached = true
89-
dependencies = [
90-
"black>=23.1.0",
91-
"mypy>=1.0.0",
92-
"ruff>=0.0.243",
93-
]
94-
[tool.hatch.envs.lint.scripts]
95-
typing = "mypy --install-types --non-interactive {args:src/firebird/uuid tests}"
96-
style = [
97-
"ruff {args:.}",
98-
"black --check --diff {args:.}",
99-
]
100-
fmt = [
101-
"black {args:.}",
102-
"ruff --fix {args:.}",
103-
"style",
104-
]
105-
all = [
106-
"style",
107-
"typing",
82+
docset = [
83+
"cd docs ; doc2dash -u https://firebird-butler.readthedocs.io/en/latest/ -f -i ./_static/fb-favicon.png -n firebird-butler ./_build/html/",
84+
"cd docs; VERSION=`hatch version` ; tar --exclude='.DS_Store' -cvzf ../dist/firebird-butler-$VERSION-docset.tgz firebird-butler.docset",
10885
]
10986

110-
[tool.black]
111-
target-version = ["py38"]
112-
line-length = 120
113-
skip-string-normalization = true
114-
11587
[tool.ruff]
116-
target-version = "py38"
88+
target-version = "py311"
11789
line-length = 120
118-
select = [
119-
"A",
120-
"ARG",
121-
"B",
122-
"C",
123-
"DTZ",
124-
"E",
125-
"EM",
126-
"F",
127-
"FBT",
128-
"I",
129-
"ICN",
130-
"ISC",
131-
"N",
132-
"PLC",
133-
"PLE",
134-
"PLR",
135-
"PLW",
136-
"Q",
137-
"RUF",
138-
"S",
139-
"T",
140-
"TID",
141-
"UP",
142-
"W",
143-
"YTT",
90+
91+
[tool.ruff.lint]
92+
select = ["A", "ARG", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
93+
"PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "T", "TID", "UP", "W", "YTT",
14494
]
14595
ignore = [
14696
# Allow non-abstract empty methods in abstract base classes
@@ -151,32 +101,43 @@ ignore = [
151101
"S105", "S106", "S107",
152102
# Ignore complexity
153103
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
104+
#
105+
"E741",
106+
# Allow relative imports
107+
"TID252",
108+
# Allow literals in exceptions
109+
"EM101", "EM102",
110+
# Single quotes instead double
111+
"Q000"
154112
]
155113
unfixable = [
156114
# Don't touch unused imports
157115
"F401",
116+
# Don't change single quotes to double
117+
"Q000"
158118
]
119+
exclude = ["*_pb2.py", "*.pyi", "tests/*", "docs/*", "personal/*"]
159120

160-
[tool.ruff.isort]
161-
known-first-party = ["firebird.uuid"]
121+
[tool.ruff.lint.isort]
122+
known-first-party = ["firebird.butler"]
162123

163-
[tool.ruff.flake8-tidy-imports]
124+
[tool.ruff.lint.flake8-tidy-imports]
164125
ban-relative-imports = "all"
165126

166-
[tool.ruff.per-file-ignores]
127+
[tool.ruff.lint.extend-per-file-ignores]
167128
# Tests can use magic values, assertions, and relative imports
168129
"tests/**/*" = ["PLR2004", "S101", "TID252"]
169130

170131
[tool.coverage.run]
171-
source_pkgs = ["firebird.uuid", "tests"]
132+
source_pkgs = ["firebird.butler", "tests"]
172133
branch = true
173134
parallel = true
174135
omit = [
175-
"src/firebird/uuid/__about__.py",
136+
"src/firebird/butler/__about__.py",
176137
]
177138

178139
[tool.coverage.paths]
179-
firebird_uuid = ["src/python", "*/python/src/firebird/uuid"]
140+
firebird_butler = ["*/python/src/firebird/butler"]
180141
tests = ["tests", "*/python/tests"]
181142

182143
[tool.coverage.report]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2018-present Pavel Cisar <[email protected]>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = "1.0.1"
4+
__version__ = "2.0.0"

python/src/firebird/butler/fbdp_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/src/firebird/butler/fbdp_pb2.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Opti
66
DESCRIPTOR: _descriptor.FileDescriptor
77

88
class FBDPOpenDataframe(_message.Message):
9-
__slots__ = ["data_pipe", "pipe_socket", "data_format", "parameters"]
9+
__slots__ = ("data_pipe", "pipe_socket", "data_format", "parameters")
1010
DATA_PIPE_FIELD_NUMBER: _ClassVar[int]
1111
PIPE_SOCKET_FIELD_NUMBER: _ClassVar[int]
1212
DATA_FORMAT_FIELD_NUMBER: _ClassVar[int]

python/src/firebird/butler/fbsd_pb2.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)