From 29a8aa136d463243cbad2d10c2bc808c84e911c3 Mon Sep 17 00:00:00 2001 From: Alfredo Oliviero Date: Sun, 3 Nov 2024 09:50:34 +0100 Subject: [PATCH] fix setup --- README.md | 38 ++++++++++++++++++++++++-------------- setupy.py => setup.py | 4 ++-- 2 files changed, 26 insertions(+), 16 deletions(-) rename setupy.py => setup.py (84%) diff --git a/README.md b/README.md index b682ecd..ae6cb01 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ -# d4science_auth_cds +# d4science_copernicus_cds -**d4science_auth_cds** is a library developed by CNR-ISTI to manage Climate Data Store (CDS) API authentication within D4Science JupyterLab environments. It simplifies credential handling, allowing for secure, reusable access to the CDS API across multiple notebooks. +**d4science_copernicus_cds** is a library developed by CNR-ISTI to manage Climate Data Store (CDS) API authentication within D4Science JupyterLab environments. It simplifies credential handling, allowing for secure, reusable access to the CDS API across multiple notebooks. + +## Version + +v.1.0.0 ## Installation Install the library directly from the D4Science Git ``` -pip install git+https://code-repo.d4science.org/D4Science/d4science_auth_cds.git +pip install git+https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git ``` ## Built With @@ -27,25 +31,24 @@ Below are the main commands provided by the auth_cds library to manage CDS API a First, import the necessary functions: -```python from auth_cds import cds_authenticate, cds_remove_conf, cds_save_conf, cds_remove_env, cds_show_conf ``` +```python +from auth_cds import cds_authenticate, cds_remove_conf, cds_save_conf, cds_remove_env, cds_show_conf +``` Main Commands Authenticate and get CDS client: This command authenticates and returns a CDS API client instance. -```python client = cds_authenticate() ``` - -Remove configurations from default paths: -Removes any saved configuration files. To execute, remove the comment symbol (#). - ```python -cds_remove_conf() +client = cds_authenticate() ``` Save the current or new configuration: Saves the configuration to a default hidden file. -```python cds_save_conf() ``` +```python +cds_save_conf() +``` Remove environment variables for the CDS API: Clears the CDS API credentials from environment variables. To execute, remove the comment symbol (#). @@ -54,12 +57,19 @@ Clears the CDS API credentials from environment variables. To execute, remove th cds_remove_env() ``` +Remove configurations from default paths: +Removes any saved configuration files. To execute, remove the comment symbol (#). + +```python +cds_remove_conf() +``` + Show current configuration from environment and files: Displays the credentials configured in the environment and any found in the saved configuration file. -```python cds_show_conf() ``` - - +```python +cds_show_conf() +``` ## Change log diff --git a/setupy.py b/setup.py similarity index 84% rename from setupy.py rename to setup.py index ed4c019..400210b 100644 --- a/setupy.py +++ b/setup.py @@ -1,14 +1,14 @@ from setuptools import setup, find_packages setup( - name="d4science_auth_cds", + name="d4science_copernicus_cds", version="1.0.0", description="A D4Science library for managing CDS API authentication in JupyterLab", long_description=open("README.md").read(), long_description_content_type="text/markdown", author="Alfredo Oliviero", author_email="alfredo.oliviero@isti.cnr.it", - url="https://code-repo.d4science.org/D4Science/d4science_auth_cds.git", + url="https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git", packages=find_packages(), install_requires=[ "cdsapi>=0.7.2",