Skip to content

docs: rewrite Tasks, Trades, and Deployment sections with accurate APIs#402

Merged
MDUYN merged 2 commits into
devfrom
squad/334-docs-tasks-trades-deployment
Mar 20, 2026
Merged

docs: rewrite Tasks, Trades, and Deployment sections with accurate APIs#402
MDUYN merged 2 commits into
devfrom
squad/334-docs-tasks-trades-deployment

Conversation

@MDUYN
Copy link
Copy Markdown
Collaborator

@MDUYN MDUYN commented Mar 20, 2026

Summary

Resolves #334 — Documentation Update: Fill in Tasks, Trades, and Deployment Sections.

Documentation Changes

  • tasks.md — Rewrote with real Task class API (time_unit/interval params, @app.task() decorator). Removed fabricated name, cron, and string-based interval parameters that don't exist.
  • trades.md — Documented actual Trade model attributes (opened_at, open_price, net_gain, stop_losses, take_profits) and all Context methods (get_trade, get_open_trades, get_closed_trades, add_stop_loss, add_take_profit, etc.). Removed fake trade.side, trade.fee, trade.created_at.
  • deployment.md — Replaced generic Docker/VPS/YAML content with real CLI deployment commands (iaf init, iaf deploy-aws-lambda, iaf deploy-azure-function) and their actual options.

Code Fixes

  • app.py — Fixed bug in add_strategy() that used non-existent worker_id attribute instead of strategy_id (would crash when adding 3+ strategies).
  • test_eventloop.py — Uncommented and fixed 2 tests (test_initialize, test_get_data_sources_for_iteration). Updated BacktestTradeOrderEvaluator constructor for new required params. Remaining 5 tests stay commented as they require live exchange data.

Test Results

All 163 app tests pass with 0 failures.

MDUYN added 2 commits March 20, 2026 12:49
…Is (#334)

- tasks.md: Replace fabricated examples with real Task class (time_unit/interval)
  and @app.task() decorator usage
- trades.md: Document actual Trade model attributes (opened_at, open_price,
  net_gain) and Context methods (get_trade, get_open_trades, add_stop_loss, etc.)
- deployment.md: Replace generic Docker/VPS content with real CLI commands
  (iaf init, iaf deploy-aws-lambda, iaf deploy-azure-function)
- Fix bug in app.py add_strategy() using non-existent worker_id instead of strategy_id
- Uncomment and fix 2 eventloop tests (test_initialize, test_get_data_sources_for_iteration)
- Update BacktestTradeOrderEvaluator constructor for new required params

Closes #334
- Fix prism-react-renderer import for Docusaurus 3.x compatibility
- Fix sidebar.js: replace missing doc IDs with actual files (data-sources, backtest_data)
- tasks.md: add class-level attribute pattern alongside constructor pattern
- Add show_docs.sh script for running docs locally (with --build option)
@MDUYN MDUYN merged commit 1f6a1c7 into dev Mar 20, 2026
2 checks passed
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