Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the parsing of the env files #12

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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