chore/adopt-local-tree #4

Merged
smill merged 13 commits from chore/adopt-local-tree into main 2026-09-16 15:48:16 -04:00
3 changed files with 31 additions and 10 deletions
Showing only changes of commit 12c78ea8cb - Show all commits

build: read version from _const.py, drop phantom scipy/pandas deps

Single source of truth for the package + pinned solver versions in
src/otko/_const.py (hatch dynamic version). scipy/pandas were listed in
[gui] but never imported. mypy strict mode rescoped to
core/services/viewmodels; tomli added for tomllib-less Pythons.
smillmorel 2026-09-16 12:02:47 -04:00

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "otko"
version = "0.1.0"
dynamic = ["version"]
description = "OTKO — a modern, SAP2000-style desktop GUI for OpenSeesPy."
readme = "README.md"
requires-python = ">=3.10"
@ -42,10 +42,6 @@ gui = [
"vtk>=9.3",
"pyqtgraph>=0.13",
"imageio[ffmpeg]>=2.34",
# scipy and pandas are listed for forward-compatibility; they are not
# currently imported by any module in this repo (phantom deps as of 2026-06-15).
"scipy>=1.11",
"pandas>=2.1",
]
dev = [
"pytest>=7.4",
@ -55,6 +51,7 @@ dev = [
"mypy>=1.8",
"pre-commit>=3.6",
"hatch>=1.9",
"tomli>=2.0; python_version < '3.11'",
]
docs = [
"sphinx>=7.2",
@ -72,6 +69,9 @@ Issues = "https://github.com/ogunc/otko/issues"
[tool.hatch.build.targets.wheel]
packages = ["src/otko"]
[tool.hatch.version]
path = "src/otko/_const.py"
# ─────────── Ruff ───────────
[tool.ruff]
line-length = 100
@ -97,12 +97,13 @@ quote-style = "double"
# ─────────── Mypy ───────────
[tool.mypy]
python_version = "3.10"
strict = true
warn_unused_ignores = true
warn_return_any = true
disallow_untyped_defs = true
warn_unused_configs = true
plugins = []
[[tool.mypy.overrides]]
module = ["otko.core.*", "otko.services.*", "otko.viewmodels.*"]
strict = true
[[tool.mypy.overrides]]
module = ["openseespy.*", "pyvista.*", "pyvistaqt.*", "vtk.*", "pyqtgraph.*"]
ignore_missing_imports = true
@ -121,3 +122,8 @@ markers = [
branch = true
source = ["src/otko"]
omit = ["src/otko/views/*"] # GUI excluded from coverage targets
[tool.coverage.report]
exclude_lines = ["if TYPE_CHECKING:", "raise NotImplementedError"]
# Conservative floor for the headless suite; raise deliberately with evidence.
fail_under = 50

View file

@ -1,3 +1,5 @@
"""OTKO — a desktop GUI for OpenSeesPy."""
__version__ = "0.1.0"
from otko._const import __version__
__all__ = ["__version__"]

13
src/otko/_const.py Normal file
View file

@ -0,0 +1,13 @@
# Ported from otko-development (MIT), (c) 2026 OTKO contributors
"""Single source of truth for OTKO's version and the pinned solver version.
Defines the package version and the pinned OpenseesPy version exactly once
so neither is duplicated as a literal anywhere else in the source.
"""
from __future__ import annotations
__version__ = "0.1.0"
#: Pinned OpenseesPy version the application targets.
OPENSEESPY_VERSION = "3.8.0.0"