You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/04/27 20:19:12 UTC

[airavata-django-portal-sdk] branch mft-integration updated (1e4970c -> 296874b)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git.


    from 1e4970c  AIRAVATA-3420 Adding resource id to UserFiles model
     new a5f2d0c  AIRAVATA-3420 Updating docs
     new 296874b  AIRAVATA-3420 Fix flake8 incompatible dependencies

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 airavata_django_portal_sdk/user_storage/api.py | 15 ++++++++++++++-
 docs/index.md                                  | 17 ++++++++++-------
 requirements-dev.txt                           |  1 +
 3 files changed, 25 insertions(+), 8 deletions(-)

[airavata-django-portal-sdk] 02/02: AIRAVATA-3420 Fix flake8 incompatible dependencies

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git

commit 296874bbf2b5af2cfaf14436154faeb69ca15c5c
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Apr 27 16:18:59 2021 -0400

    AIRAVATA-3420 Fix flake8 incompatible dependencies
---
 requirements-dev.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/requirements-dev.txt b/requirements-dev.txt
index 54185b7..1f93a9d 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -5,3 +5,4 @@ flake8==3.8.4
 flake8-isort==4.0.0
 mkdocs==1.1.2
 mkautodoc==0.1.0
+pycodestyle==2.6.0

[airavata-django-portal-sdk] 01/02: AIRAVATA-3420 Updating docs

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch mft-integration
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal-sdk.git

commit a5f2d0c436b57da4e2a195b39a2cc493e4cd6113
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Apr 27 16:09:42 2021 -0400

    AIRAVATA-3420 Updating docs
---
 airavata_django_portal_sdk/user_storage/api.py | 15 ++++++++++++++-
 docs/index.md                                  | 17 ++++++++++-------
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/airavata_django_portal_sdk/user_storage/api.py b/airavata_django_portal_sdk/user_storage/api.py
index 6ca2324..6159084 100644
--- a/airavata_django_portal_sdk/user_storage/api.py
+++ b/airavata_django_portal_sdk/user_storage/api.py
@@ -187,6 +187,7 @@ def move_input_file(request, data_product=None, path=None, data_product_uri=None
 
 
 def get_download_url(request, data_product=None, data_product_uri=None):
+    "Return URL for downloading data product. One of `data_product` or `data_product_uri` is required."
     if data_product is None:
         data_product = _get_data_product(request, data_product_uri)
     storage_resource_id, path = _get_replica_resource_id_and_filepath(data_product)
@@ -525,7 +526,7 @@ def list_experiment_dir(request, experiment_id, path="", storage_resource_id=Non
 
 
 def experiment_dir_exists(request, experiment_id, path="", storage_resource_id=None):
-
+    "Returns True if the path exists in the given experiment's data directory."
     if _is_remote_api():
         resp = _call_remote_api(request,
                                 "/experiment-storage/{experiment_id}/{path}",
@@ -558,6 +559,18 @@ def get_experiment_dir(request, project_name=None, experiment_name=None, path=No
 
 
 def create_user_dir(request, path="", dir_names=(), create_unique=False, storage_resource_id=None):
+    """
+    Creates a directory, and intermediate directories if given, at the given
+    path in the user's storage.  `dir_names` should be either a list or tuple
+    of directories names to create at the given path.  If `create_unique` is
+    True and the given `dir_names` results in an already existing directory,
+    the `dir_names` will be modified (for example, random suffix added) until
+    it results in a name for a directory that doesn't exist and that
+    directory will get created.  If `create_unique` is False (the default)
+    and the directory already exists, no directory will be created, but the
+    directory resource information will be returned.  Returns a tuple of the
+    storage_resource_id and resource_path of the directory resource.
+    """
     if _is_remote_api():
         logger.debug(f"path={path}")
         _call_remote_api(request,
diff --git a/docs/index.md b/docs/index.md
index 0e1dd00..772b268 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -6,11 +6,6 @@ custom Django app extensions to the
 
 ## API Documentation
 
-### module urls
-
-::: airavata_django_portal_sdk.urls.get_download_url
-    :docstring:
-
 ### module user_storage
 
 ::: airavata_django_portal_sdk.user_storage.save
@@ -19,15 +14,23 @@ custom Django app extensions to the
     :docstring:
 ::: airavata_django_portal_sdk.user_storage.open_file
     :docstring:
-::: airavata_django_portal_sdk.user_storage.exists
+::: airavata_django_portal_sdk.user_storage.get_download_url
     :docstring:
-::: airavata_django_portal_sdk.user_storage.delete
+::: airavata_django_portal_sdk.user_storage.exists
     :docstring:
 ::: airavata_django_portal_sdk.user_storage.dir_exists
     :docstring:
+::: airavata_django_portal_sdk.user_storage.user_file_exists
+    :docstring:
+::: airavata_django_portal_sdk.user_storage.delete
+    :docstring:
 ::: airavata_django_portal_sdk.user_storage.delete_dir
     :docstring:
 ::: airavata_django_portal_sdk.user_storage.listdir
     :docstring:
 ::: airavata_django_portal_sdk.user_storage.list_experiment_dir
     :docstring:
+::: airavata_django_portal_sdk.user_storage.experiment_dir_exists
+    :docstring:
+::: airavata_django_portal_sdk.user_storage.create_user_dir
+    :docstring: