AGENTS.md · datahub-project/datahub
AGENTS.md from datahub-project/datahub: 724 lines covering Code Navigation (LSP), Essential Commands, Code Formatting and Linting, Architecture Overview and…
Template by datahub-project
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/datahub-project/datahub/master/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering, code-generation
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 724 lines
- File
AGENTS.md
Sections
- Code Navigation (LSP)
- Essential Commands
- Code Formatting and Linting
- Architecture Overview
- Development Flow
- Working on Docs
- Code Standards
- Starting / Operating DataHub
- Common Operations
- Key Documentation
- Playwright UI E2E Tests
- Python Virtual Environments
- Important Notes
First lines (shown under the repo's Apache-2.0 license)
# DataHub — Agent Development Guide This is the canonical reference for working with the DataHub codebase. It applies to all coding agents (Claude Code, Cursor, Codex CLI, Devin, etc.) and human developers alike. ## Code Navigation (LSP) Prefer LSP tools over Grep for code navigation tasks: - Use `goToDefinition` to find where something is defined - Use `findReferences` to find all call sites - Use `workspaceSymbol` to find symbols by name - Use diagnostics after any edit to catch type errors immediately See [docs/lsp-setup.md](docs/lsp-setup.md) for installation and configuration. ## Essential Commands **Build and test:** ```bash ./gradlew build # Build entire project ./gradlew check # Run all tests (Python/JS lint lives in lint-jobs.yml / :module:lint) ./gradlew lintCheck # Run all lint checks (Python, JS, GraphQL, markdown, Java) ./gradlew lintFix # Auto-fix all lint issues ./gradlew format # Format all code (Java, Markdown, GraphQL, YAML) # Note that each directory typically has a build.gradle file, but the available tasks follow similar conventions. # Java code. ./gradlew spotlessApply # Java code formatting # Python code. ./gradlew :metadata-ingestion:testQuick # Fast Python unit tests ./gradlew :metadata-ingestion:lint # Python linting (ruff, mypy) ./gradlew :metadata-ingestion:lintFix # Python linting auto-fix (ruff only) # Markdown, GraphQL, YAML formatting ./gradlew :datahub-web-react:mdPrettierWrite # Format markdown files ./gradlew :datahub-web-react:graphqlPrettierWrite # Format GraphQL schemas ./gradlew :datahub-web-react:githubActionsPrettierWrite # Format GitHub Actions ``` **IMPORTANT: Verifying Python code changes:** - **ALWAYS use `./gradlew :metadata-ingestion:lintFix`** to verify Python code changes - **NEVER use `python3 -m py_compile`** - it doesn't catch style issues or type errors - **NEVER use `ruff` or `mypy` commands directly** - use the Gradle task instead - lintFix runs ruff formatting and fixing automatically, ensuring code quality - For smoke-test changes, the lintFix command will also check those files ## Code Formatting and Linting **CRITICAL: Always use Gradle tasks for formatting and linting. Never use npm/yarn/npx commands directly.** ### Available Formatting Tasks **Format everything:** ```bash ./gradlew lintCheck # Run all lint checks (Python, JS, GraphQL, markdown, Java) ./gradlew lintFix # Auto-fix all lint issues ./gradlew format # Format all code (Java, Markdown, GraphQL, YAML) ./gradlew formatChanged # Format only changed files (faster) ``` **Format specific file types:** ```bash # Markdown files ./gradlew :datahub-web-react:mdPrettierWrite # Format all markdown ./gradlew :datahub-web-react:mdPrettierCheck # Check markdown formatting # GraphQL schemas ./gradlew :datahub-web-react:graphqlPrettierWrite # Format GraphQL files ./gradlew :datahub-web-react:graphqlPrettierCheck # Check GraphQL formatting # GitHub Actions YAML ./gradlew :datahub-web-react:githubActionsPrettierWrite # Format workflow files ./gradlew :datahub-web-react:githubActionsPrettierCheck # Check workflow files # Java code ./gradlew spotlessApply # Format Java code # Python code ./gradlew :metadata-ingestion:lintFix # Format and fix Python code ./gradlew :metadata-ingestion:lint # Check Python formatting ``` ### When CI Formatting Checks Fail If you see CI failures like: - `markdown_format / markdown_format_check (pull_request)` - Use `./gradlew :datahub-web-react:mdPrettierWrite` - `graphql_prettier_check` - Use `./gradlew :datahub-web-react:graphqlPrettierWrite` - `spotless-check` - Use `./gradlew spotlessApply` - Python linting failures - Use `./gradlew :metadata-ingestion:lintFix` **Never do this:** ```bash npx prettier --write "docs/**/*.md" # WRONG - bypasses Gradle yarn prettier --write # WRONG - bypasses Gradle npm run format # WRONG - bypasses Gradle ``` **Always do this:** ```bash ./gradlew :datahub-web-react:mdPrettierWrite # CORRECT - uses Gradle ./gradlew format # CORRECT - formats everything ``` ### Why Use Gradle Tasks? 1. **Consistent configuration**: Gradle tasks use the project's Prettier config 2. **Pre-commit hook integration**: Gradle tasks match what CI runs 3. **Dependency management**: Ensures correct tool versions 4. **Cross-platform**: Works reliably across all environments **Java SDK v2 integration tests:** See [metadata-integration/java/datahub-client/CLAUDE.md](metadata-integration/java/datahub-client/CLAUDE.md) for detailed integration test documentation. ## Architecture Overview DataHub is a **schema-first, event-driven metadata platform** with three core layers: ### Core Services - **GMS (Generalized Metadata Service)**: Java/Spring backend handling metadata storage and REST/GraphQL APIs - **Frontend**: React/TypeScript application consuming GraphQL APIs - **Ingestion Framework**: Python CLI and connectors for extracting metadata from data sources - **Event Streaming**: Kafka-based real-time metadata change propagation ### Key Modules - `metadata-models/`: Avro/PDL schemas defining the metadata model - `metadata-service/`: Backend services, APIs, and business logic - `datahub-web-react/`: Frontend React application - `metadata-ingestion/`: Python ingestion framework and CLI - `datahub-graphql-core/`: GraphQL schema and resolvers Most of the non-frontend modules are written in Java. The modules written in Python are: - `metadata-ingestion/` - `datahub-actions/` - `metadata-ingestion-modules/airflow-plugin/` - `metadata-ingestion-modules/gx-plugin/` - `metadata-ingestion-modules/dagster-plugin/` - `metadata-ingestion-modules/prefect-plugin/` Each Python module has a gradle setup similar to `metadata-ingestion/` (documented above) ### Metadata Model Concepts - **Entities**: Core objects (Dataset, Dashboard, Chart, CorpUser, etc.) - **Aspects**: Metadata facets (Ownership, Schema, Documentation, etc.) - **URNs**: Unique identifiers (`urn:li:dataset:(urn:li:dataPlatform:mysql,db.table,PROD)`) - **MCE/MCL**: Metadata Change Events/Logs for updates
Signals
- Stars
- 12,883
- Forks
- 3,733
- Open issues
- 530
- Last commit (this folder)
- Sep 2, 2026 (1 month ago)
- Last release
- Oct 22, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/datahub-project/datahub
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from datahub-project
- 0.670score
test-quality-analyzer
datahub-project
Subagent "test-quality-analyzer" from datahub-project/datahub: Analyze DataHub pytest smoke test files for quality, standards compliance, and anti-patterns.
TemplateAFreshness: A★ 12.9KClaude Code - 0.657score
Cursor rules · datahub-project/datahub
datahub-project
2 Cursor rule files from datahub-project/datahub: datahub-dev, test-review.
TemplateAFreshness: A★ 12.9KCursor
Cite this page
AGENTS.md · datahub-project/datahub. Agent Mart. https://agentmart.dev/templates/datahub-project-datahub-agents-md (last updated 2026-10-24)