You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
-34Lines changed: 0 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,37 +80,3 @@ Some of the files below `crates/amalthea/src/comm/` are automatically generated
80
80
Such files always have `// @generated` at the top and SHOULD NEVER be edited "by hand".
81
81
If changes are needed in these files, that must happen in the separate Positron source repository and the comms for R and Python must be regenerated.
82
82
83
-
## Current Work in Progress
84
-
85
-
### Convert to Code Feature for Data Explorer
86
-
87
-
**Feature**: Backend implementation of "convert to code" for Positron's data explorer in R, allowing users to generate R code (dplyr syntax) that replicates their UI-based data manipulations (filters, sorting).
88
-
89
-
**Status**:
90
-
- ✅ R implementation has been created with awareness of the Python implementation
91
-
- ✅ Core feature is implemented and working with dplyr syntax
92
-
- ✅ Unit tests exist for string output validation
93
-
- ✅ An MVP exists of a test that validates the result of executing generated code
94
-
95
-
**Key files in R implementation**:
96
-
-`crates/ark/src/data_explorer/convert_to_code.rs` - Core conversion logic with traits and handlers + tests
97
-
-`crates/ark/src/data_explorer/r_data_explorer.rs` - Data explorer integration
98
-
-`crates/ark/tests/data_explorer.rs` - Integration tests for data explorer
99
-
100
-
**Key files in Python implementation** (for reference):
-`../positron/extensions/positron-python/python_files/posit/positron/data_explorer.py` - Main data explorer (see `convert_to_code` methods around lines 1408, 2297)
Backend implementation of "convert to code" for Positron's data explorer in R, allowing users to generate R code (dplyr syntax) that replicates their UI-based data manipulations (filters, sorting).
4
+
5
+
## Key Files
6
+
7
+
### Core Implementation
8
+
-`convert_to_code.rs` - Core conversion logic with traits and handlers + comprehensive tests
9
+
-`r_data_explorer.rs` - Data explorer integration with convert-to-code support
10
+
11
+
### Tests
12
+
-`../../../tests/data_explorer.rs` - Integration tests for data explorer including extensive sorting tests
13
+
14
+
## Architecture
15
+
16
+
The R implementation follows similar patterns to the Python implementation:
17
+
18
+
-**Trait-based design** for extensibility with `FilterHandler`, `SortHandler`, and `CodeConverter` traits
19
+
-**PipeBuilder** for clean pipe chain generation (similar to Python's `MethodChainBuilder`)
20
+
-**Comprehensive filter/sort handlers** with type-aware value formatting
21
+
-**Non-syntactic column name handling** using backticks when needed
22
+
23
+
## Future Enhancements
24
+
25
+
1. Consider a "tidyverse" syntax where stringr functions are used for text search filters
26
+
2. Handle "base" and "data.table" syntaxes in addition to dplyr
27
+
28
+
## Reference Implementation
29
+
30
+
For architectural reference, see the Python implementation:
0 commit comments