Conversation
be97119 to
08f91e2
Compare
17fe956 to
80691c3
Compare
|
The automated tests on conda environments currently fail because of an outdate version of the |
80691c3 to
701678b
Compare
| 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
There was a problem hiding this comment.
During the development phase when fs.copy_to_local was an empty method, the test would pass even if the file download was not successful. This part had to be improved to assess the file is correctly downloaded (without any error and with the local file creation).
Following your suggestions I improved a little bit the snippet
| 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.
- 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
701678b to
19aa231
Compare
folmos-at-orange
left a comment
There was a problem hiding this comment.
I think this is an opportunity to have better docs on file system.
Currently, very little is documented, and we now have 3 different remote systems of which only one (S3) is well documented.
I'd a section for each remote system in the module's docstring. Each section contains how to configure it in each case, and a URI example.
|
|
||
|
|
||
| class AzureStorageResourceMixin: | ||
| """Azure compatible Storage Resource Mixin""" |
There was a problem hiding this comment.
I'd add in the body, See `AzureStorageFileResource` and `AzureBlobResource` for more details.
| """ | ||
| Check if the target resource exists (file or directory) | ||
| """ |
There was a problem hiding this comment.
Move this to the first docstring line to keep the codebase style.
|
|
||
| def remove(self): | ||
| """ | ||
| Remove the target resource either it is a file or a directory. |
There was a problem hiding this comment.
Move this to the first docstring line to keep the codebase style.
|
|
||
| def list_dir(self): | ||
| """ | ||
| List the files of the current directory |
There was a problem hiding this comment.
Move this to the first docstring line to keep the codebase style.
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