mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-04 12:07:44 +00:00
refactor: centralize versioning and stabilize PMA validation
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<GitVersionSkip>true</GitVersionSkip>
|
||||
<IlcOptimizationPreference>Speed</IlcOptimizationPreference>
|
||||
<RunAnalyzers>false</RunAnalyzers>
|
||||
<ErrorReport>none</ErrorReport>
|
||||
|
||||
@@ -525,7 +525,6 @@ When pandas is not installed:
|
||||
```xml
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<GitVersionSkip>true</GitVersionSkip>
|
||||
<IlcOptimizationPreference>Speed</IlcOptimizationPreference>
|
||||
<RunAnalyzers>false</RunAnalyzers>
|
||||
<ErrorReport>none</ErrorReport>
|
||||
|
||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "quantalib"
|
||||
version = "0.1.0"
|
||||
dynamic = ["version"]
|
||||
description = "High-performance technical analysis wrappers over QuanTAlib NativeAOT"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
@@ -23,6 +23,11 @@ filterwarnings = [
|
||||
"ignore::pandas.errors.Pandas4Warning",
|
||||
]
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "regex"
|
||||
path = "../lib/VERSION"
|
||||
pattern = "(?P<version>\\d+\\.\\d+\\.\\d+)"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["quantalib"]
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ Usage::
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from ._loader import load_native_library
|
||||
from . import indicators
|
||||
from .indicators import * # noqa: F401, F403 — re-export all indicator functions
|
||||
@@ -32,4 +34,13 @@ __all__ = [
|
||||
"QtlInvalidParamError",
|
||||
"QtlInternalError",
|
||||
]
|
||||
__version__ = "0.1.0"
|
||||
def _resolve_version() -> str:
|
||||
version_file = Path(__file__).resolve().parents[2] / "lib" / "VERSION"
|
||||
if version_file.exists():
|
||||
version = version_file.read_text(encoding="utf-8").strip()
|
||||
if version:
|
||||
return version
|
||||
return "0.0.0"
|
||||
|
||||
|
||||
__version__ = _resolve_version()
|
||||
|
||||
Reference in New Issue
Block a user