From f324c36f2885794a21e5da375cd03d748df0e714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Thu, 1 Aug 2024 07:47:14 +0100 Subject: [PATCH] Add version to the package (#124) * Add version to the package * Play better with the configuration --- egi_notebooks_hub/__init__.py | 7 +++++++ egi_notebooks_hub/egiauthenticator.py | 6 ++++-- requirements.txt | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/egi_notebooks_hub/__init__.py b/egi_notebooks_hub/__init__.py index e69de29..30f6203 100644 --- a/egi_notebooks_hub/__init__.py +++ b/egi_notebooks_hub/__init__.py @@ -0,0 +1,7 @@ +__all__ = ("__version__", "version_info") + +from pbr.version import VersionInfo + +_v = VersionInfo("egi_notebooks_hub").semantic_version() +__version__ = _v.release_string() +version_info = _v.version_tuple() diff --git a/egi_notebooks_hub/egiauthenticator.py b/egi_notebooks_hub/egiauthenticator.py index 8466849..0708040 100644 --- a/egi_notebooks_hub/egiauthenticator.py +++ b/egi_notebooks_hub/egiauthenticator.py @@ -221,8 +221,10 @@ def _validate_scope(self, proposal): too long. """, ) - # reasonable defaults for Check-in - manage_groups = True + + @default("manage_groups") + def _manage_groups_default(self): + return True async def jwt_authenticate(self, handler, data=None): try: diff --git a/requirements.txt b/requirements.txt index 04449a6..3b01606 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ jupyterhub-kubespawner>=6.1.0 xmltodict fastapi pydantic-settings +pbr