Skip to content

Commit c3bc0ab

Browse files
committed
up and running
1 parent ddd8758 commit c3bc0ab

29 files changed

Lines changed: 4792 additions & 334 deletions

MANIFEST.in

Lines changed: 0 additions & 12 deletions
This file was deleted.

Makefile

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,25 @@ clean-test: ## remove test and coverage artifacts
4848
rm -fr .pytest_cache
4949

5050
lint/flake8: ## check style with flake8
51-
flake8 tuttle tests
51+
uv run flake8 tuttle tests
5252
lint/black: ## check style with black
53-
black --check tuttle tests
53+
uv run black --check tuttle tests
5454

5555
lint: lint/flake8 lint/black ## check style
5656

5757
test: ## run tests quickly with the default Python
58-
pytest
59-
60-
test-all: ## run tests on every Python version with tox
61-
tox
58+
uv run pytest
6259

6360
coverage: ## check code coverage quickly with the default Python
64-
coverage run --source tuttle -m pytest
65-
coverage report -m
66-
coverage html
61+
uv run coverage run --source tuttle -m pytest
62+
uv run coverage report -m
63+
uv run coverage html
6764
$(BROWSER) htmlcov/index.html
6865

6966
docs: ## generate Sphinx HTML documentation, including API docs
7067
rm -f docs/tuttle.rst
7168
rm -f docs/modules.rst
72-
sphinx-apidoc -o docs/ tuttle
69+
uv run sphinx-apidoc -o docs/ tuttle
7370
$(MAKE) -C docs clean
7471
$(MAKE) -C docs html
7572
$(BROWSER) docs/_build/html/index.html
@@ -78,12 +75,14 @@ servedocs: docs ## compile the docs watching for changes
7875
watchmedo shell-command -p '*.rst' -c '$(MAKE) -C docs html' -R -D .
7976

