Skip to content

Commit 1f6a1c7

Browse files
authored
Merge pull request #402 from coding-kitties/squad/334-docs-tasks-trades-deployment
docs: rewrite Tasks, Trades, and Deployment sections with accurate APIs
2 parents 581d1d4 + 3bcca93 commit 1f6a1c7

8 files changed

Lines changed: 759 additions & 1638 deletions

File tree

docusaurus/docs/Getting Started/deployment.md

Lines changed: 131 additions & 453 deletions
Large diffs are not rendered by default.

docusaurus/docs/Getting Started/tasks.md

Lines changed: 156 additions & 531 deletions
Large diffs are not rendered by default.

docusaurus/docs/Getting Started/trades.md

Lines changed: 189 additions & 398 deletions
Large diffs are not rendered by default.

docusaurus/docusaurus.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github');
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
4+
const {themes} = require('prism-react-renderer');
5+
const lightCodeTheme = themes.github;
6+
const darkCodeTheme = themes.dracula;
67

78
/** @type {import('@docusaurus/types').Config} */
89
const config = {

docusaurus/sidebar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ const sidebars = {
6161
},
6262
{
6363
type: 'doc',
64-
id: 'Data/market-data-sources',
64+
id: 'Data/data-sources',
6565
},
6666
{
6767
type: 'doc',
68-
id: 'Data/multiple-market-data-sources',
68+
id: 'Data/backtest_data',
6969
},
7070
],
7171
},

investing_algorithm_framework/app/app.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,11 +2124,10 @@ def add_strategy(self, strategy, throw_exception=True) -> None:
21242124

21252125
has_duplicates = False
21262126

2127-
for i in range(len(self._strategies)):
2128-
for j in range(i + 1, len(self._strategies)):
2129-
if self._strategies[i].worker_id == strategy.worker_id:
2130-
has_duplicates = True
2131-
break
2127+
for existing_strategy in self._strategies:
2128+
if existing_strategy.strategy_id == strategy.strategy_id:
2129+
has_duplicates = True
2130+
break
21322131

21332132
if has_duplicates:
21342133
raise OperationalException(

show_docs.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
cd "$(dirname "$0")/docusaurus"
5+
6+
if [ ! -d "node_modules" ]; then
7+
echo "Installing dependencies..."
8+
npm install
9+
fi
10+
11+
if [ "$1" = "--build" ] || [ "$1" = "-b" ]; then
12+
echo "Building docs..."
13+
npm run build
14+
echo "Serving built docs..."
15+
npm run serve
16+
else
17+
echo "Starting Docusaurus dev server..."
18+
npm start
19+
fi

0 commit comments

Comments
 (0)