Skip to content

build: add pyproject.toml and eliminate sys.path.append hacks#245

Open
sjhddh wants to merge 1 commit intoshiyu-coder:masterfrom
sjhddh:build/packaging
Open

build: add pyproject.toml and eliminate sys.path.append hacks#245
sjhddh wants to merge 1 commit intoshiyu-coder:masterfrom
sjhddh:build/packaging

Conversation

@sjhddh
Copy link
Copy Markdown

@sjhddh sjhddh commented Apr 13, 2026

Summary

Kronos cannot currently be pip install-ed — every script uses fragile sys.path.append("../") hacks to import the model package. This PR adds proper Python packaging:

  • Create pyproject.toml with setuptools backend, kronos-timeseries package name, all dependencies from requirements.txt, and optional [dev]/[finetune] extras
  • Remove 16 sys.path.append("../") hacks across finetune/, finetune_csv/, examples/, and webui/
  • Fix requirements.txt: remove duplicate pandas entry, pin numpy>=1.24.0
  • Add missing __init__.py for finetune/, finetune_csv/, tests/
  • Add py.typed marker (PEP 561) for type checker support
  • Add __version__ to model/__init__.py

After this PR, users can simply run pip install -e . and all imports work cleanly.

Test plan

  • pip install -e . succeeds
  • python -c "from model.kronos import KronosPredictor" works without sys.path hacks
  • All example scripts still run after installation
  • Existing regression tests pass

🤖 Generated with Claude Code

- Create pyproject.toml for pip-installable package
- Fix requirements.txt (duplicate pandas, missing pytest)
- Add missing __init__.py files for finetune/, finetune_csv/, tests/
- Remove 16 sys.path.append("../") hacks across all scripts
- Add py.typed marker for type checker support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant