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.
This commit is contained in:
parent
4d1b3092f8
commit
12c78ea8cb
3 changed files with 31 additions and 10 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "otko"
|
name = "otko"
|
||||||
version = "0.1.0"
|
dynamic = ["version"]
|
||||||
description = "OTKO — a modern, SAP2000-style desktop GUI for OpenSeesPy."
|
description = "OTKO — a modern, SAP2000-style desktop GUI for OpenSeesPy."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
|
|
@ -42,10 +42,6 @@ gui = [
|
||||||
"vtk>=9.3",
|
"vtk>=9.3",
|
||||||
"pyqtgraph>=0.13",
|
"pyqtgraph>=0.13",
|
||||||
"imageio[ffmpeg]>=2.34",
|
"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 = [
|
dev = [
|
||||||
"pytest>=7.4",
|
"pytest>=7.4",
|
||||||
|
|
@ -55,6 +51,7 @@ dev = [
|
||||||
"mypy>=1.8",
|
"mypy>=1.8",
|
||||||
"pre-commit>=3.6",
|
"pre-commit>=3.6",
|
||||||
"hatch>=1.9",
|
"hatch>=1.9",
|
||||||
|
"tomli>=2.0; python_version < '3.11'",
|
||||||
]
|
]
|
||||||
docs = [
|
docs = [
|
||||||
"sphinx>=7.2",
|
"sphinx>=7.2",
|
||||||
|
|
@ -72,6 +69,9 @@ Issues = "https://github.com/ogunc/otko/issues"
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["src/otko"]
|
packages = ["src/otko"]
|
||||||
|
|
||||||
|
[tool.hatch.version]
|
||||||
|
path = "src/otko/_const.py"
|
||||||
|
|
||||||
# ─────────── Ruff ───────────
|
# ─────────── Ruff ───────────
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 100
|
line-length = 100
|
||||||
|
|
@ -97,12 +97,13 @@ quote-style = "double"
|
||||||
# ─────────── Mypy ───────────
|
# ─────────── Mypy ───────────
|
||||||
[tool.mypy]
|
[tool.mypy]
|
||||||
python_version = "3.10"
|
python_version = "3.10"
|
||||||
strict = true
|
warn_unused_configs = true
|
||||||
warn_unused_ignores = true
|
|
||||||
warn_return_any = true
|
|
||||||
disallow_untyped_defs = true
|
|
||||||
plugins = []
|
plugins = []
|
||||||
|
|
||||||
|
[[tool.mypy.overrides]]
|
||||||
|
module = ["otko.core.*", "otko.services.*", "otko.viewmodels.*"]
|
||||||
|
strict = true
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
[[tool.mypy.overrides]]
|
||||||
module = ["openseespy.*", "pyvista.*", "pyvistaqt.*", "vtk.*", "pyqtgraph.*"]
|
module = ["openseespy.*", "pyvista.*", "pyvistaqt.*", "vtk.*", "pyqtgraph.*"]
|
||||||
ignore_missing_imports = true
|
ignore_missing_imports = true
|
||||||
|
|
@ -121,3 +122,8 @@ markers = [
|
||||||
branch = true
|
branch = true
|
||||||
source = ["src/otko"]
|
source = ["src/otko"]
|
||||||
omit = ["src/otko/views/*"] # GUI excluded from coverage targets
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
"""OTKO — a desktop GUI for OpenSeesPy."""
|
"""OTKO — a desktop GUI for OpenSeesPy."""
|
||||||
|
|
||||||
__version__ = "0.1.0"
|
from otko._const import __version__
|
||||||
|
|
||||||
|
__all__ = ["__version__"]
|
||||||
|
|
|
||||||
13
src/otko/_const.py
Normal file
13
src/otko/_const.py
Normal 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"
|
||||||
Loading…
Reference in a new issue