1.1 KiB
1.1 KiB
Development and testing
Code style and conventions
- Python 3.11+ with typing hints where helpful.
- Use
logging_utils.setup_loggingfor consistent logs across scripts.
Running tests
- This repository doesn't currently include a formal test suite. Suggested quick checks:
- Run
python list_coins.pyto verify connectivity to Hyperliquid Info. - Run
python -m pyflakes .orpython -m pylintif you have linters installed.
- Run
Adding a new strategy
- Create a new script following the pattern in
strategy_template.py. - Add an entry to
_data/strategies.jsonwithenabled: trueand relevant parameters. - Ensure the strategy writes a status JSON file (
_data/strategy_status_<name>.json) and usestrade_log.log_tradeto record actions.
Recommended improvements (low-risk)
- Add a lightweight unit test suite (pytest) for core functions like timeframe parsing, SQL helpers, and signal calculation.
- Add CI (GitHub Actions) to run flake/pylint and unit tests on PRs.
- Move secrets handling to a
.env.exampleand document environment variables inWIKI/SETUP.md.