Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ apache-release.sh export-ignore
# ignored directory
.github/ export-ignore
hugegraph-dist/scripts/ export-ignore
.serena/ export-ignore
# only exclude the root
/assembly/ export-ignore
4 changes: 2 additions & 2 deletions .github/workflows/client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-client/assembly/travis
# TODO: replace it with the (latest - n) commit id (n >= 15)
# hugegraph commit date: 2025-05-05
COMMIT_ID: 8c1ee71
# hugegraph commit date: 2025-11-4
COMMIT_ID: b7998c1
strategy:
fail-fast: false
matrix:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/client-go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-client/assembly/travis
# TODO: replace it with the (latest - n) commit id (n >= 15)
# hugegraph commit date: 2024-12-09
COMMIT_ID: f838897
# FIXME: hugegraph commit date: 2025-10-30
COMMIT_ID: 8c1ee71 # 5b3d295
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Init Go env
uses: actions/setup-go@v2.1.3
with: { go-version: '1.x' }
with: {go-version: '1.x'}

- name: Go test
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/hubble-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ on:
env:
TRAVIS_DIR: hugegraph-hubble/hubble-dist/assembly/travis
# TODO: replace it with the (latest - n) commit id (n >= 15)
# hugegraph commit date: 2024-12-09
COMMIT_ID: f838897
# FIXME: hugegraph commit date: 2025-10-30
COMMIT_ID: 8c1ee71 # 5b3d295

jobs:
hubble-ci:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/loader-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
TRAVIS_DIR: hugegraph-loader/assembly/travis
STATIC_DIR: hugegraph-loader/assembly/static
# TODO: replace it with the (latest - n) commit id (n >= 15)
# hugegraph commit date: 2024-12-09
COMMIT_ID: f838897
# hugegraph commit date: 2025-10-30
COMMIT_ID: 5b3d295
DB_USER: root
DB_PASS: root
DB_DATABASE: load_test
Expand All @@ -43,13 +43,13 @@ jobs:
fetch-depth: 2

- name: Install JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'adopt'

- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
mvn test -P kafka

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/jacoco.xml
4 changes: 2 additions & 2 deletions .github/workflows/spark-connector-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
env:
USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-spark-connector/assembly/travis
# hugegraph commit date: 2024-12-09
COMMIT_ID: f838897
# hugegraph commit date: 2025-10-30
COMMIT_ID: 5b3d295
strategy:
matrix:
JAVA_VERSION: [ '11' ]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tools-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
TRAVIS_DIR: hugegraph-tools/assembly/travis
# TODO: could we use one param to unify it? or use a action template (could use one ci file)
# TODO: replace it with the (latest - n) commit id (n >= 15)
COMMIT_ID: 29ecc0
# hugegraph commit date: 2025-11-4
COMMIT_ID: b7998c1
strategy:
matrix:
JAVA_VERSION: [ '11' ]
Expand Down
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ output/
tree.txt
*.versionsBackup
.flattened-pom.xml
*.truststore

# eclipse ignore
.settings/
Expand All @@ -101,3 +102,27 @@ Thumbs.db
# client-go
go.env

# AI-IDE prompt files (We only keep AGENTS.md, other files could soft-linked it when needed)
# Claude Projects
CLAUDE.md
CLAUDE_*.md
# Gemini/Google
GEMINI.md
# GitHub Copilot / Microsoft
copilot-instructions.md
.copilot-instructions.md
# Cursor IDE
cursor-instructions.md
.cursor-instructions.md
cursor.md
# Windsurf/Codeium
windsurf.md
windsurf-instructions.md
codeium.md
codeium-instructions.md
# Other AI coding assistants
.ai-instructions.md
*.ai-prompt.md
WARP.md


1 change: 1 addition & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ header: # `header` section is configurations for source codes license header.
- 'LICENSE'
- 'NOTICE'
- 'DISCLAIMER'
- '.serena/**'
- '**/*.md'
- '**/*.versionsBackup'
- '**/*.log'
Expand Down
1 change: 1 addition & 0 deletions .serena/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/cache
244 changes: 244 additions & 0 deletions .serena/memories/README_INDEX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
# Memory Index - HugeGraph Toolchain Project

## Onboarding Complete ✓

This project has been successfully initialized with Serena MCP. Below is an index of all available memory files.

## Available Memories (7 Core Files)

### Core Project Information

1. **project_overview.md** (125 lines)
- Project purpose and goals
- All 6 modules (client, loader, hubble, tools, client-go, spark-connector)
- Technology stack (Java 8, Node.js 18.20.8, Go, React, Spring Boot)
- Module dependencies and relationships
- External dependencies
- Project structure

### Code Quality and Style

2. **code_style_and_conventions.md** (311 lines)
- Java code style (indentation, naming, formatting)
- Naming conventions (classes, methods, variables)
- Import rules and prohibited imports
- Maven POM style
- Frontend code style (TypeScript, CSS/Less)
- Go code style
- Design patterns used in each module
- File organization standards
- Commit message format

3. **task_completion_checklist.md** (372 lines) ⭐ **IMPORTANT**
- Code quality checks before committing
- Testing requirements
- Build verification steps
- Documentation update checklist
- Git pre-commit checklist
- Pull request checklist
- CI/CD pipeline details
- Common issues and solutions
- Release-specific tasks

### Architecture and Design

