From 4832560e3c947ba5acbe7d2bfe035ea19e809246 Mon Sep 17 00:00:00 2001 From: Canicula98 Date: Fri, 21 Jun 2024 09:39:56 +0200 Subject: [PATCH] release version 4.0.0 --- CHANGES.rst | 5 +++++ src/dataclay/__init__.py | 2 +- src/dataclay/client/api.py | 2 +- src/dataclay/config.py | 11 ++++++++--- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 16dc2c6d..c3b96f0f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +Version 4.0.0 +------------- + +Released 2024-06-21 + Version 3.1.0 ------------- diff --git a/src/dataclay/__init__.py b/src/dataclay/__init__.py index 6944a0d1..31509525 100644 --- a/src/dataclay/__init__.py +++ b/src/dataclay/__init__.py @@ -9,5 +9,5 @@ StorageObject = DataClayObject -__version__ = "3.1.1.dev" +__version__ = "4.0.0" __all__ = ["Client", "DataClayObject", "AlienDataClayObject", "activemethod", "StorageObject"] diff --git a/src/dataclay/client/api.py b/src/dataclay/client/api.py index 4d812369..8ddcdf4b 100644 --- a/src/dataclay/client/api.py +++ b/src/dataclay/client/api.py @@ -261,7 +261,7 @@ async def __aexit__(self, *excinfo): @tracer.start_as_current_span("get_backends") def get_backends(self) -> dict[UUID, BackendClient]: """Get all backends available in the system. - + This method connects to the metadata service and retrieves an up-to-date list of backends. """ diff --git a/src/dataclay/config.py b/src/dataclay/config.py index 9d6c62c6..29fdbe04 100644 --- a/src/dataclay/config.py +++ b/src/dataclay/config.py @@ -23,10 +23,11 @@ class BackendSettings(BaseSettings): """These settings are exclusive to the Backend service. - + The configuration fields can be established through environment variables with the prefix ``DATACLAY_BACKEND_``. For example, to set the :attr:`host` field, you can set the environment variable ``DATACLAY_BACKEND_HOST``. """ + model_config = SettingsConfigDict( env_prefix="dataclay_backend_", env_file=".env", secrets_dir="/run/secrets", extra="ignore" ) @@ -52,6 +53,7 @@ class MetadataSettings(BaseSettings): The configuration fields can be established through environment variables with the prefix ``DATACLAY_METADATA_``. For example, to set the :attr:`host` field, you can set the environment variable ``DATACLAY_METADATA_HOST``. """ + model_config = SettingsConfigDict( env_prefix="dataclay_metadata_", env_file=".env", secrets_dir="/run/secrets", extra="ignore" ) @@ -68,9 +70,10 @@ class MetadataSettings(BaseSettings): class ProxySettings(BaseSettings): """These settings are exclusive to the Proxy service. - + The configuration fields can be established through environment variables with the prefix ``DATACLAY_PROXY_``. For example, to set the :attr:`mds_host` field, you can set the environment variable ``DATACLAY_PROXY_MDS_HOST``.""" + model_config = SettingsConfigDict( env_prefix="dataclay_proxy_", env_file=".env", secrets_dir="/run/secrets", extra="ignore" ) @@ -90,10 +93,11 @@ class ProxySettings(BaseSettings): class ClientSettings(BaseSettings): """These settings are consumed by the dataClay :class:`~dataclay.client.api.Client`. - + The configuration fields can be established through environment variables with the prefix ``DC_``. For example, to set the :attr:`dataset` field, you can set the environment variable ``DC_DATASET``. """ + model_config = SettingsConfigDict( env_prefix="dc_", env_file=".env", secrets_dir="/run/secrets", extra="ignore" ) @@ -132,6 +136,7 @@ class ClientSettings(BaseSettings): class Settings(BaseSettings): """Global configuration settings for dataClay.""" + model_config = SettingsConfigDict( env_prefix="dataclay_", env_file=".env", secrets_dir="/run/secrets", extra="ignore" )