Files
stellarshenson 00c2db6518 refactor: extract stellars_hub package with declarative config
Decompose monolithic jupyterhub_config.py (694 lines) and
custom_handlers.py (1896 lines) into pip-installable stellars_hub
package, then refactor the package into a pure logic library with
zero hardcoded data.

Package structure (stellars_hub/):
- core modules: auth, branding, events, gpu, groups, hooks, services,
  volumes, docker_utils, password_cache, volume_cache
- handlers/: 14 Tornado request handlers across 8 files
- activity/: monitoring subsystem (model, monitor, helpers, sampler,
  service)
- tests/: 65 pytest tests across 8 test files
- pyproject.toml with hatchling build backend

Declarative config architecture:
- jupyterhub_config.py expanded to 306-line self-documenting file with
  5 sections: env vars, data literals, logic calls, JupyterHub config,
  services/callbacks
- every import, env var, data literal, and c.* setting documented with
  inline comments
- all function parameters explicit (no hidden env reads in modules)
- handlers read config from self.settings['stellars_config'] via
  tornado_settings instead of os.environ.get()
- eliminated constants.py and configure.py from package

Deleted files:
- conf/bin/custom_handlers.py (1896 lines)
- conf/bin/activity_sampler.py (243 lines)
- stellars_hub/constants.py (58 lines)
- stellars_hub/configure.py (188 lines)

Other changes:
- Dockerfile uses multi-stage build (builder builds wheel + runs tests)
- 01_ensure_groups.py passes group list inline
- notebook_dir commented out (redundant with lab image default)
- docs/stellars-hub-package.md documents package architecture
2026-02-09 22:21:42 +01:00
..
2026-01-22 01:46:37 +01:00