4. **architecture_and_design_patterns.md** (571 lines)
- Overall system architecture
- Module-specific architectures:
- hugegraph-client: Layered architecture, Manager pattern
- hugegraph-loader: Pipeline architecture
- hugegraph-hubble: Frontend (React+MobX) + Backend (Spring Boot)
- hugegraph-tools: Command pattern
- Design patterns (Factory, Builder, Strategy, Observer, Repository)
- Cross-cutting concerns (error handling, logging)
- Configuration management

### Testing

5. **testing_infrastructure.md** (634 lines)
- Testing philosophy (unit, integration, functional)
- Test organization and structure
- Module-specific testing:
- hugegraph-client: UnitTestSuite, ApiTestSuite, FuncTestSuite
- hugegraph-loader: Test profiles (unit, file, hdfs, jdbc, kafka)
- hugegraph-hubble: Backend (Spring Test) + Frontend (Jest)
- hugegraph-client-go: Go standard testing
- CI/CD testing pipelines
- Test coverage tools and targets
- Common testing patterns
- Debugging tests

### Development Workflows

6. **common_development_workflows.md** (657 lines)
- Daily development workflows:
- Starting new features
- Fixing bugs
- Adding tests
- Refactoring code
- Module-specific workflows
- Troubleshooting common issues
- Release workflow
- Useful development commands
- Git hooks setup
- IDE configuration (IntelliJ IDEA, VS Code)

## Quick Start Guide

### For New Developers

1. **Read First**:
- `project_overview.md` - Understand what the project is
- `common_development_workflows.md` - Learn essential commands and workflows

2. **Before Making Changes**:
- `code_style_and_conventions.md` - Learn coding standards
- `task_completion_checklist.md` - Know what to check before committing

3. **When Working on Code**:
- `architecture_and_design_patterns.md` - Understand design patterns

4. **When Writing Tests**:
- `testing_infrastructure.md` - Learn testing approach

### For System Setup

**Prerequisites** (macOS):
```bash
# Java 11 (required)
/usr/libexec/java_home -V
export JAVA_HOME=$(/usr/libexec/java_home -v 11)

# Maven
brew install maven

# Node.js 18.20.8 (for Hubble)
nvm install 18.20.8
nvm use 18.20.8
npm install -g yarn

# Python 3 (for Hubble build)
brew install python3
pip3 install -r hugegraph-hubble/hubble-dist/assembly/travis/requirements.txt
```

**Build Entire Project**:
```bash
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -ntp
```

**Run Tests**:
```bash
# Client tests
cd hugegraph-client
mvn test -Dtest=UnitTestSuite -ntp

# Loader tests
cd hugegraph-loader
mvn test -P unit -ntp

# Hubble tests
cd hugegraph-hubble/hubble-fe
yarn test
```

## Essential Commands Cheat Sheet

### Build Commands
```bash
# Full project
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -ntp

# Specific module (e.g., client)
mvn install -pl hugegraph-client -am -DskipTests -ntp

# Hubble (requires dependencies built first)
mvn install -pl hugegraph-client,hugegraph-loader -am -DskipTests -ntp
cd hugegraph-hubble
mvn -e compile package -Dmaven.test.skip=true -ntp
```

### Testing Commands
```bash
# Client unit tests
cd hugegraph-client && mvn test -Dtest=UnitTestSuite -ntp

# Loader tests
cd hugegraph-loader && mvn test -P unit -ntp

# Single test
mvn test -Dtest=ClassName#methodName -ntp
```

### Code Quality
```bash
# Checkstyle
mvn checkstyle:check

# License check
mvn apache-rat:check

# EditorConfig validation
mvn editorconfig:check
```

### Git Commands (IMPORTANT: Always use --no-pager)
```bash
# View history
git --no-pager log --oneline -10

# View changes
git --no-pager diff HEAD~1
```

**See `common_development_workflows.md` for complete command reference**

## Key Project Facts

- **Language**: Java 8 (main), Go, TypeScript
- **Build Tool**: Maven 3.x
- **Test Framework**: JUnit 4 + Mockito
- **Frontend**: React + TypeScript + MobX (Node.js 18.20.8)
- **Backend**: Spring Boot
- **Version**: 1.7.0
- **License**: Apache 2.0
- **Repository**: https://github.com/apache/hugegraph-toolchain

## Common Pitfalls to Avoid

1. ❌ **DON'T** use `git log` without `--no-pager` flag
2. ❌ **DON'T** commit without running checkstyle and tests
3. ❌ **DON'T** use star imports (`import org.apache.*`)
4. ❌ **DON'T** use `System.out.println` (use logger instead)
5. ❌ **DON'T** forget Apache 2.0 license headers
6. ❌ **DON'T** use tabs (use 4 spaces for Java, 2 for frontend)
7. ❌ **DON'T** exceed 100 character line length
8. ❌ **DON'T** commit code that fails CI checks

## Getting Help

- **Documentation**: https://hugegraph.apache.org/docs/
- **Issues**: https://github.com/apache/hugegraph-toolchain/issues
- **Mailing List**: dev@hugegraph.apache.org
- **Memory Files**: Check `.serena/memories/` directory

## Memory Statistics

- **Total Memory Files**: 7 (including this index)
- **Total Lines**: ~2,900+
- **Total Size**: ~85KB
- **Coverage Areas**:
- Project overview and structure
- Code style and conventions
- Architecture and design patterns
- Testing infrastructure
- Development workflows
- Task completion checklists

## Last Updated

Onboarding completed: 2025-11-05

---

**Note**: All memories are stored in `.serena/memories/` directory and can be read using Serena MCP tools.
Loading
Loading