From d56854a8248ac2f375ca7a1f42100f520dbd00c5 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Wed, 2 Aug 2023 23:37:41 -0700 Subject: [PATCH 01/11] Update all_api_keys.json --- openbb_terminal/miscellaneous/models/all_api_keys.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbb_terminal/miscellaneous/models/all_api_keys.json b/openbb_terminal/miscellaneous/models/all_api_keys.json index 9356f255b5ae..d9abe8d6dc97 100644 --- a/openbb_terminal/miscellaneous/models/all_api_keys.json +++ b/openbb_terminal/miscellaneous/models/all_api_keys.json @@ -273,6 +273,6 @@ "name": "API_BIZTOC_TOKEN", "source": "BizToc", "link": "https://biztoc.com", - "markdown": "The BizToc API is hosted on RapidAPI. To set up, go to: https://rapidapi.com/thma/api/biztoc.\n\n![biztoc0](https://github.com/marban/OpenBBTerminal/assets/18151143/04cdd423-f65e-4ad8-ad5a-4a59b0f5ddda)\n\nIn the top right, select 'Sign Up'. After answering some questions, you will be prompted to select one of their plans.\n\n![biztoc1](https://github.com/marban/OpenBBTerminal/assets/18151143/9f3b72ea-ded7-48c5-aa33-bec5c0de8422)\n\nAfter signing up, navigate back to https://rapidapi.com/thma/api/biztoc. If you are logged in, you will see a header called X-RapidAPI-Key.\n\n![biztoc2](https://github.com/marban/OpenBBTerminal/assets/18151143/0f3b6c91-07e0-447a-90cd-a9e23522929f)", - }, + "markdown": "The BizToc API is hosted on RapidAPI. To set up, go to: https://rapidapi.com/thma/api/biztoc.\n\n![biztoc0](https://github.com/marban/OpenBBTerminal/assets/18151143/04cdd423-f65e-4ad8-ad5a-4a59b0f5ddda)\n\nIn the top right, select 'Sign Up'. After answering some questions, you will be prompted to select one of their plans.\n\n![biztoc1](https://github.com/marban/OpenBBTerminal/assets/18151143/9f3b72ea-ded7-48c5-aa33-bec5c0de8422)\n\nAfter signing up, navigate back to https://rapidapi.com/thma/api/biztoc. If you are logged in, you will see a header called X-RapidAPI-Key.\n\n![biztoc2](https://github.com/marban/OpenBBTerminal/assets/18151143/0f3b6c91-07e0-447a-90cd-a9e23522929f)" + } ] From 7227ff2171024aba2cfd3256cd464882f0fb72b6 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Wed, 2 Aug 2023 23:52:26 -0700 Subject: [PATCH 02/11] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 06564d174ff8..d2b90393c389 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1213,7 +1213,7 @@ In order to do that, you'll simply need to choose from one the following files: 2. [hub_credentials.json](openbb_terminal/miscellaneous/models/hub_credentials.json) --> credentials that should be stored in the [OpenBB Hub](https://my.openbb.co/) like API keys to access your favorite providers. Then just update [all_api_keys.json](openbb_terminal/miscellaneous/models/all_api_keys.json) with the instructions to get -the api key from the data source website. +the api key from the data source website. Make sure that this file has the correct `.json` format, otherwise the API keys page in the Hub will break (e.g. in json the last element key-value pair shouldn't be followed by a comma, and the last object in a list of dictionaries should also not be followed by a comma). > Note: By differentiating between local and hub credentials, we can ensure that the user's credentials are not pushed to the [OpenBB Hub](https://my.openbb.co/) and are only stored locally. This does not mean that the credentials are not secure in the OpenBB Hub, but rather that the user can choose to store them locally if they wish. From 0c569c029d5a9b435b17562aa74e894e75c59a0c Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Thu, 3 Aug 2023 00:37:19 -0700 Subject: [PATCH 03/11] Create json-yaml-validate --- .github/workflows/json-yaml-validate | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/json-yaml-validate diff --git a/.github/workflows/json-yaml-validate b/.github/workflows/json-yaml-validate new file mode 100644 index 000000000000..0dc08425c7ae --- /dev/null +++ b/.github/workflows/json-yaml-validate @@ -0,0 +1,22 @@ +name: json-yaml-validate +on: + push: + branches: + - develop + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +jobs: + json-yaml-validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: json-yaml-validate + id: json-yaml-validate + uses: GrantBirki/json-yaml-validate@v2.0.0 From da1552744fe5c9c804c1cd14982db04ae283da45 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Thu, 3 Aug 2023 00:37:53 -0700 Subject: [PATCH 04/11] Update release-drafter.yml --- .github/release-drafter.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 1d002032d50f..0a7760080493 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -3,21 +3,16 @@ tag-template: 'v$NEXT_MINOR_VERSION' exclude-contributors: - 'jmaslek' - 'DidierRLopes' - - 'JerBouma' - 'deeleeramone' - 'hjoaquim' - 'jose-donato' - 'luqmanbello' - - 'martinb-bb' - 'montezdesousa' - 'tehcoderer' - - 'Chavithra' - 'colin99d' - - 'northern-64bit' - 'piiq' - 'andrewkenreich' - 'IgorWounds' - - 'jerryduluk' - 'minhhoang1023' template: | From 3b2ee13c9f0dbe45f43c85067558b37b136871f5 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Thu, 3 Aug 2023 07:22:57 -0700 Subject: [PATCH 05/11] Update json-yaml-validate --- .github/workflows/json-yaml-validate | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/json-yaml-validate b/.github/workflows/json-yaml-validate index 0dc08425c7ae..d00141f87b20 100644 --- a/.github/workflows/json-yaml-validate +++ b/.github/workflows/json-yaml-validate @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - develop workflow_dispatch: permissions: From 20a33e0eefa90c18a07c9003b631e8e42f36d553 Mon Sep 17 00:00:00 2001 From: James Maslek Date: Thu, 3 Aug 2023 10:39:16 -0400 Subject: [PATCH 06/11] fix test --- .../json/test_options_chains_model/test_OptionsChains_8.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/openbb_terminal/stocks/options/json/test_options_chains_model/test_OptionsChains_8.json b/tests/openbb_terminal/stocks/options/json/test_options_chains_model/test_OptionsChains_8.json index fdf60ae6e893..4f9d4a25da65 100644 --- a/tests/openbb_terminal/stocks/options/json/test_options_chains_model/test_OptionsChains_8.json +++ b/tests/openbb_terminal/stocks/options/json/test_options_chains_model/test_OptionsChains_8.json @@ -1 +1 @@ -["Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread", "Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread", "Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread", "Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread"] \ No newline at end of file +["Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread", "Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread", "Long Straddle", "Long Strangle", "Long Strangle", "Long Strangle", "Bull Call Spread", "Bear Put Spread"] \ No newline at end of file From 42a9565fe055935f5e9fc57269b478128ec27992 Mon Sep 17 00:00:00 2001 From: James Maslek Date: Thu, 3 Aug 2023 10:47:02 -0400 Subject: [PATCH 07/11] add json lint to general --- .github/workflows/json-yaml-validate | 23 ----------------------- .github/workflows/linting.yml | 10 ++++++++++ 2 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/json-yaml-validate diff --git a/.github/workflows/json-yaml-validate b/.github/workflows/json-yaml-validate deleted file mode 100644 index d00141f87b20..000000000000 --- a/.github/workflows/json-yaml-validate +++ /dev/null @@ -1,23 +0,0 @@ -name: json-yaml-validate -on: - push: - branches: - - develop - pull_request: - branches: - - main - - develop - workflow_dispatch: - -permissions: - contents: read - -jobs: - json-yaml-validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: json-yaml-validate - id: json-yaml-validate - uses: GrantBirki/json-yaml-validate@v2.0.0 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9aa4664b09c6..6aeb5259a484 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -63,3 +63,13 @@ jobs: uses: docker://avtodev/markdown-lint:v1 with: args: "./*.md ./changelogs/*.md ./openbb_terminal/**/*.md ./discordbot/**/*.md" + + json-yaml-validate: + name: JSON Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: json-yaml-validate + id: json-yaml-validate + uses: GrantBirki/json-yaml-validate@v2.0.0 \ No newline at end of file From 16a681041ba7e1a54a0d9964a4bd74311061e9a9 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Thu, 3 Aug 2023 07:54:56 -0700 Subject: [PATCH 08/11] Update tsconfig.json --- website/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/website/tsconfig.json b/website/tsconfig.json index 6f4756980d4d..57bbce401d6a 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,5 +1,4 @@ { - // This file is not used in compilation. It is here just for a nice editor experience. "extends": "@tsconfig/docusaurus/tsconfig.json", "compilerOptions": { "baseUrl": "." From d203a6b3b59007bbeeab28212e6b597081db22c0 Mon Sep 17 00:00:00 2001 From: James Maslek Date: Thu, 3 Aug 2023 11:01:42 -0400 Subject: [PATCH 09/11] Add a json_validate exclude to not check tests and certain known violations --- .github/workflows/linting.yml | 3 ++- json_validate_exclude.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 json_validate_exclude.txt diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 6aeb5259a484..292723612e47 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -72,4 +72,5 @@ jobs: - name: json-yaml-validate id: json-yaml-validate - uses: GrantBirki/json-yaml-validate@v2.0.0 \ No newline at end of file + uses: GrantBirki/json-yaml-validate@v2.0.0 + exclude_file: json_validate_exclude.txt \ No newline at end of file diff --git a/json_validate_exclude.txt b/json_validate_exclude.txt new file mode 100644 index 000000000000..db0eb7a9caf7 --- /dev/null +++ b/json_validate_exclude.txt @@ -0,0 +1,3 @@ +./tests/ +./openbb_terminal/miscellaneous/gpt_index/index_0.4.json +./.devcontainer/devcontainer.json \ No newline at end of file From ca7545a45b3a1e5110dc973aa6c09b26ce9a1f9f Mon Sep 17 00:00:00 2001 From: James Maslek Date: Thu, 3 Aug 2023 11:07:03 -0400 Subject: [PATCH 10/11] fix workflow --- .github/workflows/linting.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 292723612e47..4c1dae15afef 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -73,4 +73,5 @@ jobs: - name: json-yaml-validate id: json-yaml-validate uses: GrantBirki/json-yaml-validate@v2.0.0 - exclude_file: json_validate_exclude.txt \ No newline at end of file + with: + exclude_file: json_validate_exclude.txt \ No newline at end of file From 64019f252e5b10f34f401958a5cf552206ab19b2 Mon Sep 17 00:00:00 2001 From: James Maslek Date: Thu, 3 Aug 2023 11:11:10 -0400 Subject: [PATCH 11/11] not sure why this didnt exclude? --- json_validate_exclude.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json_validate_exclude.txt b/json_validate_exclude.txt index db0eb7a9caf7..da93f0e08ad6 100644 --- a/json_validate_exclude.txt +++ b/json_validate_exclude.txt @@ -1,3 +1,3 @@ -./tests/ -./openbb_terminal/miscellaneous/gpt_index/index_0.4.json -./.devcontainer/devcontainer.json \ No newline at end of file +tests/ +openbb_terminal/miscellaneous/gpt_index/index_0.4.json +.devcontainer/devcontainer.json \ No newline at end of file