Files
hyper/WIKI/DEVELOPMENT.md
2025-10-18 15:55:53 +02:00

1.1 KiB

Development and testing

Code style and conventions

  • Python 3.11+ with typing hints where helpful.
  • Use logging_utils.setup_logging for consistent logs across scripts.

Running tests

  • This repository doesn't currently include a formal test suite. Suggested quick checks:
    • Run python list_coins.py to verify connectivity to Hyperliquid Info.
    • Run python -m pyflakes . or python -m pylint if you have linters installed.

Adding a new strategy

  1. Create a new script following the pattern in strategy_template.py.
  2. Add an entry to _data/strategies.json with enabled: true and relevant parameters.
  3. Ensure the strategy writes a status JSON file (_data/strategy_status_<name>.json) and uses trade_log.log_trade to 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.example and document environment variables in WIKI/SETUP.md.