Skip to content

Commit d45650f

Browse files
authored
Merge pull request #36 from CESNET/dev
Added flair for tutorial notebooks
2 parents a9b5315 + b006301 commit d45650f

File tree

7 files changed

+16
-14
lines changed

7 files changed

+16
-14
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
[![](https://img.shields.io/badge/license-BSD-blue.svg)](https://github.com/CESNET/cesnet-tszoo/blob/main/LICENSE)
66
[![](https://img.shields.io/badge/docs-cesnet--tszoo-blue.svg)](https://cesnet.github.io/cesnet-tszoo/)
7+
[![](https://img.shields.io/badge/tutorials-cesnet--tszoo-blue.svg)](https://github.com/CESNET/cesnet-ts-zoo-tutorials)
78
[![](https://img.shields.io/badge/python->=3.10-blue.svg)](https://pypi.org/project/cesnet-tszoo/)
89
[![](https://img.shields.io/pypi/v/cesnet-tszoo)](https://pypi.org/project/cesnet-tszoo/)
910

cesnet_tszoo/configs/base_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def __init__(self,
160160
self.test_preprocess_order: list[PreprocessNote] = []
161161
self.all_preprocess_order: list[PreprocessNote] = []
162162
self.is_initialized: bool = False
163-
self.version: str = version.current_version
163+
self.version: str = version.config_and_benchmarks_current_version
164164
self.export_update_needed: bool = False
165165

166166
self.features_to_take: list[str] = features_to_take

cesnet_tszoo/configs/config_updater.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def try_get_updated_config(self) -> DatasetConfig:
3030

3131
self.__validate_whether_config_update_possible_()
3232

33-
if self.config_to_update.version == version.current_version:
33+
if self.config_to_update.version == version.config_and_benchmarks_current_version:
3434
self.updated_config = self.config_to_update
3535
return self.updated_config
3636

@@ -67,8 +67,8 @@ def try_get_updated_config(self) -> DatasetConfig:
6767
self.config_to_update.version = version.VERSION_2_1_0
6868
self.logger.debug("Updating config version to %s used cesnet-tszoo package version.", version.VERSION_2_1_0)
6969

70-
self.logger.debug("Updating config version to %s used cesnet-tszoo package version.", version.current_version)
71-
self.config_to_update.version = version.current_version
70+
self.logger.debug("Updating config version to %s, to match used cesnet-tszoo package config version.", version.config_and_benchmarks_current_version)
71+
self.config_to_update.version = version.config_and_benchmarks_current_version
7272

7373
self.updated_config = self.config_to_update
7474

@@ -143,13 +143,13 @@ def __try_set_default_config_version(self):
143143
self.config_to_update.version = version.DEFAULT_VERSION
144144

145145
def __validate_whether_config_update_possible_(self):
146-
if Version(self.config_to_update.version) < Version(version.current_version):
147-
self.logger.warning("Imported config was made for cesnet-tszoo package of version '%s', but current used cesnet-tszoo package version is '%s'!", self.config_to_update.version, version.current_version)
146+
if Version(self.config_to_update.version) < Version(version.config_and_benchmarks_current_version):
147+
self.logger.warning("Imported config was made for cesnet-tszoo configs of version '%s', but current supported cesnet-tszoo config version is '%s'!", self.config_to_update.version, version.config_and_benchmarks_current_version)
148148
self.logger.warning("Will try to update the config. It is recommended to recreate this config or at least export this config alone or through benchmark to create updated config file.")
149-
elif Version(self.config_to_update.version) > Version(version.current_version):
150-
self.logger.error("Imported config was made for cesnet-tszoo package of version '%s', but current used cesnet-tszoo package version is '%s'!", self.config_to_update.version, version.current_version)
149+
elif Version(self.config_to_update.version) > Version(version.config_and_benchmarks_current_version):
150+
self.logger.error("Imported config was made for cesnet-tszoo configs of version '%s', but current supported cesnet-tszoo config version is '%s'!", self.config_to_update.version, version.config_and_benchmarks_current_version)
151151
self.logger.error("Update cesnet-tszoo package to use this config.")
152-
raise ValueError(f"Imported config was made for cesnet-tszoo package of version '{self.config_to_update.version}', but current used cesnet-tszoo package version is '{version.current_version}'!")
152+
raise ValueError(f"Imported config was made for cesnet-tszoo configs of version '{self.config_to_update.version}', but current supported cesnet-tszoo config version is '{version.config_and_benchmarks_current_version}'!")
153153

154154
def __scaler_to_transformer_version_update(self):
155155
self.logger.debug("Updating attributes from scaler variant to transformer variant.")

cesnet_tszoo/datasets/cesnet_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1576,7 +1576,7 @@ def save_benchmark(self, identifier: str, force_write: bool = False, **kwargs) -
15761576
annotations_time_name,
15771577
annotations_both_name,
15781578
related_results_identifier=self.related_to,
1579-
version=version.current_version)
1579+
version=version.config_and_benchmarks_current_version)
15801580

15811581
# If the config was not imported, save it
15821582
if self.dataset_config.import_identifier is None or self.dataset_config.export_update_needed:

cesnet_tszoo/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,6 @@ def _update_for_backward_compatibility(cls, data):
119119
del data["is_series_based"]
120120
data["dataset_type"] = None
121121

122-
data["version"] = version.current_version
122+
data["version"] = version.config_and_benchmarks_current_version
123123

124124
return data

cesnet_tszoo/version.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import importlib.metadata
22

3-
current_version = importlib.metadata.version("cesnet-tszoo")
4-
53
VERSION_2_1_0 = "2.1.0"
64
VERSION_2_0_1 = "2.0.1"
75
VERSION_2_0_0 = "2.0.0"
86
VERSION_0_1_3 = "0.1.3"
97
DEFAULT_VERSION = "0.1.2"
8+
9+
current_version = importlib.metadata.version("cesnet-tszoo")
10+
config_and_benchmarks_current_version = VERSION_2_1_0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "cesnet_tszoo"
7-
version = "2.1.0"
7+
version = "2.1.1"
88
authors = [
99
{ name = "Milan Kureš", email = "[email protected]" },
1010
{ name = "Josef Koumar", email = "[email protected]" },

0 commit comments

Comments
 (0)