Skip to content

Commit

Permalink
Implement the inspect behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
dfalbel committed Oct 17, 2024
1 parent e6e2e18 commit b3a429f
Show file tree
Hide file tree
Showing 3 changed files with 542 additions and 128 deletions.
6 changes: 6 additions & 0 deletions crates/ark/src/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ pub enum ArkGenerics {

#[strum(serialize = "ark_positron_variable_kind")]
VariableKind,

#[strum(serialize = "ark_positron_variable_get_child_at")]
VariableGetChildAt,

#[strum(serialize = "ark_positron_variable_get_children")]
VariableGetChildren,
}

impl ArkGenerics {
Expand Down
2 changes: 2 additions & 0 deletions crates/ark/src/modules/positron/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ark_methods_table$ark_positron_variable_display_value <- new.env(parent = emptye
ark_methods_table$ark_positron_variable_display_type <- new.env(parent = emptyenv())
ark_methods_table$ark_positron_variable_has_children <- new.env(parent = emptyenv())
ark_methods_table$ark_positron_variable_kind <- new.env(parent = emptyenv())
ark_methods_table$ark_positron_variable_get_child_at <- new.env(parent = emptyenv())
ark_methods_table$ark_positron_variable_get_children <- new.env(parent = emptyenv())
lockEnvironment(ark_methods_table, TRUE)

ark_methods_allowed_packages <- c("torch", "reticulate")
Expand Down
Loading

0 comments on commit b3a429f

Please sign in to comment.