Conversation
be97119 to
08f91e2
Compare
17fe956 to
80691c3
Compare
|
The automated tests on conda environments currently fail because of an outdate version of the |
- Among all the Azure storages, Khiops supports only (via its specific driver) "Files" and "Blobs" (Binary Large Objects) - The only supported authentication method is currently the `AZURE_STORAGE_CONNECTION_STRING` embedding the account name and account key
80691c3 to
701678b
Compare
| class AzureStorageResourceMixin: | ||
| """Azure compatible Storage Resource Mixin | ||
|
|
||
| Among all the Azure storages, Khiops supports only (via its specific driver) : |
There was a problem hiding this comment.
Remove the space before :.
| - Files | ||
| - Blobs (Binary Large Objects) | ||
|
|
||
| For shared Files, the URI pattern of a resource is the following : |
There was a problem hiding this comment.
Remove the space before :.
| """ | ||
| Notes: | ||
| by default, the sdk will list all the blobs belonging to the container. | ||
| An extract filter is then required to simulate a directory listing. | ||
| Moreover, the virtual folders hierarchy must be deleted from the result. | ||
| """ |
There was a problem hiding this comment.
I think this should be a code comment not a docstring, because it is an implementation detail.
| """ | ||
| Notes: | ||
| in order to be consistent with the other drivers, | ||
| this method will overwrite the destination blob if it exists. | ||
| This is not the default behavior. | ||
| Moreover, if the virtual folders hierarchy does not exist | ||
| it is created automatically as it is part of the blob name. | ||
| """ |
There was a problem hiding this comment.
I think this should be a code comment not a docstring, because it is an implementation detail.
| """ | ||
| Notes: | ||
| as the virtual folder names are part of the blob name, | ||
| there is no such test like checking a virtual folder existence. | ||
| Only a blob existence is checked here. | ||
| """ |
There was a problem hiding this comment.
Same as below: This is a comment.
| """ | ||
| Notes: | ||
| as the virtual folder names are part of the blob name, | ||
| there is no such action like removing a virtual folder. | ||
| Only a blob removal is done here. | ||
| """ |
There was a problem hiding this comment.
Same as below: This is a comment.
| try: | ||
| os.remove("/tmp/dummy") | ||
| except: # pylint: disable=broad-exception-caught | ||
| pass | ||
| fs.copy_to_local( | ||
| f"{proto}://{bucket_name}/khiops-cicd/samples/{file}", "/tmp/dummy" | ||
| f"{proto}://{bucket_name_or_storage_prefix}/khiops-cicd/" | ||
| f"samples/{file}", | ||
| "/tmp/dummy", | ||
| ) | ||
| # We cannot use `unittest.TestCase.assertTrue` in a class method | ||
| assert os.path.isfile("/tmp/dummy") |
There was a problem hiding this comment.
- I don't get why this new code was added
- If it stays I'd refactor it as:
- Before the loop create
/tmp/khiops-dummy - Save each file to
/tmp/khiops-dummy/{file} - Do not use
assertas it is not a programming error, I think it should be something likeif not os.path.isfile(...): raise RuntimeError - Clean
/tmp/khiops-dummyafterwards
This avoids thetry/exceptwithpassin the middle.
- Before the loop create
| def should_skip_in_a_conda_env(self): | ||
| # The S3 driver is now released for conda too. | ||
| # No need to skip the tests any longer in a conda environment | ||
| return False | ||
|
|
||
| def config_exists(self): |
There was a problem hiding this comment.
I think these elimination should go in a different commit.
| class AzureStorageResourceMixin: | ||
| """Azure compatible Storage Resource Mixin |
There was a problem hiding this comment.
I think all these docs should go in the classes AzureStorage*Resource.
In the docstring of this class they should point to those, or it could be duplicated.
Also I think we should add an URL to a relevant Azure storage page.
AZURE_STORAGE_CONNECTION_STRINGembedding the account name and account keyCompletes #244
TODO Before Asking for a Review
main(ormain-v10)Unreleasedsection ofCHANGELOG.md(no date)index.html