WIP: Feature/config home collection - #52
Conversation
| #' it follows platform conventions (see also [rappdirs::user_config_dir()]). | ||
| #' | ||
| #' @param host URL of host. | ||
| #' @param irods_home Path to the initial working directory. Once the user is authenticated, |
There was a problem hiding this comment.
"initial working directory" -> "initial working collection"
|
|
||
| # reference paths | ||
| all_lpaths <- ils(make_irods_base_path(), recurse = 1) |> | ||
| all_lpaths <- ils(make_irods_base_path(), recurse = 1, limit=NULL) |> |
There was a problem hiding this comment.
Why does ils take a limit? Does ils use the list operation of the /collections endpoint or is it running GenQuery to fetch the results?
The /collections endpoint of the HTTP API will return all entries in a collection.
There was a problem hiding this comment.
I don't know why it takes a limit, to be honest. Indeed it uses the /collections endpoint, therefore the limit is being implemented post-hoc. Personally, I would remove it altogether.
(At most, it could be an argument for the printing method)
There was a problem hiding this comment.
Hmm. Perhaps that code used GenQuery in the past to retrieve the listing?
I can see that being the case if more than the list of logical paths is required. The /collections endpoint only returns the paths. No additional information about the paths is included (e.g. permissions, metadata, etc).
To address issue #51
This PR sets "/zoneName/home" as the starting point for checking whether a path exists and allows the user to customize the starting point when loging in (e.g. "mariana" for /zoneName/home/mariana", or "/zoneName/home/project/input").
ils()now also has the option of not limiting the number of entries. Because it was imposing the "max_number_of_rows_per_catalog_query" of the HTTP API config (but this number was not sent to the API, it was used to truncate the output ofils()), whenils()was called to check the existing paths, it only listed 15 elements (the default value). As a result, any item outside of the first 15 elements was evaluated as not existing and it was not possible to doicd()on it. I would go as far as ignoring the HTTP API config in this case, since the truncating is done post-hoc anyways.Still to do:
stat=TRUEandpermissions=TRUEthat I was finding inils()and still have to investigate further)