Skip to content

Commit c49d9da

Browse files
author
Tom Softreck
committed
update
1 parent ce1c715 commit c49d9da

5 files changed

Lines changed: 205 additions & 253 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.idea
22
.old
33
.todo.txt
4+
pyproject.toml.bak
45
old
56
cleanup_old_repo.sh
67
poetry.lock

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ install:
4141
pip install python-nmap opencv-python pycups
4242
@echo "✅ DialogChain installed"
4343

44+
venv:
45+
python3 -m venv venv
46+
source venv/bin/activate
47+
@echo "✅ Virtual environment created"
48+
4449
dev: install
4550
pip install -e ".[dev]"
4651
@echo "✅ Development environment ready"
@@ -62,7 +67,7 @@ install-deps:
6267
@which cargo > /dev/null && echo "✅ Rust found: $$(cargo --version)"
6368

6469
# Development
65-
test: test-unit test-integration test-e2e
70+
test: venv test-unit test-integration test-e2e
6671

6772
# Run unit tests
6873
test-unit:
@@ -184,7 +189,7 @@ endef
184189
PYPI_TOKEN_FROM_FILE := $(call get_pypi_token)
185190

186191
# Publishing
187-
publish:
192+
publish: venv
188193
@echo "🔄 Bumping version..."
189194
poetry version patch
190195
@echo "🧹 Cleaning build artifacts..."
@@ -258,7 +263,7 @@ docker-run: docker
258263
dialogchain run -c examples/simple_routes.yaml
259264

260265
# Examples and setup
261-
setup-env:
266+
setup-env: venv
262267
@if [ ! -f .env ]; then \
263268
if [ -f .env.example ]; then \
264269
cp .env.example .env; \

pyproject.toml

Lines changed: 37 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
[build-system]
2-
requires = ["poetry-core>=1.0.0"]
3-
build-backend = "poetry.core.masonry.api"
4-
51
[tool.poetry]
62
name = "dialogchain"
7-
version = "0.1.11"
3+
version = "0.1.12"
84
description = "DialogChain - A flexible and extensible dialog processing framework"
95
authors = ["Tom Sapletta <info@softreck.dev>"]
106
readme = "README.md"
@@ -27,132 +23,72 @@ classifiers = [
2723
"Topic :: Scientific/Engineering :: Artificial Intelligence",
2824
"Topic :: Text Processing :: Linguistic",
2925
]
30-
packages = [{include = "dialogchain", from = "src"}]
3126

3227
[tool.poetry.dependencies]
33-
python = ">=3.8.1,<3.13"
34-
click = ">=8.0.0,<9.0.0"
35-
pyyaml = ">=6.0,<7.0"
36-
python-dotenv = ">=1.0.0,<2.0.0"
37-
aiohttp = ">=3.8.0,<4.0.0"
38-
asyncio-mqtt = ">=0.13.0,<0.14.0"
39-
grpcio = ">=1.50.0,<2.0.0"
40-
grpcio-tools = ">=1.50.0,<2.0.0"
41-
jinja2 = ">=3.1.0,<4.0.0"
42-
opencv-python = ">=4.7.0,<5.0.0"
43-
numpy = ">=1.21.0,<2.0.0"
44-
python-nmap = ">=0.7.1,<1.0.0"
28+
python = "^3.8.1"
29+
click = "^8.0.0"
30+
pyyaml = "^6.0.0"
31+
python-dotenv = "^1.0.0"
32+
aiohttp = "^3.8.0"
33+
asyncio-mqtt = "^0.13.0"
34+
grpcio = "^1.50.0"
35+
grpcio-tools = "^1.50.0"
36+
jinja2 = "^3.1.0"
37+
opencv-python = "^4.7.0"
38+
numpy = "^1.21.0"
39+
python-nmap = "^0.7.1"
40+
aiofiles = "^24.1.0"
4541

4642
[tool.poetry.group.dev.dependencies]
47-
# Code formatting
4843
black = "^23.0.0"
4944
isort = "^5.12.0"
45+
pytest = "^7.0.0"
46+
pytest-asyncio = "^0.20.0"
47+
pytest-cov = "^4.0.0"
48+
pytest-mock = "^3.10.0"
49+
pytest-aiohttp = "^1.0.0"
50+
pytest-xdist = "^3.0.0"
51+
mypy = "^1.0.0"
5052

