Use dynamic versioning and bump version (#320)

⚠️ Must be merged after #319 and other related PRs.

*Issue #, if available:*

*Description of changes:* Exports `chronos.__version__` and uses it
dynamically in `pyproject.toml`. Bumps version to 2.0.0.


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
This commit is contained in:
Abdul Fatir 2025-10-20 12:04:04 +02:00 committed by GitHub
parent 3d08338f37
commit 48cdf1f7f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,6 @@
[project]
name = "chronos-forecasting"
version = "1.5.3"
dynamic = ["version"]
authors = [
{ name = "Abdul Fatir Ansari", email = "ansarnd@amazon.com" },
{ name = "Lorenzo Stella", email = "stellalo@amazon.com" },
@ -36,6 +36,9 @@ build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/chronos"]
[tool.hatch.version]
path = "src/chronos/__about__.py"
[project.optional-dependencies]
test = ["pytest~=8.0", "numpy>=1.21,<3", "fev>=0.6.1", "pandas>=2.0,<2.4"]
typecheck = ["mypy~=1.9"]

1
src/chronos/__about__.py Normal file
View file

@ -0,0 +1 @@
__version__ = "2.0.0rc1"

View file

@ -1,6 +1,7 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from .__about__ import __version__
from .base import BaseChronosPipeline, ForecastType
from .chronos import (
ChronosConfig,
@ -13,6 +14,7 @@ from .chronos2 import Chronos2ForecastingConfig, Chronos2Model, Chronos2Pipeline
from .chronos_bolt import ChronosBoltConfig, ChronosBoltPipeline
__all__ = [
"__version__",
"BaseChronosPipeline",
"ForecastType",
"ChronosConfig",