Skip to content

Commit c160f75

Browse files
committed
Update Claude instructions
1 parent cf1ddd1 commit c160f75

File tree

2 files changed

+33
-34
lines changed

2 files changed

+33
-34
lines changed

CLAUDE.md

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -80,37 +80,3 @@ Some of the files below `crates/amalthea/src/comm/` are automatically generated
8080
Such files always have `// @generated` at the top and SHOULD NEVER be edited "by hand".
8181
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.
8282

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):
101-
- `../positron/extensions/positron-python/python_files/posit/positron/convert.py` - Core conversion logic
102-
- `../positron/extensions/positron-python/python_files/posit/positron/data_explorer.py` - Main data explorer (see `convert_to_code` methods around lines 1408, 2297)
103-
- `../positron/extensions/positron-python/python_files/posit/positron/tests/test_convert.py` - Execution validation tests
104-
105-
**Architecture comparison**:
106-
- Both R and Python use similar trait/abstract class patterns for extensibility
107-
- R uses `PipeBuilder` for clean pipe chain generation; Python uses `MethodChainBuilder`
108-
- Both have comprehensive filter/sort handlers with type-aware value formatting
109-
110-
**Possible next steps**:
111-
1. Add more execution tests, e.g. for sorting, or combined filtering and sorting
112-
1. Consider a "tidyverse" syntax instead of or in addition to "dplyr", where
113-
we would use stringr function for text search filters
114-
1. Dig in to non-syntactic column names
115-
1. Dig in to filtering for date and datetime columns
116-
1. Handle "base" and "data.table" syntaxes
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Data Explorer - Convert to Code Feature
2+
3+
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:
31+
- `../positron/extensions/positron-python/python_files/posit/positron/convert.py` - Core conversion logic
32+
- `../positron/extensions/positron-python/python_files/posit/positron/data_explorer.py` - Main data explorer integration
33+
- `../positron/extensions/positron-python/python_files/posit/positron/tests/test_convert.py` - Execution validation tests

0 commit comments

Comments
 (0)