File tree 3 files changed +35
-1
lines changed
3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ build-backend = "setuptools.build_meta"
5
5
[project ]
6
6
name = " torax"
7
7
description = " Differentiable 1D tokamak plasma transport simulator in JAX."
8
- version = " 0.3.1"
9
8
readme = " README.md"
10
9
requires-python = " >=3.10"
11
10
license = {file = " LICENSE" }
@@ -42,6 +41,9 @@ dependencies = [
42
41
" treelib>=1.3.2" ,
43
42
]
44
43
44
+ # `version` is automatically set to use the `torax.__version__`
45
+ dynamic = [" version" ]
46
+
45
47
[project .urls ]
46
48
homepage = " https://github.com/google-deepmind/torax"
47
49
repository = " https://github.com/google-deepmind/torax"
Original file line number Diff line number Diff line change 19
19
20
20
# pylint: disable=g-importing-member
21
21
22
+ from torax import version
22
23
from torax .config .config_loader import import_module
23
24
from torax .interpolated_param import InterpolatedVarSingleAxis
24
25
from torax .interpolated_param import InterpolatedVarTimeRho
29
30
30
31
# pylint: enable=g-importing-member
31
32
33
+ __version__ = version .TORAX_VERSION
34
+ __version_info__ = version .TORAX_VERSION_INFO
32
35
33
36
__all__ = [
34
37
'import_module' ,
Original file line number Diff line number Diff line change
1
+ # Copyright 2024 DeepMind Technologies Limited
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ """Torax version information."""
15
+
16
+ from typing import Final
17
+
18
+ # b/404741308: This is currently a closest tag that could be made more
19
+ # fine-grained in the future, eg. based on an actual commit.
20
+ TORAX_VERSION : Final [str ] = "0.3.1"
21
+
22
+
23
+ def _version_as_tuple (version_str : str ) -> tuple [int , int , int ]:
24
+ return tuple (int (i ) for i in version_str .split ("." ) if i .isdigit ())
25
+
26
+
27
+ TORAX_VERSION_INFO : Final [tuple [int , int , int ]] = _version_as_tuple (
28
+ TORAX_VERSION
29
+ )
You can’t perform that action at this time.
0 commit comments