8077
release: dist ## package and upload a release
81-
twine upload dist/*
78+
uv run twine upload dist/*
8279

8380
dist: clean ## builds source and wheel package
84-
python setup.py sdist
85-
python setup.py bdist_wheel
81+
uv build
8682
ls -l dist
8783

88-
install: clean ## install the package to the active Python's site-packages
89-
python setup.py install
84+
install: ## install the package with uv
85+
uv sync
86+
87+
install-dev: ## install the package with dev dependencies
88+
uv sync --all-groups

app.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ def __init__(
8080
else THEME_MODES.dark.value
8181
)
8282
self.page.theme_mode = theme
83-
self.page.window_min_width = MIN_WINDOW_WIDTH
84-
self.page.window_min_height = MIN_WINDOW_HEIGHT
85-
self.page.window_width = MIN_WINDOW_HEIGHT * 3
86-
self.page.window_height = MIN_WINDOW_HEIGHT * 2
83+
self.page.window.min_width = MIN_WINDOW_WIDTH
84+
self.page.window.min_height = MIN_WINDOW_HEIGHT
85+
self.page.window.width = MIN_WINDOW_HEIGHT * 3
86+
self.page.window.height = MIN_WINDOW_HEIGHT * 2
8787
self.file_picker = FilePicker()
8888
self.page.overlay.append(self.file_picker)
8989

@@ -94,12 +94,12 @@ def __init__(
9494
self.page.on_view_pop = self.on_view_pop
9595
self.route_parser = TuttleRoutes(self)
9696
self.current_route_view: Optional[RouteView] = None
97-
self.page.on_resize = self.page_resize
97+
self.page.on_resized = self.page_resize
9898

9999
def page_resize(self, e):
100100
if self.current_route_view:
101101
self.current_route_view.on_window_resized(
102-
self.page.window_width, self.page.window_height
102+
self.page.window.width, self.page.window.height
103103
)
104104

105105
def pick_file_callback(
@@ -118,7 +118,6 @@ def pick_file_callback(
118118
file_type=file_type,
119119
)
120120

121-
122121
def on_theme_mode_changed(self, selected_theme: str):
123122
"""callback function used by views for changing app theme mode"""
124123
mode = get_theme_mode_from_value(selected_theme)
@@ -224,7 +223,7 @@ def on_route_change(self, route):
224223
self.current_route_view: RouteView = self.route_to_route_view_cache[route.route]
225224
self.page.update()
226225
self.current_route_view.on_window_resized(
227-
self.page.window_width, self.page.window_height
226+
self.page.window.width, self.page.window.height
228227
)
229228

230229
def store_demo_timetracking_dataframe(self, time_tracking_data: DataFrame):
@@ -239,7 +238,7 @@ def build(self):
239238

240239
def close(self):
241240
"""Closes the application."""
242-
self.page.window_close()
241+
self.page.window.close()
243242

244243
def reset_and_quit(self):
245244
"""Resets the application and quits."""

fix_controls.py

Whitespace-only changes.

pyproject.toml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
[project]
2+
name = "tuttle"
3+
version = "1.1.1"
4+
description = "Painless business planning for freelancers."
5+
readme = "README.md"
6+
license = "GPL-3.0-only"
7+
requires-python = ">=3.10"
8+
authors = [
9+
{ name = "Christian Staudt", email = "mail@clstaudt.me" },
10+
{ name = "Vladimir Peter" },
11+
]
12+
keywords = ["tuttle"]
13+
classifiers = [
14+
"Development Status :: 2 - Pre-Alpha",
15+
"Intended Audience :: Developers",
16+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
17+
"Natural Language :: English",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
23+
]
24+
25+
dependencies = [
26+
"pytest",
27+
"pandas",
28+
"matplotlib",
29+
"altair",
30+
"pydantic",
31+
"sqlmodel",
32+
"ics",
33+
"tatsu<5.8",
34+
"babel",
35+
"loguru",
36+
"pandera",
37+
"weasyprint",
38+
"faker",
39+
"PyPDF2",
40+
"flet>=0.24.0,<0.25.0",
41+
"pycountry",
42+
"icloudpy",
43+
]
44+
45+
[project.urls]
46+
Homepage = "https://github.com/tuttle-dev/tuttle"
47+
Repository = "https://github.com/tuttle-dev/tuttle"
48+
49+
[dependency-groups]
50+
dev = [
51+
"jupyterlab",
52+
"ipywidgets",
53+
"bump2version",
54+
"black",
55+
"nbdime",
56+
"pre-commit",
57+
"pydocstyle",
58+
"isort",
59+
]
60+
build = [
61+
"pyinstaller",
62+
"typer",
63+
]
64+
65+
[build-system]
66+
requires = ["hatchling"]
67+
build-backend = "hatchling.build"
68+
69+
[tool.hatch.build.targets.wheel]
70+
packages = ["tuttle"]
71+
72+
[tool.pytest.ini_options]
73+
collect_ignore = ["setup.py"]
74+
75+
[tool.flake8]
76+
exclude = ["docs"]
77+
78+
[tool.isort]
79+
include_trailing_comma = true
80+
use_parentheses = true
81+
multi_line_output = 1
82+
default_section = "THIRDPARTY"
83+
known_first_party = ["tuttle"]
84+
known_flet = ["flet"]
85+
known_typing = ["typing"]
86+
sections = ["FUTURE", "TYPING", "STDLIB", "FLET", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
87+
88+
[tool.bumpversion]
89+
current_version = "1.1.1"
90+
commit = true
91+
tag = true
92+
93+
[[tool.bumpversion.files]]
94+
filename = "pyproject.toml"
95+
search = 'version = "{current_version}"'
96+
replace = 'version = "{new_version}"'
97+
98+
[[tool.bumpversion.files]]
99+
filename = "tuttle/__init__.py"
100+
search = '__version__ = "{current_version}"'
101+
replace = '__version__ = "{new_version}"'

requirements.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

requirements_build.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements_dev.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 35 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)