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
+222-3Lines changed: 222 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,31 @@
2
2
3
3
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
4
5
+
> **🚨 IMPORTANT**: Always check `docs/lkml2cube_*.md` files BEFORE reading source code. Update docstrings and run `python scripts/generate_docs.py` after any code changes.
6
+
5
7
## Project Overview
6
8
7
9
lkml2cube is a Python CLI tool that converts LookML models into Cube data models. It uses the `lkml` library to parse LookML files and generates YAML-based Cube definitions.
8
10
11
+
## 📚 Documentation-First Development
12
+
13
+
**CRITICAL**: Before reading source code, always consult the generated documentation:
14
+
15
+
1.**Primary Reference**: Check `docs/lkml2cube_*.md` files first
16
+
2.**Implementation Details**: Read source code only if docs are insufficient
17
+
3.**Always Update**: Maintain docstrings and regenerate docs for any changes
18
+
19
+
📖 **Documentation Files**:
20
+
-`docs/lkml2cube_main.md` - CLI commands and usage
21
+
-`docs/lkml2cube_converter.md` - LookMLConverter Python API
22
+
-`docs/lkml2cube_parser_cube_api.md` - Module to interact with Cube meta API
23
+
-`docs/lkml2cube_parser_loader.md` - File loading and writing utilities
24
+
-`docs/lkml2cube_parser_explores.md` - Module to convert LookML explores to Cube `view` definitions
25
+
-`docs/lkml2cube_parser_types.md` - Custom YAML types for proper formatting
26
+
-`docs/lkml2cube_parser_views.md` - Module to convert LookML views to Cube `cube` definitions
27
+
28
+
⚠️ **Required Workflow**: When modifying code → Update docstrings → Run `python scripts/generate_docs.py`
29
+
9
30
## Development Commands
10
31
11
32
### Environment Setup
@@ -15,9 +36,17 @@ lkml2cube is a Python CLI tool that converts LookML models into Cube data models
15
36
16
37
### Testing
17
38
- Tests are located in `tests/` directory
18
-
- Main test file: `tests/test_e2e.py`
39
+
- Main test files: `tests/test_e2e.py`, `tests/test_converter.py`, `tests/test_explores_command.py`
19
40
- Test samples are in `tests/samples/` with both `lkml/` and `cubeml/` subdirectories
20
41
- Tests compare generated output against expected YAML files
42
+
-`test_converter.py` provides comprehensive unit tests for the `LookMLConverter` class
0 commit comments