Skip to content

Commit

Permalink
Fixed the parsing of the env files (#12)
Browse files Browse the repository at this point in the history
* Fixed the parsing of the env files

* update changelog
  • Loading branch information
rcannood authored Oct 7, 2024
1 parent f6d5dcc commit f20f977
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion R/settings_store.R
Original file line number Diff line number Diff line change
Expand Up @@ -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]]

Expand Down Expand Up @@ -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]"
Expand All @@ -141,6 +144,7 @@
email = "str",
password = "str",
access_token = "str",
api_key = "Optional[str]",
uid = "str",
uuid = "str",
handle = "str",
Expand Down

0 comments on commit f20f977

Please sign in to comment.