From 8118325f0925ab0d40efe15bb14da9ebcf07b07c Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Tue, 3 Oct 2023 18:59:59 +0100 Subject: [PATCH 01/14] pointing to platform --- .github/workflows/api-integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index 313b65ea060..de2a2946904 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -90,7 +90,7 @@ jobs: - name: Run Integration Tests run: | - pytest -m integration + pytest ${{ github.workspace }}/openbb_platform -m integration # - name: Upload summary to Slack # uses: adrey/slack-file-upload-action@master From 2174adf597a37bebf380d646220c973bee268180 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:15:15 +0200 Subject: [PATCH 02/14] Add requests --- .github/workflows/api-integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index de2a2946904..7eb3b2b58fa 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -47,7 +47,7 @@ jobs: - name: Install Python Dependencies run: | - pip install toml pytest uvicorn importlib-metadata + pip install toml pytest uvicorn importlib-metadata requests # - name: Load cached venv # id: cached-poetry-dependencies From 56dbf0735cd5654d66609231c9ce347c2d38a634 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:23:23 +0200 Subject: [PATCH 03/14] Specify path --- .github/workflows/api-integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index 7eb3b2b58fa..c69f2b72159 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -59,7 +59,7 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | - python openbb_platform/dev_install.py -e + python ${{ github.workspace }}/.openbb_platform/dev_install.py -e - name: Populate System Setting Files run: | From a4117aece393f3b8f2edc4df5ff68e5b7312fef6 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:25:06 +0200 Subject: [PATCH 04/14] Change Path --- .github/workflows/api-integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index c69f2b72159..523a05299db 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -59,7 +59,7 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | - python ${{ github.workspace }}/.openbb_platform/dev_install.py -e + python ${{ github.workspace }}/openbb_platform/dev_install.py -e - name: Populate System Setting Files run: | From 70e30eb3b00946f0b3e2a4986618383334eb9c4c Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:35:49 +0200 Subject: [PATCH 05/14] Activate envs --- .github/workflows/api-integration-test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index 523a05299db..f030a770b98 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -47,6 +47,7 @@ jobs: - name: Install Python Dependencies run: | + source .venv/bin/activate pip install toml pytest uvicorn importlib-metadata requests # - name: Load cached venv @@ -59,6 +60,7 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | + source .venv/bin/activate python ${{ github.workspace }}/openbb_platform/dev_install.py -e - name: Populate System Setting Files @@ -82,14 +84,15 @@ jobs: - name: Launch the Uvicorn Process run: | + source .venv/bin/activate uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & - name: Wait for 1 minute - run: | - sleep 60 + run: sleep 60 - name: Run Integration Tests run: | + source .venv/bin/activate pytest ${{ github.workspace }}/openbb_platform -m integration # - name: Upload summary to Slack From 3d21fc86ff67a0988d36103632932b37794184c2 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:40:09 +0200 Subject: [PATCH 06/14] Configure Poetry --- .github/workflows/api-integration-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index f030a770b98..b824b2b12c4 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -45,6 +45,9 @@ jobs: virtualenvs-create: true virtualenvs-in-project: true + - name: Configure Poetry + run: poetry config virtualenvs.in-project true + - name: Install Python Dependencies run: | source .venv/bin/activate From 622199833b26c4934a6c20ac593b00b3f05536e9 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:43:42 +0200 Subject: [PATCH 07/14] Specify Poetry Path --- .github/workflows/api-integration-test.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index b824b2b12c4..f6f4a712c2f 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -50,7 +50,7 @@ jobs: - name: Install Python Dependencies run: | - source .venv/bin/activate + source $(poetry env info --path)/bin/activate pip install toml pytest uvicorn importlib-metadata requests # - name: Load cached venv @@ -63,7 +63,6 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | - source .venv/bin/activate python ${{ github.workspace }}/openbb_platform/dev_install.py -e - name: Populate System Setting Files @@ -87,7 +86,6 @@ jobs: - name: Launch the Uvicorn Process run: | - source .venv/bin/activate uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & - name: Wait for 1 minute @@ -95,7 +93,6 @@ jobs: - name: Run Integration Tests run: | - source .venv/bin/activate pytest ${{ github.workspace }}/openbb_platform -m integration # - name: Upload summary to Slack From 40d6de46bf4c132777a29474c4534567b9a4b8fa Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:48:27 +0200 Subject: [PATCH 08/14] Poetry install --- .github/workflows/api-integration-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index f6f4a712c2f..60b0a1c3336 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -48,6 +48,9 @@ jobs: - name: Configure Poetry run: poetry config virtualenvs.in-project true + - name: Install Dependencies with Poetry + run: poetry install -C ${{ github.workspace }}/openbb_platform -E all + - name: Install Python Dependencies run: | source $(poetry env info --path)/bin/activate From d46799d81e5cdc4882355e198c930243f100f6cf Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 20:56:28 +0200 Subject: [PATCH 09/14] Run uvicorn with Poetry --- .github/workflows/api-integration-test.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index 60b0a1c3336..d444ee90748 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -48,12 +48,9 @@ jobs: - name: Configure Poetry run: poetry config virtualenvs.in-project true - - name: Install Dependencies with Poetry - run: poetry install -C ${{ github.workspace }}/openbb_platform -E all - - name: Install Python Dependencies + # source $(poetry env info --path)/bin/activate run: | - source $(poetry env info --path)/bin/activate pip install toml pytest uvicorn importlib-metadata requests # - name: Load cached venv @@ -89,7 +86,7 @@ jobs: - name: Launch the Uvicorn Process run: | - uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & + poetry run uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & - name: Wait for 1 minute run: sleep 60 From 05a0197ac36746f725c945622299681c33c9da97 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:05:27 +0200 Subject: [PATCH 10/14] Poetry install --- .github/workflows/api-integration-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index d444ee90748..f9b4d8cf916 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -62,8 +62,9 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + # python ${{ github.workspace }}/openbb_platform/dev_install.py -e run: | - python ${{ github.workspace }}/openbb_platform/dev_install.py -e + poetry install ${{ github.workspace }}/openbb_platform/. - name: Populate System Setting Files run: | From 5234be544f5d2fe2d1fbd1c505ec25dd48f40642 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:07:14 +0200 Subject: [PATCH 11/14] Update --- .github/workflows/api-integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index f9b4d8cf916..155c6b2ac9c 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -64,7 +64,7 @@ jobs: # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' # python ${{ github.workspace }}/openbb_platform/dev_install.py -e run: | - poetry install ${{ github.workspace }}/openbb_platform/. + poetry install ${{ github.workspace }}/openbb_platform/ - name: Populate System Setting Files run: | From b9ca1a2e9c9e4219d7d9f9ac49796b7aa107bd66 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:14:17 +0200 Subject: [PATCH 12/14] Last try before revert --- .github/workflows/api-integration-test.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index 155c6b2ac9c..8f69906e640 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -45,12 +45,13 @@ jobs: virtualenvs-create: true virtualenvs-in-project: true - - name: Configure Poetry - run: poetry config virtualenvs.in-project true + # - name: Configure Poetry + # run: poetry config virtualenvs.in-project true - name: Install Python Dependencies # source $(poetry env info --path)/bin/activate run: | + poetry shell pip install toml pytest uvicorn importlib-metadata requests # - name: Load cached venv @@ -62,9 +63,9 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - # python ${{ github.workspace }}/openbb_platform/dev_install.py -e run: | - poetry install ${{ github.workspace }}/openbb_platform/ + poetry shell + python ${{ github.workspace }}/openbb_platform/dev_install.py -e - name: Populate System Setting Files run: | @@ -87,13 +88,15 @@ jobs: - name: Launch the Uvicorn Process run: | - poetry run uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & + poetry shell + uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & - name: Wait for 1 minute run: sleep 60 - name: Run Integration Tests run: | + poetry shell pytest ${{ github.workspace }}/openbb_platform -m integration # - name: Upload summary to Slack From 5f89c46327838b0c32b90a5c645b67b5a7899787 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:17:14 +0200 Subject: [PATCH 13/14] revert --- .github/workflows/api-integration-test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index 8f69906e640..c92775a87ca 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -51,7 +51,6 @@ jobs: - name: Install Python Dependencies # source $(poetry env info --path)/bin/activate run: | - poetry shell pip install toml pytest uvicorn importlib-metadata requests # - name: Load cached venv @@ -64,7 +63,6 @@ jobs: - name: Install obb Dependencies # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | - poetry shell python ${{ github.workspace }}/openbb_platform/dev_install.py -e - name: Populate System Setting Files @@ -88,7 +86,6 @@ jobs: - name: Launch the Uvicorn Process run: | - poetry shell uvicorn openbb_core.api.rest_api:app --host 0.0.0.0 --port 8000 --reload & - name: Wait for 1 minute @@ -96,7 +93,6 @@ jobs: - name: Run Integration Tests run: | - poetry shell pytest ${{ github.workspace }}/openbb_platform -m integration # - name: Upload summary to Slack From 26e940b5037a604547f25df0881ad64a0dcb1262 Mon Sep 17 00:00:00 2001 From: Luqman Date: Wed, 4 Oct 2023 09:44:43 +0100 Subject: [PATCH 14/14] testing conda --- .github/workflows/api-integration-test.yml | 36 ++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/api-integration-test.yml b/.github/workflows/api-integration-test.yml index c92775a87ca..d1c11e75fff 100644 --- a/.github/workflows/api-integration-test.yml +++ b/.github/workflows/api-integration-test.yml @@ -32,24 +32,35 @@ jobs: if: github.event_name == 'pull_request' run: git fetch origin ${{ github.event.pull_request.head.ref }} && git checkout FETCH_HEAD - - name: Setup Python 3.9 - uses: actions/setup-python@v4 - with: - python-version: "3.9" - architecture: x64 + # - name: Setup Python 3.9 + # uses: actions/setup-python@v4 + # with: + # python-version: "3.9" + # architecture: x64 - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - version: 1.4.0 - virtualenvs-create: true - virtualenvs-in-project: true + # - name: Install Poetry + # uses: snok/install-poetry@v1 + # with: + # version: 1.4.0 + # virtualenvs-create: true + # virtualenvs-in-project: true + + - name: Setup Conda + run: | + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + bash miniconda.sh -b -p $HOME/miniconda + echo "$HOME/miniconda/bin" >> $GITHUB_PATH + + - name: Create and Activate Conda Environment + run: | + conda create -n obb-38 python=3.8 -y + echo "conda activate obb-38" >> ~/.bashrc + source ~/.bashrc # - name: Configure Poetry # run: poetry config virtualenvs.in-project true - name: Install Python Dependencies - # source $(poetry env info --path)/bin/activate run: | pip install toml pytest uvicorn importlib-metadata requests @@ -61,7 +72,6 @@ jobs: # key: venv-${{ runner.os }}-v1-${{ hashFiles('**/poetry.lock', '**/dev_install.py') }} - name: Install obb Dependencies - # if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: | python ${{ github.workspace }}/openbb_platform/dev_install.py -e