51-
# Linting
52-
flake8 = "^6.0.0"
53-
flake8-bugbear = "^23.7.0"
54-
flake8-annotations = "^3.0.1"
55-
flake8-bandit = "^4.1.1"
56-
flake8-docstrings = "^1.7.0"
57-
flake8-import-order = "^0.18.2"
58-
pep8-naming = "^0.13.3"
59-
60-
# Type checking
61-
mypy = "^1.5.0"
62-
types-PyYAML = "^6.0.12"
63-
types-requests = "^2.31.0"
64-
types-python-dateutil = "^2.8.19"
65-
66-
# Testing
67-
pytest = "^7.4.0"
68-
pytest-asyncio = "^0.21.1"
69-
pytest-cov = "^4.1.0"
70-
pytest-mock = "^3.11.1"
71-
pytest-aiohttp = "^1.0.5"
72-
pytest-xdist = "^3.3.1"
73-
coverage = {extras = ["toml"], version = "^7.3.0"}
74-
75-
# Documentation
76-
sphinx = "^7.0.1"
77-
sphinx-rtd-theme = "^1.2.2"
78-
sphinx-autodoc-typehints = "^1.23.0"
79-
sphinx-copybutton = "^0.5.2"
80-
81-
# Development tools
82-
pre-commit = "^3.3.3"
83-
invoke = "^2.1.2"
84-
bandit = "^1.7.5"
85-
safety = "^2.3.5"
86-
vulture = "^2.7"
87-
88-
# Type stubs
89-
typing-extensions = "^4.6.3"
53+
[build-system]
54+
requires = ["poetry-core>=1.0.0"]
55+
build-backend = "poetry.core.masonry.api"
9056

9157
[tool.poetry.scripts]
9258
dialogchain = "dialogchain.cli:main"
9359

9460
[tool.black]
95-
line-length = 88
96-
target-version = ['py38']
61+
line-length = 120
62+
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
9763
include = '\.pyi?$'
9864

9965
[tool.isort]
10066
profile = "black"
101-
line_length = 88
102-
multi_line_output = 3
103-
include_trailing_comma = true
104-
force_grid_wrap = 0
105-
use_parentheses = true
106-
ensure_newline_before_comments = true
107-
108-
[tool.mypy]
109-
python_version = "3.8"
110-
warn_return_any = true
111-
warn_unused_configs = true
112-
disallow_untyped_defs = true
113-
check_untyped_defs = true
114-
no_implicit_optional = true
115-
strict_optional = true
116-
warn_redundant_casts = true
117-
warn_unused_ignores = true
118-
warn_no_return = true
119-
warn_unreachable = true
120-
121-
[[tool.mypy.overrides]]
122-
module = [
123-
"cv2.*",
124-
"nmap.*",
125-
"grpc.*",
126-
"asyncio_mqtt.*"
127-
]
128-
ignore_missing_imports = true
129-
130-
[[tool.mypy.overrides]]
131-
module = ["tests.*"]
132-
disallow_untyped_defs = false
67+
line_length = 120
13368

13469
[tool.pytest.ini_options]
13570
testpaths = ["tests"]
13671
python_files = ["test_*.py"]
137-
python_classes = ["Test*"]
13872
python_functions = ["test_*"]
139-
addopts = "-v --cov=src/dialogchain --cov-report=term-missing --cov-report=xml"
140-
asyncio_mode = "auto"
73+
python_classes = ["Test*"]
74+
pythonpath = ["src"]
75+
addopts = "-v --cov=dialogchain --cov-report=term-missing"
14176

14277
[tool.coverage.run]
143-
source = ["src/dialogchain"]
144-
omit = ["tests/*", "*/tests/*"]
78+
source = ["dialogchain"]
79+
omit = ["tests/*"]
14580

14681
[tool.coverage.report]
147-
show_missing = true
14882
fail_under = 80
83+
show_missing = true
14984
exclude_lines = [
15085
"pragma: no cover",
15186
"def __repr__",
15287
"if self.debug:",
15388
"if settings.DEBUG",
154-
"raise AssertionError",
89+
"raise ImportError",
15590
"raise NotImplementedError",
91+
"raise Exception",
15692
"if 0:",
157-
"if __name__ == .__main__.:"
158-
]
93+
"if __name__ == .__main__.:",
94+
]

0 commit comments

Comments
 (0)