Contributing
Contributions are welcome! Here’s how to participate in the project.
Prerequisites
- Rust (edition 2021)
- Make (for build targets)
Workflow
# 1. Fork the repository
# 2. Clone your fork
git clone https://github.com/<your-username>/convert_to_parquet.git
cd convert_to_parquet
# 3. Create a branch
git checkout -b my-feature
# 4. Code!
# 5. Test
make test
# 6. Format
make fmt
# 7. Lint
make lint
# 8. Commit and push
git push origin my-feature
# 9. Open a Pull Request
Code Structure
src/
├── main.rs # CLI entry point (clap, format dispatch)
├── bin/
│ └── gui_convert.rs # Entry point for the convert_to_parquet_gui binary
├── lib.rs # Module declarations
├── conversion/
│ ├── mod.rs # Main pipeline (orchestration, ConvertOptions)
│ ├── csv_blocks.rs # CSV reading in blocks
│ ├── parquet_writer.rs# Ordered Parquet writing
│ ├── pipeline.rs # Parallel analysis workers
│ ├── json_pipeline.rs # Parallel block engine for native nested-JSON conversion
│ ├── ticker.rs # MB/s progress bar
│ └── counting.rs # Parquet row counting
├── analysis/
│ ├── mod.rs # Block analysis
│ ├── builders.rs # RecordBatch construction
│ ├── conversions.rs # Value → Arrow type conversion
│ └── types.rs # Metrics and error counters
├── schema.rs # Type inference (sampling)
├── utils.rs # Delimiter/header detection, dates, nulls
├── inspect.rs # Parquet metadata display
├── json.rs # JSON → intermediate CSV converter
├── json_arrow.rs # Native Arrow path for nested JSON (entry point)
├── json_leaf_infer.rs # Leaf type promotion in JSON inference
├── json_normalize.rs # JSON flatten to dot-notation columns (--flatten)
├── xlsx.rs # Excel → intermediate CSV converter
├── to_csv.rs # Parquet → CSV converter
├── to_jsonl.rs # Parquet → JSONL converter
├── to_json.rs # Parquet → JSON (array of objects)
├── to_xlsx.rs # Parquet → XLSX (Excel workbook)
├── export.rs # Unified export dispatch
├── preview.rs # Headless data preview (non-interactive)
├── tui.rs # Interactive full-screen viewer (ratatui)
├── parquet_rewrite.rs # Column renaming for Parquet files
├── data_generator.rs # Test data generator binary
├── memory.rs # System memory detection, adaptive block/thread sizing
├── diag.rs # Per-phase timing/RSS diagnostics (--diagnose)
└── gui/ # egui/eframe GUI application
├── mod.rs # Module wiring, run()
├── app.rs # ConverterApp state, egui App trait impl
├── model.rs # File/schema/output UI state (FileOptions, OutputSelection, ...)
├── worker.rs # Background analysis/conversion threads (mpsc channel)
├── analysis.rs # Input format detection for the GUI
├── paths.rs # Output path resolution
├── theme.rs # egui theme setup
└── view/
├── mod.rs # Menu bar, sidebar, outputs panel, modals
├── detail.rs # Per-file detail tabs (data/schema/options/validation/parquet stats)
└── preview.rs # Data preview tab rendering
Conventions
Code
- Formatting:
cargo fmt(standard rustfmt) - Linting:
cargo clippy -- -D warnings - No warnings: code must compile without warnings
- Tests: any new feature must include tests
Commits
- Commit messages in English
- Prefixes:
feat:,fix:,refactor:,docs:,test:,chore: - One line ≤ 72 characters for title
Documentation
Public modules must have a documentation comment (/// or //!). Public functions should document parameters and return value when behavior is not obvious.