AtlasOfLivingAustralia / galah-R

Query living atlases from R
https://galah.ala.org.au
40 stars 2 forks source link

Consider splitting `galah_config()` into sub-functions with improved behaviour #144

Closed mjwestgate closed 1 year ago

mjwestgate commented 2 years ago

From a UX perspective, galah_config() has a few problems:

One potential way to resolve this would be to split this into different functions for different purposes (proposed names in parentheses):

  1. Set behaviour of subsequent {galah} functions, particularly regarding checks and verbosity (perhaps config_session()?)
  2. Swap to a different atlas (atlas_choose(), switch_atlas() or config_atlas()) - this could support NSE, but perhaps not piping, as changing atlases mid-pipe could lead to unexpected behaviour (hence why galah_atlas() is not a proposed function name)
  3. Login to the selected atlas to allow downloads (galah_login() or config_login()). This should cache login information for later queries. If the galah_ prefix is used then it should be pipe-able to match other galah_ functions, and may need to use NSE as well.

Note as well that current storage behaviour for information on different atlases is inadequate; future implementations need to be able to store information on the atlas name, region, name service source and architectural source. show_all_atlases also needs to be expanded to support this information.

[The above are notes from meeting of galah dev team 2022-05-09]

mjwestgate commented 1 year ago

8c895c64ae1c2ddd68cb416a70e68cbb3855074a cleans up galah_config to be more consistent with the above recommendations, while still retaining the basic function structure

mjwestgate commented 1 year ago

Closing this as galah_config now has improved behaviour and a new print method