mirror of https://github.com/buster-so/buster.git
update to cli
This commit is contained in:
parent
fec77bda4b
commit
71f26f48ab
|
@ -1,122 +0,0 @@
|
|||
---
|
||||
description: This is helpful for building and designing prds for our application and how to write them. Refer
|
||||
globs: prds/*
|
||||
alwaysApply: false
|
||||
---
|
||||
# PRD (Product Requirements Document) Guidelines
|
||||
|
||||
## Overview
|
||||
This document provides guidelines for creating and managing Product Requirements Documents (PRDs) in our codebase. All PRDs should follow the standardized template located at [template.md](mdc:prds/template.md)
|
||||
|
||||
## PRD Structure
|
||||
|
||||
### Location
|
||||
All PRDs should be stored in the `/prds` directory with the following structure:
|
||||
```
|
||||
/prds
|
||||
├── template.md # The master template for all PRDs
|
||||
├── active/ # Active/In-progress PRDs
|
||||
│ ├── feature_auth.md
|
||||
│ └── api_deployment.md
|
||||
├── completed/ # Completed PRDs that have been shipped
|
||||
│ ├── feature_user_auth.md
|
||||
│ └── api_deployment.md
|
||||
└── archived/ # Archived/Deprecated PRDs
|
||||
```
|
||||
|
||||
### Naming Convention
|
||||
- Use snake_case for file names
|
||||
- Include a prefix for the type of change:
|
||||
- `feature_` for new features
|
||||
- `enhancement_` for improvements
|
||||
- `fix_` for bug fixes
|
||||
- `refactor_` for code refactoring
|
||||
- `api_` for API changes
|
||||
|
||||
## Using the Template
|
||||
|
||||
### Getting Started
|
||||
1. Copy [template.md](mdc:prds/template.md) to create a new PRD
|
||||
2. Place it in the `/prds/active` directory
|
||||
3. Fill out each section following the template's comments and guidelines
|
||||
|
||||
### Key Sections to Focus On
|
||||
The template [template.md](mdc:prds/template.md) provides comprehensive sections. Pay special attention to:
|
||||
|
||||
1. **Problem Statement**
|
||||
- Must clearly articulate the current state
|
||||
- Include measurable impact
|
||||
- Reference any relevant metrics or data
|
||||
|
||||
2. **Technical Design**
|
||||
- Include all affected components
|
||||
- Document ALL file changes (new/modified/deleted)
|
||||
- Provide actual code examples
|
||||
- Include database migrations if needed
|
||||
|
||||
3. **Implementation Plan**
|
||||
- Break down into deployable phases
|
||||
- Include clear success criteria
|
||||
- List dependencies between phases
|
||||
- Provide testing strategy for each phase
|
||||
|
||||
4. **Testing Strategy**
|
||||
- Unit test requirements
|
||||
- Integration test scenarios
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Documentation
|
||||
1. Use clear, concise language
|
||||
2. Include code examples where relevant
|
||||
3. Document assumptions and dependencies
|
||||
4. Keep diagrams up to date
|
||||
5. Use Mermaid for diagrams when possible
|
||||
|
||||
### Lifecycle Management
|
||||
1. Move PRDs between directories based on status:
|
||||
- New PRDs → `/prds/active`
|
||||
- Shipped PRDs → `/prds/completed`
|
||||
- Deprecated PRDs → `/prds/archived`
|
||||
|
||||
2. Update status section regularly:
|
||||
- ✅ Completed items
|
||||
- ⏳ In Progress items
|
||||
- 🔜 Upcoming items
|
||||
- ❌ Known Issues
|
||||
|
||||
### Review Process
|
||||
1. Technical review
|
||||
- Architecture alignment
|
||||
- Security considerations
|
||||
- Performance implications
|
||||
- Testing coverage
|
||||
|
||||
2. Product review
|
||||
- Feature completeness
|
||||
- User impact
|
||||
- Business value
|
||||
- Success metrics
|
||||
|
||||
## Common Pitfalls to Avoid
|
||||
1. Incomplete technical specifications
|
||||
2. Missing file change documentation
|
||||
3. Unclear success criteria
|
||||
4. Insufficient testing strategy
|
||||
5. No rollback plan
|
||||
6. Missing security considerations
|
||||
7. Undefined monitoring metrics
|
||||
|
||||
## Example PRDs
|
||||
Reference these example PRDs for guidance:
|
||||
[template.md](mdc:prds/template.md)
|
||||
|
||||
## Checklist Before Submission
|
||||
- [ ] All template sections completed
|
||||
- [ ] Technical design is detailed and complete
|
||||
- [ ] File changes are documented
|
||||
- [ ] Implementation phases are clear
|
||||
- [ ] Testing strategy is defined
|
||||
- [ ] Security considerations addressed
|
||||
- [ ] Dependencies and Files listed
|
||||
- [ ] File References included
|
|
@ -0,0 +1,34 @@
|
|||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Build Commands
|
||||
- Build: `cargo build`
|
||||
- Release build: `cargo build --release`
|
||||
- Run tests: `cargo test`
|
||||
- Run specific test: `cargo test test_name`
|
||||
- Run tests in file: `cargo test --test filename`
|
||||
- Run package tests: `cargo test -p <package_name>`
|
||||
- Format: `cargo fmt`
|
||||
- Lint: `cargo clippy`
|
||||
|
||||
## Code Style Guidelines
|
||||
- **Imports**: Group by std, external crates, internal modules; alphabetical order
|
||||
- **Formatting**: 4-space indentation (standard Rust)
|
||||
- **Error Handling**: Use `thiserror` for error types, `anyhow` for general propagation
|
||||
- **Naming**: Follow Rust conventions (`snake_case` for variables/functions, `PascalCase` for types)
|
||||
- **Types**: Define custom error types with descriptive messages
|
||||
- **Dependencies**: Use workspace dependencies with `{ workspace = true }`
|
||||
- **Testing**: Place in separate `/tests` directory; use `tempfile` for test directories
|
||||
- **Never log secrets or sensitive data**
|
||||
|
||||
## Project Info
|
||||
- CLI for managing semantic models in Buster
|
||||
- Uses semantic versioning (PR title conventions for bumps)
|
||||
- Major: PR title with "BREAKING CHANGE" or "major", or PR with "major" label
|
||||
- Minor: PR title with "feat", "feature", or "minor", or PR with "minor" label
|
||||
- Patch: Default for all other PRs
|
||||
- Cross-project references supported
|
||||
- Config defined in `buster.yml`
|
||||
- File and tag exclusions for deployment
|
||||
- Row limit of 5000 is enforced for database queries by default
|
|
@ -1,20 +1,21 @@
|
|||
[package]
|
||||
name = "buster-cli"
|
||||
version = "0.0.7"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
[workspace]
|
||||
members = [
|
||||
"cli",
|
||||
# Add "libs/*" or specific lib crates here later
|
||||
]
|
||||
|
||||
[lib]
|
||||
name = "buster_cli"
|
||||
path = "src/lib.rs"
|
||||
[profile.release]
|
||||
lto = true
|
||||
strip = true
|
||||
opt-level = "z"
|
||||
codegen-units = 1
|
||||
panic = "abort"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
[workspace.dependencies]
|
||||
anyhow = "1.0.79"
|
||||
clap = { version = "4.4.18", features = ["derive", "env"] }
|
||||
confy = "0.6.0"
|
||||
dirs = "5.0.1"
|
||||
dirs = "6.0.0"
|
||||
futures = "0.3.29"
|
||||
indicatif = "0.17.8"
|
||||
inquire = "0.7.5"
|
||||
|
@ -38,11 +39,9 @@ url = "2.5.0"
|
|||
zip = "2.2.2"
|
||||
glob = "0.3.1"
|
||||
walkdir = "2.5.0"
|
||||
# Add the shared query engine library
|
||||
query_engine = { path = "../api/libs/query_engine" }
|
||||
# The query_engine dependency needs a workspace-relative path
|
||||
query_engine = { path = "../api/libs/query_engine" } # Adjusted path
|
||||
chrono = "0.4" # Moved from build-dependencies
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.16.0"
|
||||
|
||||
[build-dependencies]
|
||||
chrono = "0.4"
|
||||
# Keep dev-dependencies separate if they aren't shared
|
||||
# tempfile = "3.16.0"
|
|
@ -0,0 +1,48 @@
|
|||
[package]
|
||||
name = "buster-cli"
|
||||
version = "0.0.7"
|
||||
edition = "2021"
|
||||
build = "build.rs"
|
||||
|
||||
[lib]
|
||||
name = "buster_cli"
|
||||
path = "src/lib.rs"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
confy = { workspace = true }
|
||||
dirs = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
indicatif = { workspace = true }
|
||||
inquire = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
ratatui = { workspace = true }
|
||||
regex = { workspace = true }
|
||||
reqwest = { workspace = true, features = ["json", "rustls-tls", "stream"] }
|
||||
rpassword = { workspace = true }
|
||||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
serde_yaml = { workspace = true }
|
||||
tempfile = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true, features = ["full"] }
|
||||
tokio-util = { workspace = true, features = ["io"] }
|
||||
futures-util = { workspace = true }
|
||||
uuid = { workspace = true, features = ["v4", "serde"] }
|
||||
colored = { workspace = true }
|
||||
rustls = { workspace = true, features = ["tls12"] }
|
||||
url = { workspace = true }
|
||||
zip = { workspace = true }
|
||||
glob = { workspace = true }
|
||||
walkdir = { workspace = true }
|
||||
# Add the shared query engine library
|
||||
query_engine = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
chrono = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.16.0"
|
|
@ -1,15 +0,0 @@
|
|||
[0m10:11:41.254969 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'start', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x11b4b6f30>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x11b7ced50>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x11b7cf4a0>]}
|
||||
[0m10:11:41.258532 [debug] [MainThread]: An error was encountered while trying to send an event
|
||||
|
||||
|
||||
============================== 10:11:41.258772 | 8c4dc64d-ac69-441f-a617-03e73c0e10ba ==============================
|
||||
[0m10:11:41.258772 [info ] [MainThread]: Running with dbt=1.9.1
|
||||
[0m10:11:41.259035 [debug] [MainThread]: running dbt with arguments {'printer_width': '80', 'indirect_selection': 'eager', 'write_json': 'True', 'log_cache_events': 'False', 'partial_parse': 'True', 'cache_selected_only': 'False', 'warn_error': 'None', 'version_check': 'True', 'debug': 'False', 'log_path': 'logs', 'profiles_dir': '/Users/dallin/.dbt', 'fail_fast': 'False', 'use_colors': 'True', 'use_experimental_parser': 'False', 'empty': 'None', 'quiet': 'False', 'no_print': 'None', 'log_format': 'default', 'invocation_command': 'dbt ', 'static_parser': 'True', 'warn_error_options': 'WarnErrorOptions(include=[], exclude=[])', 'target_path': 'None', 'introspect': 'True', 'send_anonymous_usage_stats': 'True'}
|
||||
[0m10:11:41.259522 [error] [MainThread]: Encountered an error:
|
||||
Runtime Error
|
||||
dbt_project.yml does not parse to a dictionary
|
||||
[0m10:11:41.264844 [debug] [MainThread]: Resource report: {"command_name": "deps", "command_success": false, "command_wall_clock_time": 0.0560595, "process_in_blocks": "0", "process_kernel_time": 0.111403, "process_mem_max_rss": "107298816", "process_out_blocks": "0", "process_user_time": 0.711051}
|
||||
[0m10:11:41.265321 [debug] [MainThread]: Command `cli deps` failed at 10:11:41.265251 after 0.06 seconds
|
||||
[0m10:11:41.265532 [debug] [MainThread]: Sending event: {'category': 'dbt', 'action': 'invocation', 'label': 'end', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x11ba5cb90>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x11b923fb0>, <snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x11b922120>]}
|
||||
[0m10:11:41.265670 [debug] [MainThread]: An error was encountered while trying to send an event
|
||||
[0m10:11:41.265786 [debug] [MainThread]: Flushing usage events
|
|
@ -1,9 +0,0 @@
|
|||
{{ config(
|
||||
materialized = "table",
|
||||
tags = ["test", "exclude_me", "development"]
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
1 as id,
|
||||
'test' as name,
|
||||
current_timestamp() as created_at
|
Loading…
Reference in New Issue