Language: 中文 | English
Thanks for helping improve the data lineage analyzer. This project handles SQL and metadata that may come from sensitive enterprise environments, so contributions must be careful about test data, logs, and reproducibility.
python3.11 -m venv .venv
source .venv/bin/activate
python3.11 -m pip install -r requirements.txtRun the app:
python3.11 run_app.pyRun checks:
python3.11 -m pytest tests/
ruff check app/ core/ tests/
mypy app/ core/If local hooks are enabled:
bash scripts/install-git-hooks.sh
scripts/agent-verify.sh quick
scripts/agent-verify.sh full- Open an issue for non-trivial changes.
- Keep API routes thin; put business logic in
app/services/. - Keep
core/framework-agnostic. Do not import FastAPI fromcore/. - Add or update tests for parser, lineage, API, or frontend behavior.
- Update docs when changing user-facing behavior, setup, APIs, or exported formats.
- Use conventional commit messages, for example
fix: 修复字段血缘方向.
Do not commit:
- Real
SOURCE_DATA/content. - Local cache files from
output/. - Database files such as
.dbor.sqlite. - Logs, credentials, API keys, screenshots containing customer names, or proprietary SQL.
- Compressed archives with unknown contents.
Use synthetic SQL samples like docs/examples/oracle_warehouse_lineage.sql when filing issues or tests.
- Python 3.11+ compatible syntax only.
- Use type hints for new code.
- Use
snake_casefor functions and variables. - Use
PascalCasefor Pydantic models and dataclasses. - Do not use PEP 604 unions as the second argument to
isinstance(). Use tuples such asisinstance(value, (A, B)). - New parsers should implement the parser protocol by duck typing and register through
ParserRegistry.
- Parser changes: add narrow unit tests under
tests/. - API changes: add API tests with mocked services.
- Graph/UI behavior: update frontend E2E coverage when applicable.
- Storage/cache changes: include migration or compatibility tests.
- Tests added or updated.
-
python3.11 -m pytest tests/passes, or the PR explains why it cannot be run. -
ruff check app/ core/ tests/passes for touched files. - Documentation updated when user-facing behavior changes.
- No sensitive data, local cache, logs, or generated archives are included.