Guidance for automated agents working in this repository.
- See
CLAUDE.mdfor project-wide guidance. - If working on the web UI, also read
gbdraw/web/CLAUDE.md.
gbdrawis a Python 3.10+ bioinformatics tool for publication-quality genome diagrams.- Outputs: SVG, PNG, PDF, EPS, PS.
- Main package lives in
gbdraw/; tests intests/; web UI ingbdraw/web/index.htmlwith JS modules undergbdraw/web/js/(app entry points ingbdraw/web/js/app/with submodules grouped by feature).
# Fast tests (skip slow)
pytest tests/ -v -m "not slow"
# Full tests
pytest tests/ -v
# Lint
ruff check gbdraw/ --select=E,F,W --ignore=E501,W503
# Prepare the generated browser wheel for offline web packaging/tests
python tools/prepare_browser_wheel.py
# Refresh the cache-bust token when preparing a deployable web bundle
python tools/prepare_browser_wheel.py --refresh-cache-bust
# Build
python -m build- Keep the web UI as a single-page app with no build step;
gbdraw/web/index.htmlhosts HTML/CSS/templates and loads ES modules fromgbdraw/web/js/(app.jsentry withapp/,services/,utils/). - Keep larger UI modules split into focused subfolders under
gbdraw/web/js/app/(for examplelegend/,legend-layout/,feature-editor/) and keep thecreate*entry points in the top-levelapp/*.jsfiles. - If adding CDN dependencies, update the CSP in
gbdraw/web/index.html. - If diagram output changes, update reference SVGs in
tests/reference_outputs/. - Do not manually edit generated artifacts under
dist/orgbdraw.egg-info/. - Treat
gbdraw/web/gbdraw-<version>-py3-none-any.whlas a generated, gitignored asset. Prepare it when tests or packaging need it, but do not commit it.