[PR #14] [CLOSED] Draft: Add local development bootstrap and deterministic demo environment #14

Closed
opened 2026-04-20 20:05:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KohakuBlueleaf/KohakuHub/pull/14
Author: @narugo1992
Created: 4/19/2026
Status: Closed

Base: mainHead: dev/narugo1992


📝 Commits (1)

  • 4c6dba6 Add local development bootstrap and deterministic demo fixtures

📊 Changes

17 files changed (+2896 additions, -8 deletions)

View changed files

.env.dev.example (+51 -0)
📝 .gitignore (+6 -0)
Makefile (+83 -0)
📝 config-example.toml (+2 -1)
docs/development/local-dev.md (+251 -0)
📝 pyproject.toml (+2 -1)
scripts/dev/down_infra.sh (+26 -0)
scripts/dev/init_lakefs.py (+152 -0)
scripts/dev/reset_local_data.sh (+51 -0)
scripts/dev/run_backend.sh (+76 -0)
scripts/dev/seed_demo_data.py (+1988 -0)
scripts/dev/up_infra.sh (+184 -0)
📝 scripts/generate_docker_compose.py (+4 -1)
📝 scripts/migrate_config.py (+4 -1)
📝 scripts/sync_lakefs_credentials.py (+4 -1)
📝 src/kohakuhub/config.py (+9 -1)
📝 src/kohakuhub/datasetviewer/parsers.py (+3 -2)

📄 Description

Summary

  • add a hybrid local development workflow that runs the FastAPI backend from the local Python environment while Docker provides persisted Postgres, MinIO, and LakeFS services
  • add a tracked .env.dev.example, Makefile shortcuts, local development docs, and bootstrap scripts for backend startup, infra lifecycle, and LakeFS initialization
  • add deterministic first-run demo seeding through the application/API path, including realistic users, organizations, repositories, and a reproducible local manifest
  • add a destructive local reset flow with explicit warning text, red emphasis, and double confirmation before persisted data is removed
  • add local-dev support for KOHAKU_HUB_INTERNAL_BASE_URL and Python 3.10 tomli fallbacks in config-related scripts
  • ignore local-only agent and environment files that should never be committed

Notes

  • This PR is intended to stay open as a long-lived development PR.
  • Follow-up commits are expected as the local development workflow and demo environment continue to evolve.
  • Please treat this as the ongoing integration branch for local DX, seeding, and related maintenance work rather than a one-shot feature branch.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/KohakuBlueleaf/KohakuHub/pull/14 **Author:** [@narugo1992](https://github.com/narugo1992) **Created:** 4/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dev/narugo1992` --- ### 📝 Commits (1) - [`4c6dba6`](https://github.com/KohakuBlueleaf/KohakuHub/commit/4c6dba64584e1a2ed3e4fda4515d6f32519e6ea9) Add local development bootstrap and deterministic demo fixtures ### 📊 Changes **17 files changed** (+2896 additions, -8 deletions) <details> <summary>View changed files</summary> ➕ `.env.dev.example` (+51 -0) 📝 `.gitignore` (+6 -0) ➕ `Makefile` (+83 -0) 📝 `config-example.toml` (+2 -1) ➕ `docs/development/local-dev.md` (+251 -0) 📝 `pyproject.toml` (+2 -1) ➕ `scripts/dev/down_infra.sh` (+26 -0) ➕ `scripts/dev/init_lakefs.py` (+152 -0) ➕ `scripts/dev/reset_local_data.sh` (+51 -0) ➕ `scripts/dev/run_backend.sh` (+76 -0) ➕ `scripts/dev/seed_demo_data.py` (+1988 -0) ➕ `scripts/dev/up_infra.sh` (+184 -0) 📝 `scripts/generate_docker_compose.py` (+4 -1) 📝 `scripts/migrate_config.py` (+4 -1) 📝 `scripts/sync_lakefs_credentials.py` (+4 -1) 📝 `src/kohakuhub/config.py` (+9 -1) 📝 `src/kohakuhub/datasetviewer/parsers.py` (+3 -2) </details> ### 📄 Description ## Summary - add a hybrid local development workflow that runs the FastAPI backend from the local Python environment while Docker provides persisted Postgres, MinIO, and LakeFS services - add a tracked `.env.dev.example`, Makefile shortcuts, local development docs, and bootstrap scripts for backend startup, infra lifecycle, and LakeFS initialization - add deterministic first-run demo seeding through the application/API path, including realistic users, organizations, repositories, and a reproducible local manifest - add a destructive local reset flow with explicit warning text, red emphasis, and double confirmation before persisted data is removed - add local-dev support for `KOHAKU_HUB_INTERNAL_BASE_URL` and Python 3.10 `tomli` fallbacks in config-related scripts - ignore local-only agent and environment files that should never be committed ## Notes - This PR is intended to stay open as a long-lived development PR. - Follow-up commits are expected as the local development workflow and demo environment continue to evolve. - Please treat this as the ongoing integration branch for local DX, seeding, and related maintenance work rather than a one-shot feature branch. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 20:05:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/KohakuHub#14