From f20f977307f2f3ca5fc6165f51137a90879ea77f Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Mon, 7 Oct 2024 10:56:48 +0200 Subject: [PATCH] Fixed the parsing of the env files (#12) * Fixed the parsing of the env files * update changelog --- CHANGELOG.md | 4 ++++ R/settings_store.R | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17bbc0b..ce0607a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ - Linting action. - Commands for roxygenizing (`/document`) and restyling the source code (`/style`). +## BUG FIXES + +* Fixed the parsing of the env files in `~/.lamin` due to changes in the lamindb-setup Python package (PR #12). + # laminr v0.0.1 Initial POC implementation of the LaminDB API client for R. diff --git a/R/settings_store.R b/R/settings_store.R index 5b5492b..04a0254 100644 --- a/R/settings_store.R +++ b/R/settings_store.R @@ -85,7 +85,8 @@ name <- gsub(env_prefix, "", name_with_prefix) if (!name %in% names(field_types)) { - cli_abort(paste0("Unknown field: ", name)) + cli_warn(paste0("Unexpected field in '", env_file, "': ", name)) + return(list(name = name, value = NULL)) } raw_type <- field_types[[name]] @@ -120,12 +121,14 @@ env_prefix <- "lamindb_instance_" field_types <- list( + api_url = "Optional[str]", owner = "str", name = "str", storage_root = "str", storage_region = "str", db = "Optional[str]", schema_str = "Optional[str]", + schema_id = "Optional[str]", id = "str", git_repo = "Optional[str]", keep_artifacts_local = "Optional[bool]" @@ -141,6 +144,7 @@ email = "str", password = "str", access_token = "str", + api_key = "Optional[str]", uid = "str", uuid = "str", handle = "str",