From f247c4a3f35b73e78089f674ab1833e0dd2c7f52 Mon Sep 17 00:00:00 2001 From: Guillaume Prevost Date: Tue, 31 Oct 2023 11:55:12 +0100 Subject: [PATCH] Correct version number compatibility --- README.md | 75 +------------------------------ docs/README.rst | 115 ------------------------------------------------ docs/index.rst | 1 + 3 files changed, 2 insertions(+), 189 deletions(-) delete mode 100644 docs/README.rst diff --git a/README.md b/README.md index 640ab4ef..e53250f0 100644 --- a/README.md +++ b/README.md @@ -40,80 +40,7 @@ pip install saagieapi== | >= 2023.01 | >= 2.4.0 | | >= 2023.02 | >= 2.6.0 | | >= 2023.03 | >= 2.7.0 | - -## Usage - -All the implemented features are documented in the [Wiki](https://github.com/saagie/api-saagie/wiki) - -Here's a full example of how to use the API: - -```python -from saagieapi import SaagieApi - -saagie = SaagieApi(url_saagie="", - id_platform="1", - user="", - password="", - realm="saagie") - -# Create a project named 'Project_test' on the saagie platform -project_dict = saagie.projects.create(name="Project_test", - group="", - role='Manager', - description='A test project') - -# Save the project id -project_id = project_dict['createProject']['id'] - -# Create a python job named 'Python test job' inside this project -job_dict = saagie.jobs.create(job_name="Python test job", - project_id=project_id, - file='', - description='Amazing python job', - category='Processing', - technology_catalog='Saagie', - technology='python', - runtime_version='3.8', - command_line='python {file} arg1 arg2', - release_note='', - extra_technology='') - -# Save the job id -job_id = job_dict['data']['createJob']['id'] - -# Run the python job and wait for its completion -saagie.jobs.run_with_callback(job_id=job_id, freq=10, timeout=-1) - -``` - -### Connecting to your platform - -There are 2 options to connect to your platform : - -1. using the default constructor: - - ```python - from saagieapi import * - saagie = SaagieApi(url_saagie="", - id_platform="1", - user="", - password="", - realm="saagie") - ``` - -2. Using the `easy_connect` alternative constructor which uses the complete URL (eg: - ) and will - parse it in order to retrieve the platform URL, platform id and the realm. - - ```python - from saagieapi import * - saagie = SaagieApi.easy_connect(url_saagie_platform="", - user="", - password="") - ``` - -If you want to know how to find the correct values for the URL, platform id and the realm, -please refer to the [Wiki](https://github.com/saagie/api-saagie/wiki#connecting-to-your-platform). +| >= 2023.04 | >= 2.9.0 | ## Contributing diff --git a/docs/README.rst b/docs/README.rst deleted file mode 100644 index 4faf5973..00000000 --- a/docs/README.rst +++ /dev/null @@ -1,115 +0,0 @@ -.. raw:: html - -

- -.. raw:: html - -

- -Presentation -============ - -The ``saagieapi`` python package implements python API wrappers to -easily interact with the Saagie platform in python. - -Installing -========== - -.. code:: bash - - pip install saagieapi== - -Compatibility with your Saagie platform ---------------------------------------- - -=========================== ====================== -**Saagie platform version** **saagie-api release** -=========================== ====================== -< 2.2.0 < 0.6.0 ->= 2.2.0 >= 0.6.0 ->= 2023.01 >= 2.4.0 ->= 2023.02 >= 2.6.0 ->= 2023.03 >= 2.7.0 -=========================== ====================== - -Usage -===== - -Connecting to your platform ---------------------------- - -There are 2 options to connect to your platform : - -1. using the default constructor : - -.. code:: python - - saagie = SaagieApi(url_saagie="", - id_platform="1", - user="", - password="", - realm="saagie") - -2. Using the ``easy_connect`` alternative constructor which uses the - complete URL (eg: - https://mysaagie-workspace.prod.saagie.com/projects/platform/6/) and - will parse it in order to retrieve the platform URL, platform id and - the realm. - -.. code:: python - - saagie = SaagieApi.easy_connect(url_saagie_platform="", - user="", - password="") - -Using the different endpoints ------------------------------ - -Once connected with one of the 2 methods explained above, you can now -use the different endpoints to interact with : - projects : -``saagie.projects.xxx``, see the list of methods available -`here `__ - jobs : ``saagie.jobs.xxx``, see the list -of methods available `here `__ - apps : -``saagie.apps.xxx``, see the list of methods available -`here `__ - pipelines : ``saagie.pipelines.xxx``, see the -list of methods available `here `__ - environment -variables : ``saagie.env_vars.xxx``, see the list of methods available -`here `__ - docker credentials : -``saagie.docker_credentials.xxx``, see the list of methods available -`here `__ - -Finding your platform, project, job and instances ids ------------------------------------------------------ - -Your Saagie projects homepage has the following structure -``https://-workspace.me.saagie.com/projects/platform//`` - - ``https://mysaagie-workspace.me.saagie.com/projects/platform/1/`` - would give : - ``platform_id`` = 1 - ``realm`` = mysaagie - -**Project id** can be found in the project URL after the ``/project`` - - ``https://mysaagie-workspace.me.saagie.com/projects/platform/1/project/8321e13c-892a-4481-8552-5be4b6cc5df4/jobs`` - would give : - ``project_id`` = 8321e13c-892a-4481-8552-5be4b6cc5df4 - -**Job id** can be found in the project URL after the ``/job`` - - ``https://mysaagie-workspace.me.saagie.com/projects/platform/1/project/8321e13c-892a-4481-8552-5be4b6cc5df4/job/a85ac3db-bca1-4f15-b8f7-44731fba874b`` - would give : - ``job_id`` = a85ac3db-bca1-4f15-b8f7-44731fba874b - -**App id** can be found in the project URL after the ``/app`` - - ``https://mysaagie-workspace.me.saagie.com/projects/platform/1/project/8321e13c-892a-4481-8552-5be4b6cc5df4/app/02c01d47-8a29-47d0-a53c-235add43c885`` - would give : - ``app_id`` = 02c01d47-8a29-47d0-a53c-235add43c885 - -**Pipeline id** can be found in the project URL after the ``/pipeline`` - - ``https://mysaagie-workspace.me.saagie.com/projects/platform/1/project/8321e13c-892a-4481-8552-5be4b6cc5df4/pipeline/4da29f25-e7c9-4410-869e-40b9ba0074d1`` - would give : - ``pipeline_id`` = 4da29f25-e7c9-4410-869e-40b9ba0074d1 - -**Job instance id** can be found in the project URL after the -``/instances`` - - ``https://mysaagie-workspace.me.saagie.com/projects/platform/1/project/8321e13c-892a-4481-8552-5be4b6cc5df4/job/a85ac3db-bca1-4f15-b8f7-44731fba874b/instances/6ff448ae-3770-4639-b0f8-079e5c614ab6`` - would give : - ``job_instance_id`` = - 6ff448ae-3770-4639-b0f8-079e5c614ab6 diff --git a/docs/index.rst b/docs/index.rst index f83daeb6..ef362c8e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,6 +23,7 @@ Compatibility with your Saagie platform >= 2023.01 >= 2.4.0 >= 2023.02 >= 2.6.0 >= 2023.03 >= 2.7.0 +>= 2023.04 >= 2.9.0 =========================== ====================== Usage