From 0cfbe8a5a5a75a8708cfe9c9a5cdd9a25d1625b5 Mon Sep 17 00:00:00 2001 From: "RIO\\teodora.misan" Date: Tue, 10 Sep 2024 15:09:49 +0300 Subject: [PATCH] EBR-91: clean up --- .github/workflows/build.yml | 2 -- tvbextunicore/_version.py | 32 -------------------------------- 2 files changed, 34 deletions(-) delete mode 100644 tvbextunicore/_version.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bec3fe3..c9144de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,8 +56,6 @@ jobs: jupyter labextension list 2>&1 | grep -ie "tvb-ext-unicore.*OK" python -m jupyterlab.browser_check - check-manifest -v - pip install build python -m build --sdist cp dist/*.tar.gz myextension.tar.gz diff --git a/tvbextunicore/_version.py b/tvbextunicore/_version.py deleted file mode 100644 index 27d9a6c..0000000 --- a/tvbextunicore/_version.py +++ /dev/null @@ -1,32 +0,0 @@ -# -*- coding: utf-8 -*- -# -# "TheVirtualBrain - Widgets" package -# -# (c) 2022-2024, TVB Widgets Team -# - -import json -from pathlib import Path - -__all__ = ["__version__"] - - -def _fetch_version(): - here = Path(__file__).parent.resolve() - - for settings in here.rglob("package.json"): - try: - with settings.open() as f: - version = json.load(f)["version"] - return ( - version.replace("-alpha.", "a") - .replace("-beta.", "b") - .replace("-rc.", "rc") - ) - except FileNotFoundError: - pass - - raise FileNotFoundError(f"Could not find package.json under dir {here!s}") - - -__version__ = _fetch_version()