build: add pyproject.toml and eliminate sys.path.append hacks#245
Open
sjhddh wants to merge 1 commit intoshiyu-coder:masterfrom
Open
build: add pyproject.toml and eliminate sys.path.append hacks#245sjhddh wants to merge 1 commit intoshiyu-coder:masterfrom
sjhddh wants to merge 1 commit intoshiyu-coder:masterfrom
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kronos cannot currently be
pip install-ed — every script uses fragilesys.path.append("../")hacks to import the model package. This PR adds proper Python packaging:pyproject.tomlwith setuptools backend,kronos-timeseriespackage name, all dependencies from requirements.txt, and optional[dev]/[finetune]extrassys.path.append("../")hacks across finetune/, finetune_csv/, examples/, and webui/requirements.txt: remove duplicatepandasentry, pinnumpy>=1.24.0__init__.pyforfinetune/,finetune_csv/,tests/py.typedmarker (PEP 561) for type checker support__version__tomodel/__init__.pyAfter this PR, users can simply run
pip install -e .and all imports work cleanly.Test plan
pip install -e .succeedspython -c "from model.kronos import KronosPredictor"works without sys.path hacks🤖 Generated with Claude Code