Skip to content

WIP: Feature/config home collection - #52

Draft
montesmariana wants to merge 8 commits into
irods:mainfrom
kuleuven:feature/config_home_collection
Draft

WIP: Feature/config home collection#52
montesmariana wants to merge 8 commits into
irods:mainfrom
kuleuven:feature/config_home_collection

Conversation

@montesmariana

Copy link
Copy Markdown
Collaborator

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 of ils()), when ils() 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 do icd() 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:

  • Adapt tests
  • Fix other bugs (issues with stat=TRUE and permissions=TRUE that I was finding in ils() and still have to investigate further)

@montesmariana
montesmariana marked this pull request as draft July 2, 2024 10:23
Comment thread R/create-irods.R Outdated
#' 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,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"initial working directory" -> "initial working collection"

Comment thread R/irods-path.R

# reference paths
all_lpaths <- ils(make_irods_base_path(), recurse = 1) |>
all_lpaths <- ils(make_irods_base_path(), recurse = 1, limit=NULL) |>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants