Skip to content

Commit

Permalink
Merge main with the feature branch
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-qb committed Nov 28, 2024
2 parents d91a151 + ca1db8a commit 0bf501c
Show file tree
Hide file tree
Showing 51 changed files with 717 additions and 654 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Create artifacts and slack notifications"
description: "Creates failed artifacts with screenshots and sends slack notifications if build failed"

runs:
using: "composite"
steps:
- name: Copy failed screenshots
shell: bash
run: |
mkdir /home/runner/work/vizro/vizro/vizro-core/failed_screenshots/
cd /home/runner/work/vizro/vizro/vizro-core/
cp *.png failed_screenshots
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: Failed screenshots
path: |
/home/runner/work/vizro/vizro/vizro-core/failed_screenshots/*.png
- name: Send custom JSON data to Slack
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"text": "${{ env.TESTS_NAME }} build result: ${{ job.status }}\nBranch: ${{ github.head_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
45 changes: 45 additions & 0 deletions .github/workflows/test-e2e-component-library-vizro-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: e2e tests of component library for Vizro

defaults:
run:
working-directory: vizro-core

on:
push:
branches: [main]
pull_request:
branches:
- main

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: "3.12"

jobs:
test-e2e-component-library-vizro-core:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Hatch
run: pip install hatch

- name: Show dependency tree
run: hatch run pip tree

- name: Run e2e component library tests
run: hatch run test-e2e-component-library

- name: Create artifacts and slack notifications
if: failure()
uses: ./.github/actions/failed-artifacts-and-slack-notifications
env:
TESTS_NAME: Vizro e2e component library tests
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
4 changes: 0 additions & 4 deletions .github/workflows/vizro-qa-tests-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
include:
- label: integration tests
- label: vizro-ai ui tests
- label: component library tests
steps:
- name: Passed fork step
run: echo "Success!"
Expand All @@ -36,7 +35,6 @@ jobs:
include:
- label: integration tests
- label: vizro-ai ui tests
- label: component library tests
steps:
- uses: actions/checkout@v4
- name: Tests trigger
Expand All @@ -48,8 +46,6 @@ jobs:
export INPUT_WORKFLOW_FILE_NAME=${{ secrets.VIZRO_QA_INTEGRATION_TESTS_WORKFLOW }}
elif [ "${{ matrix.label }}" == "vizro-ai ui tests" ]; then
export INPUT_WORKFLOW_FILE_NAME=${{ secrets.VIZRO_QA_VIZRO_AI_UI_TESTS_WORKFLOW }}
elif [ "${{ matrix.label }}" == "component library tests" ]; then
export INPUT_WORKFLOW_FILE_NAME=${{ secrets.VIZRO_QA_VIZRO_COMPONENT_LIBRARY_TESTS_WORKFLOW }}
fi
export INPUT_GITHUB_TOKEN=${{ secrets.VIZRO_SVC_PAT }}
export INPUT_REF=main # because we should send existent branch to dispatch workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
}

.card-body {
color: var(--text-light-mode-secondary);
color: var(--text-secondary-inverted);
}

.textbox {
border-radius: 24px;
font-size: var(--text-size-02);
font-size: 0.875rem;
margin-bottom: 20px;
max-width: 60%;
padding: 4px 12px;
Expand All @@ -17,14 +17,14 @@

.user_input:focus {
background: var(--field-enabled);
box-shadow: 0 0 0 2px var(--focus-focus) inset;
box-shadow: 0 0 0 2px var(--focus) inset;
color: var(--text-primary);
outline-width: 0;
}

#text-area {
background-color: inherit;
border: 1px solid var(--border-subtle-alpha-01);
border: 1px solid var(--border-subtleAlpha01);
color: var(--text-primary);
min-height: 14vh;
padding: 8px;
Expand Down Expand Up @@ -68,10 +68,6 @@

#model-dropdown .Select-menu-outer {
font-size: 12px;

/* top: 0; */

/* transform: translateY(3px) translateY(-100%); */
}

#model-dropdow .dash-dropdown {
Expand Down Expand Up @@ -122,22 +118,13 @@
}

#data-upload-component {
border: 1px dashed var(--border-subtle-alpha-01);
border: 1px dashed var(--border-subtleAlpha01);
color: var(--text-primary);
height: 5vh;
line-height: 5vh;
text-align: center;
}

/*
#settings-api-key-toggle .form-check-input {
border-radius: 8px;
}
#settings-api-base-toggle .form-check-input {
border-radius: 8px;
}
*/
#toggle-div-api-base,
#toggle-div-api-key {
align-items: center;
Expand Down Expand Up @@ -177,19 +164,19 @@

.btn-primary:enabled:has(#dropdown-menu-icon) {
background-color: inherit;
color: var(--text-active);
color: var(--text-primary);
font-size: 1.5rem;
}

.btn-primary:disabled:has(#dropdown-menu-icon) {
background-color: inherit;
color: var(--text-active);
color: var(--text-primary);
font-size: 1.5rem;
}

.download-button {
background-color: inherit;
color: var(--text-active);
color: var(--text-primary);
width: 100%;
}

Expand All @@ -199,14 +186,14 @@

.dropdown-menu-toggle-class {
background-color: inherit;
color: var(--text-active);
color: var(--text-primary);
height: 2rem;
scale: 90%;
}

.dropdown-menu-toggle-class:hover {
background-color: inherit;
color: var(--text-active);
color: var(--text-primary);
cursor: pointer;
height: 2rem;
scale: 90%;
Expand All @@ -218,7 +205,7 @@
.disabled
) {
background-color: inherit;
color: var(--text-active);
color: var(--text-primary);
}

.modal-class {
Expand All @@ -234,7 +221,7 @@

.custom_header {
align-items: center;
border-bottom: 1px solid var(--border-subtle-alpha-01);
border-bottom: 1px solid var(--border-subtleAlpha01);
display: flex;
flex-direction: row;
height: 60px;
Expand Down Expand Up @@ -314,7 +301,7 @@
background: var(--text-primary);
border-top-left-radius: 8px;
bottom: 0;
color: var(--text-contrast-primary);
color: var(--text-primary-inverted);
display: flex;
font-size: 0.8rem;
font-weight: 500;
Expand All @@ -327,7 +314,7 @@
.anchor-container:focus,
.anchor-container:hover {
background: var(--text-secondary);
color: var(--text-contrast-primary);
color: var(--text-primary-inverted);
}

img#banner {
Expand All @@ -346,7 +333,7 @@ img#banner {
flex-flow: column wrap;
gap: 12px;
justify-content: flex-start;
overflow: none;
overflow: hidden; /* to check */
}

.flex-container h4 {
Expand Down
1 change: 1 addition & 0 deletions vizro-ai/examples/dashboard_ui/requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
gunicorn
vizro-ai>=0.3.2
vizro==0.1.28
black
openpyxl
langchain_anthropic
Expand Down
36 changes: 29 additions & 7 deletions vizro-ai/examples/dashboard_ui/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,20 @@ anyio==4.4.0
# anthropic
# httpx
# openai
async-timeout==4.0.3
# via
# aiohttp
# langchain
attrs==24.2.0
# via aiohttp
autoflake==2.3.1
# via vizro-ai
# via
# vizro
# vizro-ai
black==24.8.0
# via
# -r requirements.in
# vizro
# vizro-ai
blinker==1.8.2
# via flask
Expand Down Expand Up @@ -63,6 +70,8 @@ distro==1.9.0
# openai
et-xmlfile==1.1.0
# via openpyxl
exceptiongroup==1.2.2
# via anyio
filelock==3.16.1
# via huggingface-hub
flask==3.0.3
Expand All @@ -77,6 +86,8 @@ frozenlist==1.4.1
# aiosignal
fsspec==2024.10.0
# via huggingface-hub
greenlet==3.1.1
# via sqlalchemy
gunicorn==23.0.0
# via -r requirements.in
h11==0.14.0
Expand All @@ -100,7 +111,9 @@ idna==3.8
# requests
# yarl
importlib-metadata==8.5.0
# via dash
# via
# dash
# flask
itsdangerous==2.2.0
# via flask
jinja2==3.1.4
Expand Down Expand Up @@ -182,7 +195,9 @@ pathspec==0.12.1
platformdirs==4.3.2
# via black
plotly==5.24.1
# via dash
# via
# dash
# vizro
pydantic==2.9.1
# via
# anthropic
Expand Down Expand Up @@ -217,8 +232,6 @@ requests==2.32.3
# tiktoken
retrying==1.3.4
# via dash
ruff==0.6.4
# via vizro
setuptools==74.1.2
# via dash
six==1.16.0
Expand Down Expand Up @@ -246,16 +259,23 @@ tokenizers==0.20.1
# via
# anthropic
# langchain-mistralai
tomli==2.1.0
# via
# autoflake
# black
tqdm==4.66.5
# via
# huggingface-hub
# openai
typing-extensions==4.12.2
# via
# anthropic
# anyio
# black
# dash
# huggingface-hub
# langchain-core
# multidict
# openai
# pydantic
# pydantic-core
Expand All @@ -264,8 +284,10 @@ tzdata==2024.1
# via pandas
urllib3==2.2.3
# via requests
vizro==0.1.23
# via vizro-ai
vizro==0.1.28
# via
# -r requirements.in
# vizro-ai
vizro-ai==0.3.2
# via -r requirements.in
werkzeug==3.0.4
Expand Down
1 change: 0 additions & 1 deletion vizro-ai/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ dependencies = [
installer = "uv"

[envs.default.env-vars]
UV_PRERELEASE = "allow"
VIZRO_AI_LOG_LEVEL = "DEBUG"

[envs.default.scripts]
Expand Down
Loading

0 comments on commit 0bf501c

Please sign in to comment.