summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrique Joaquim <henriquecjoaquim@gmail.com>2024-05-17 13:50:08 +0100
committerGitHub <noreply@github.com>2024-05-17 12:50:08 +0000
commit7efe96c4d51257a53381534b0b3d3ae778dc31d9 (patch)
treec78ffd20dd0652286a1d90baaff17ebc5db43ab7
parent3df4e058c5c9c27d5608d724203e68e38100504b (diff)
[Feature] Small CLI docs style improvements (#6429)
* use platform cli everywhere * cli w same color as platform * same colors as platform * fix tests
-rw-r--r--cli/README.md4
-rw-r--r--cli/openbb_cli/cli.py2
-rw-r--r--cli/tests/test_controllers_script_parser.py26
-rw-r--r--website/content/cli/_category_.json2
-rw-r--r--website/content/cli/commands-and-arguments.md6
-rw-r--r--website/content/cli/configuration.md4
-rw-r--r--website/content/cli/data-sources.md2
-rw-r--r--website/content/cli/hub.md4
-rw-r--r--website/content/cli/index.md12
-rw-r--r--website/content/cli/installation.md6
-rw-r--r--website/content/cli/interactive-charts.md2
-rw-r--r--website/content/cli/interactive-tables.md4
-rw-r--r--website/content/cli/openbbuserdata.md2
-rw-r--r--website/content/cli/quickstart.md4
-rw-r--r--website/content/cli/routines/advanced-routines.md4
-rw-r--r--website/content/cli/routines/community-routines.md4
-rw-r--r--website/content/cli/routines/index.mdx6
-rw-r--r--website/content/cli/routines/introduction-to-routines.md4
-rw-r--r--website/content/cli/routines/routine-macro-recorder.md2
-rw-r--r--website/content/cli/structure-and-navigation.md4
-rw-r--r--website/pypi.md50
-rw-r--r--website/sidebars.js2
-rw-r--r--website/src/components/General/NewReferenceCard.tsx4
-rw-r--r--website/src/components/General/ReferenceCard.tsx5
-rw-r--r--website/src/theme/DocSidebarItem/Category/index.js2
-rw-r--r--website/src/theme/Navbar/Layout/index.js19
26 files changed, 60 insertions, 126 deletions
diff --git a/cli/README.md b/cli/README.md
index 2ab4656c0fa..8a83b426807 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -10,7 +10,7 @@
## Overview
-The OpenBB CLI is a command line interface that wraps [OpenBB Platform](https://docs.openbb.co/platform).
+The OpenBB Platform CLI is a command line interface that wraps [OpenBB Platform](https://docs.openbb.co/platform).
It offers a convenient way to interact with the OpenBB Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts.
@@ -26,7 +26,7 @@ pip install openbb-cli
> Note: Find the most complete installation hints and tips [here](https://my.openbb.co/app/cli/installation).
-After the installation is complete, you can deploy the OpenBB CLI by running the following command:
+After the installation is complete, you can deploy the OpenBB Platform CLI by running the following command:
```bash
openbb
diff --git a/cli/openbb_cli/cli.py b/cli/openbb_cli/cli.py
index 0d9e3e3d0fd..1937a05d37b 100644
--- a/cli/openbb_cli/cli.py
+++ b/cli/openbb_cli/cli.py
@@ -4,7 +4,7 @@ import sys
def main():
- """Use the main entry point for the OpenBB CLI."""
+ """Use the main entry point for the OpenBB Platform CLI."""
print("Loading...\n") # noqa: T201
# pylint: disable=import-outside-toplevel
diff --git a/cli/tests/test_controllers_script_parser.py b/cli/tests/test_controllers_script_parser.py
index 4363b0d79fe..488eab6b288 100644
--- a/cli/tests/test_controllers_script_parser.py
+++ b/cli/tests/test_controllers_script_parser.py
@@ -27,22 +27,18 @@ def test_is_reset(command, expected):
assert is_reset(command) == expected
-@pytest.mark.parametrize(
- "keyword, expected_date",
- [
- (
- "$LASTFRIDAY",
- (
- datetime.now()
- - timedelta(days=((datetime.now().weekday() - 4) % 7 + 7) % 7)
- ).strftime("%Y-%m-%d"),
- ),
- ],
-)
-def test_match_and_return_openbb_keyword_date(keyword, expected_date):
+def test_match_and_return_openbb_keyword_date():
"""Test the match_and_return_openbb_keyword_date function."""
+ keyword = "$LASTFRIDAY"
result = match_and_return_openbb_keyword_date(keyword)
- assert result == expected_date
+ expected = ""
+ if keyword == "$LASTFRIDAY":
+ today = datetime.now()
+ expected = today - timedelta(days=(today.weekday() + 3) % 7)
+ if expected >= today:
+ expected -= timedelta(days=7)
+ expected = expected.strftime("%Y-%m-%d")
+ assert result == expected
def test_parse_openbb_script_basic():
@@ -100,7 +96,7 @@ def test_date_keyword_last_friday():
"""Test the match_and_return_openbb_keyword_date function."""
today = datetime.now()
last_friday = today - timedelta(days=(today.weekday() - 4 + 7) % 7)
- if last_friday > today:
+ if last_friday >= today:
last_friday -= timedelta(days=7)
expected_date = last_friday.strftime("%Y-%m-%d")
assert match_and_return_openbb_keyword_date("$LASTFRIDAY") == expected_date
diff --git a/website/content/cli/_category_.json b/website/content/cli/_category_.json
index a68e9f9ff3b..e5f25f078df 100644
--- a/website/content/cli/_category_.json
+++ b/website/content/cli/_category_.json
@@ -1,4 +1,4 @@
{
- "label": "OpenBB CLI",
+ "label": "OpenBB Platform CLI",
"position": 2
}
diff --git a/website/content/cli/commands-and-arguments.md b/website/content/cli/commands-and-arguments.md
index 709b73f3bc9..88248043c5b 100644
--- a/website/content/cli/commands-and-arguments.md
+++ b/website/content/cli/commands-and-arguments.md
@@ -1,7 +1,7 @@
---
title: Commands And Arguments
sidebar_position: 4
-description: This page explains how to enter commands and arguments into the OpenBB CLI.
+description: This page explains how to enter commands and arguments into the OpenBB Platform CLI.
keywords:
- help arguments
- auto-complete
@@ -19,7 +19,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Commands And Arguments | OpenBB CLI Docs" />
+<HeadTitle title="Commands And Arguments | OpenBB Platform CLI Docs" />
Commands are displayed on-screen in a lighter colour, compared with menu items, and they will not be prefaced with, `>`.
@@ -43,7 +43,7 @@ Use the auto-complete to prompt choices and reduce the amount of keystrokes requ
## Auto-complete
-The OpenBB CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments.
+The OpenBB Platform CLI is equipped with an auto completion engine that presents choices based on the current menu and command. Whenever you start typing, suggestion prompts will appear for existing commands and menus. When the command contains arguments, pressing the `space bar` after typing the command will present the list of available arguments.
This functionality dramatically reduces the number of key strokes required to perform tasks and, in many cases, eliminates the need to consult the help dialogue for reminders. Choices - where they are bound by a defined list - are scrollable with the up and down arrow keys.
diff --git a/website/content/cli/configuration.md b/website/content/cli/configuration.md
index 360aebae253..9ade9e69d4b 100644
--- a/website/content/cli/configuration.md
+++ b/website/content/cli/configuration.md
@@ -1,7 +1,7 @@
---
title: Configuration & Settings
sidebar_position: 5
-description: This documentation page details the various settings and feature flags used to customize the OpenBB CLI.
+description: This documentation page details the various settings and feature flags used to customize the OpenBB Platform CLI.
keywords:
- Settings Menu
- Feature Flags Menu
@@ -16,7 +16,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Configuration & Settings - | OpenBB CLI Docs" />
+<HeadTitle title="Configuration & Settings - | OpenBB Platform CLI Docs" />
In addition to the OpenBB Platform's `user_settings.json` file, described [here](/platform/usage/settings_and_environment_variables), there are settings and environment variables affecting the CLI only.
diff --git a/website/content/cli/data-sources.md b/website/content/cli/data-sources.md
index f6bd3a0d762..5c9c1a00788 100644
--- a/website/content/cli/data-sources.md
+++ b/website/content/cli/data-sources.md
@@ -19,7 +19,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Data Sources | OpenBB CLI Docs" />
+<HeadTitle title="Data Sources | OpenBB Platform CLI Docs" />
Many commands have multiple data sources associated with it. This page describes how to select from multiple providers.
diff --git a/website/content/cli/hub.md b/website/content/cli/hub.md
index d7e77fd9e63..1906b94415e 100644
--- a/website/content/cli/hub.md
+++ b/website/content/cli/hub.md
@@ -1,7 +1,7 @@
---
title: Hub Synchronization
sidebar_position: 6
-description: This page outlines the `/account` menu within the OpenBB CLI, and integrations with the OpenBB Hub.
+description: This page outlines the `/account` menu within the OpenBB Platform CLI, and integrations with the OpenBB Hub.
keywords:
- OpenBB Platform CLI
- OpenBB Hub
@@ -23,7 +23,7 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
<HeadTitle title="Hub Synchronization | OpenBB Platform CLI Docs" />
-This page outlines the `/account` menu within the OpenBB CLI and integrations with the OpenBB Hub.
+This page outlines the `/account` menu within the OpenBB Platform CLI and integrations with the OpenBB Hub.
## Registration
diff --git a/website/content/cli/index.md b/website/content/cli/index.md
index 8097697a088..524fcb97883 100644
--- a/website/content/cli/index.md
+++ b/website/content/cli/index.md
@@ -1,7 +1,7 @@
---
title: Introduction
sidebar_position: 0
-description: The OpenBB CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts. No experience with Python, or other programming languages, is required.
+description: The OpenBB Platform CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts. No experience with Python, or other programming languages, is required.
keywords:
- OpenBB
- CLI
@@ -18,11 +18,11 @@ keywords:
import NewReferenceCard from "@site/src/components/General/NewReferenceCard";
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="OpenBB CLI Docs" />
+<HeadTitle title="OpenBB Platform CLI Docs" />
## Overview
-The OpenBB CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts.
+The OpenBB Platform CLI is a command line interface wrapping the OpenBB Platform. It offers a convenient way to interact with the Platform and its extensions, as well as automate data collection via OpenBB Routine Scripts.
The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages the extendability of the OpenBB Platform architecture in an easy-to-consume and script format.
@@ -33,17 +33,17 @@ The CLI is the next iteration of the [OpenBB Terminal](/terminal), and leverages
<ul className="grid grid-cols-1 gap-4 -ml-6">
<NewReferenceCard
title="Installation"
- description="An installation guide for the OpenBB CLI."
+ description="An installation guide for the OpenBB Platform CLI."
url="cli/installation"
/>
<NewReferenceCard
title="Quick Start"
- description="A quick start guide for the OpenBB CLI."
+ description="A quick start guide for the OpenBB Platform CLI."
url="cli/quickstart"
/>
<NewReferenceCard
title="Configuration & Settings"
- description="An explanation of the settings and environment variables that customize the look and feel of the OpenBB CLI."
+ description="An explanation of the settings and environment variables that customize the look and feel of the OpenBB Platform CLI."
url="cli/configuration"
/>
<NewReferenceCard
diff --git a/website/content/cli/installation.md b/website/content/cli/installation.md
index 67056410d79..b26cb516659 100644
--- a/website/content/cli/installation.md
+++ b/website/content/cli/installation.md
@@ -1,7 +1,7 @@
---
title: Installation
sidebar_position: 2
-description: This page provides installation instructions for the OpenBB CLI.
+description: This page provides installation instructions for the OpenBB Platform CLI.
keywords:
- OpenBB Platform
- Python
@@ -14,11 +14,11 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Installation | OpenBB CLI Docs" />
+<HeadTitle title="Installation | OpenBB Platform CLI Docs" />
## Pre-Requisites
-The OpenBB CLI is a wrapper around the [Platform](/platform), and should be installed along side an existing OpenBB installation.
+The OpenBB Platform CLI is a wrapper around the [Platform](/platform), and should be installed along side an existing OpenBB installation.
- A Python virtual environment with a version between 3.9 and 3.11, inclusive, is required.
diff --git a/website/content/cli/interactive-charts.md b/website/content/cli/interactive-charts.md
index efd7438808e..2188ae39ea5 100644
--- a/website/content/cli/interactive-charts.md
+++ b/website/content/cli/interactive-charts.md
@@ -21,7 +21,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Interactive Charts - | OpenBB CLI Docs" />
+<HeadTitle title="Interactive Charts - | OpenBB Platform CLI Docs" />
Interactive charts open in a separate window ([PyWry](https://github.com/OpenBB-finance/pywry)). The OpenBB charting library provides interactive and highly customizable charts.
diff --git a/website/content/cli/interactive-tables.md b/website/content/cli/interactive-tables.md
index 1399576b360..4eb7d2a7807 100644
--- a/website/content/cli/interactive-tables.md
+++ b/website/content/cli/interactive-tables.md
@@ -18,13 +18,13 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Interactive Tables - | OpenBB CLI Docs" />
+<HeadTitle title="Interactive Tables - | OpenBB Platform CLI Docs" />
Interactive tables open in a separate window ([PyWry](https://github.com/OpenBB-finance/pywry)). These provide methods for searching, sorting, filtering, exporting and even adapting settings directly on the table.
:::tip
-All OpenBB CLI results are displayed in interactive tables by default, unless the interactive model is disabled from the `/settings` menu.
+All OpenBB Platform CLI results are displayed in interactive tables by default, unless the interactive model is disabled from the `/settings` menu.
:::
<details>
diff --git a/website/content/cli/openbbuserdata.md b/website/content/cli/openbbuserdata.md
index 036731b1936..3ab4a2b02f2 100644
--- a/website/content/cli/openbbuserdata.md
+++ b/website/content/cli/openbbuserdata.md
@@ -18,7 +18,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="OpenBBUserData Folder | OpenBB CLI Docs" />
+<HeadTitle title="OpenBBUserData Folder | OpenBB Platform CLI Docs" />
The OpenBBUserData folder is where exports, routines, and other user-related content is saved and stored.
diff --git a/website/content/cli/quickstart.md b/website/content/cli/quickstart.md
index ef984108731..ce641dc23a3 100644
--- a/website/content/cli/quickstart.md
+++ b/website/content/cli/quickstart.md
@@ -1,7 +1,7 @@
---
title: Quick Start
sidebar_position: 2
-description: This page is a quick start guide for the OpenBB CLI.
+description: This page is a quick start guide for the OpenBB Platform CLI.
keywords:
- quickstart
- quick start
@@ -12,7 +12,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Quick Start - Usage | OpenBB CLI Docs" />
+<HeadTitle title="Quick Start - Usage | OpenBB Platform CLI Docs" />
## Launch
diff --git a/website/content/cli/routines/advanced-routines.md b/website/content/cli/routines/advanced-routines.md
index deb5988eb0e..0ada9ac543d 100644
--- a/website/content/cli/routines/advanced-routines.md
+++ b/website/content/cli/routines/advanced-routines.md
@@ -1,7 +1,7 @@
---
title: Advanced Routines
sidebar_position: 5
-description: This page provides guidance on creating and running advanced workflows in the OpenBB CLI by
+description: This page provides guidance on creating and running advanced workflows in the OpenBB Platform CLI by
introducing variables and arguments for routines. It explains input variables,
relative time keyword variables, internal script variables and creating loops for
batch execution.
@@ -21,7 +21,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Advanced Routines - Routines | OpenBB CLI Docs" />
+<HeadTitle title="Advanced Routines - Routines | OpenBB Platform CLI Docs" />
## Input Variables
diff --git a/website/content/cli/routines/community-routines.md b/website/content/cli/routines/community-routines.md
index 1fa10fcdd04..c149ccbaff0 100644
--- a/website/content/cli/routines/community-routines.md
+++ b/website/content/cli/routines/community-routines.md
@@ -18,11 +18,11 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Community Routines - Routines - | OpenBB CLI Docs" />
+<HeadTitle title="Community Routines - Routines - | OpenBB Platform CLI Docs" />
## Overview
-Community Routines are a feature of the [OpenBB Hub](https://my.openbb.co) that provides methods for creating, editing and sharing OpenBB CLI scripts in the cloud.
+Community Routines are a feature of the [OpenBB Hub](https://my.openbb.co) that provides methods for creating, editing and sharing OpenBB Platform CLI scripts in the cloud.
Users can create routines that are private or public, with public routines able to run directly from a URL.
diff --git a/website/content/cli/routines/index.mdx b/website/content/cli/routines/index.mdx
index cf5947ef80a..9ed2703064c 100644
--- a/website/content/cli/routines/index.mdx
+++ b/website/content/cli/routines/index.mdx
@@ -5,7 +5,7 @@ title: Routines
import NewReferenceCard from "@site/src/components/General/NewReferenceCard";
import HeadTitle from "@site/src/components/General/HeadTitle.tsx";
-<HeadTitle title="Routines - | OpenBB CLI Docs" />
+<HeadTitle title="Routines - | OpenBB Platform CLI Docs" />
<ul className="grid grid-cols-1 gap-4 -ml-6">
<NewReferenceCard
@@ -25,7 +25,7 @@ import HeadTitle from "@site/src/components/General/HeadTitle.tsx";
/>
<NewReferenceCard
title="Advanced Routines"
- description="Become an OpenBB CLI power user by understanding routines inputs, setting variables, creating loops and more."
+ description="Become an OpenBB Platform CLI power user by understanding routines inputs, setting variables, creating loops and more."
url="routines/advanced-routines"
/>
-</ul> \ No newline at end of file
+</ul>
diff --git a/website/content/cli/routines/introduction-to-routines.md b/website/content/cli/routines/introduction-to-routines.md
index 7eaf8ecd973..d629ebe8cee 100644
--- a/website/content/cli/routines/introduction-to-routines.md
+++ b/website/content/cli/routines/introduction-to-routines.md
@@ -19,7 +19,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Introduction to Routines - Routines | OpenBB CLI Docs" />
+<HeadTitle title="Introduction to Routines - Routines | OpenBB Platform CLI Docs" />
## Overview
@@ -29,7 +29,7 @@ Other software like STATA, SPSS, and R-Studio share similar functionality in the
Routines make it easy to automate a series of processes, and this includes mining and dumping large amounts of data to organized spreadsheets. Making use of `--export` and `--sheet-name`, data collection is more efficient and reliable, with results that are easily replicable.
-A pipeline of commands is difficult to share, so to encourage users to share ideas and processes, we created [Community Routines](community-routines.md) for the [OpenBB Hub](https://my.openbb.co/). Routines can be created, stored, and shared - executable in any OpenBB CLI installation, by URL.
+A pipeline of commands is difficult to share, so to encourage users to share ideas and processes, we created [Community Routines](community-routines.md) for the [OpenBB Hub](https://my.openbb.co/). Routines can be created, stored, and shared - executable in any OpenBB Platform CLI installation, by URL.
## Pipeline of Commands
diff --git a/website/content/cli/routines/routine-macro-recorder.md b/website/content/cli/routines/routine-macro-recorder.md
index 2221b7d8d34..38b25137882 100644
--- a/website/content/cli/routines/routine-macro-recorder.md
+++ b/website/content/cli/routines/routine-macro-recorder.md
@@ -21,7 +21,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Routine Macro Recorder - Routines - Usage | OpenBB CLI Docs" />
+<HeadTitle title="Routine Macro Recorder - Routines - Usage | OpenBB Platform CLI Docs" />
OpenBB script routines can be captured with the macro recorder, controlled with global commands. Enter, `record`, to start saving commands, and then, `stop`, terminates the recording. This means that any command you run will be captured in the script; and on `stop`, it will be saved to the `~/OpenBBUserData/routines/` folder.
diff --git a/website/content/cli/structure-and-navigation.md b/website/content/cli/structure-and-navigation.md
index bcb6f6d840e..089438bad2f 100644
--- a/website/content/cli/structure-and-navigation.md
+++ b/website/content/cli/structure-and-navigation.md
@@ -1,7 +1,7 @@
---
title: Structure and Navigation
sidebar_position: 3
-description: This page describes the layout and structure of the OpenBB CLI, as well as how to navigate it.
+description: This page describes the layout and structure of the OpenBB Platform CLI, as well as how to navigate it.
keywords:
- CLI application
- OpenBB Platform CLI
@@ -18,7 +18,7 @@ keywords:
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
-<HeadTitle title="Structure and Navigation | OpenBB CLI Docs" />
+<HeadTitle title="Structure and Navigation | OpenBB Platform CLI Docs" />
## Structure
diff --git a/website/pypi.md b/website/pypi.md
deleted file mode 100644
index e5600a1b8bf..00000000000
--- a/