Skip to content

Commit

Permalink
Revert "Merge branch 'main' into feat/enable_tabs_containers"
Browse files Browse the repository at this point in the history
This reverts commit e2a375d, reversing
changes made to fac1a2e.
  • Loading branch information
huong-li-nguyen committed Dec 12, 2023
1 parent dfe3dc4 commit 77bc6ea
Show file tree
Hide file tree
Showing 91 changed files with 356 additions and 1,885 deletions.
9 changes: 9 additions & 0 deletions .github/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
devtools[pygments]
pre-commit
coverage[toml]>=6.5
pytest
dash[testing]
chromedriver-autoinstaller-fix
toml
pyyaml
openpyxl
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
name: Release if needed
name: Check versions and build-publish

on:
push:
branches:
- main

env:
PYTHON_VERSION: "3.11"

jobs:
check-version:
runs-on: ubuntu-latest
Expand All @@ -16,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -53,7 +50,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -106,7 +103,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/checks-vizro-ai.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Checks for VizroAI

name: checks-vizro-ai
defaults:
run:
working-directory: vizro-ai
Expand All @@ -19,31 +18,35 @@ concurrency:
group: checks-ai-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: "3.11"
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
checks-vizro-ai:
run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

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

- name: Install Hatch
run: pip install --upgrade hatch

- name: List dependencies
run: hatch run all.py${{ env.PYTHON_VERSION }}:pip freeze
run: hatch run all.py${{ matrix.python-version }}:pip freeze

- name: Check requirements for Snyk are up to date
run: hatch run all.py${{ env.PYTHON_VERSION }}:update-snyk-requirements --check
run: hatch run all.py${{ matrix.python-version }}:update-snyk-requirements --check

- name: Find added changelog fragments
id: added-files
Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/checks-vizro-core.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Checks for Vizro
name: checks-vizro-core

defaults:
run:
Expand All @@ -19,34 +19,38 @@ concurrency:
group: checks-core-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: "3.11"
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
checks-vizro-core:
run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

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

- name: Install Hatch
run: pip install --upgrade hatch

- name: List dependencies
run: hatch run all.py${{ env.PYTHON_VERSION }}:pip freeze
run: hatch run all.py${{ matrix.python-version }}:pip freeze

- name: Check schema is up to date
run: hatch run all.py${{ env.PYTHON_VERSION }}:schema --check
run: hatch run all.py${{ matrix.python-version }}:schema --check

- name: Check requirements for Snyk are up to date
run: hatch run all.py${{ env.PYTHON_VERSION }}:update-snyk-requirements --check
run: hatch run all.py${{ matrix.python-version }}:update-snyk-requirements --check

- name: Find added changelog fragments
id: added-files
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/lint-vizro-all.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: lint-vizro-all

defaults:
run:
Expand All @@ -9,32 +9,35 @@ on:
branches: [main]
pull_request:
branches:
- main
- "main"

concurrency:
group: lint-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHON_VERSION: "3.11"
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
lint-vizro-all:
run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}

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

- name: Install Hatch
run: pip install --upgrade hatch

- name: Lint
run: hatch run lint
run: hatch run lint:lint
14 changes: 5 additions & 9 deletions .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
name: Secret scan

name: gitleaks (secret scan)
on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # run once a day at 4 AM

env:
PYTHON_VERSION: "3.11"

jobs:
secret-scan:
scan:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4

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

- name: Install pre-commit
run: pip install pre-commit
Expand Down
34 changes: 10 additions & 24 deletions .github/workflows/test-integration-vizro-ai.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration tests for VizroAI
name: test-integration-vizro-ai

defaults:
run:
Expand All @@ -9,33 +9,22 @@ on:
branches: [main]
pull_request:
branches:
- main
- "main"

concurrency:
group: test-integration-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
test-integration-vizro-ai:
name: test-integration-vizro-ai on Py${{ matrix.python-version }} ${{ matrix.label }}

run:
name: Python ${{ matrix.python-version }} on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.9"
hatch-env: all.py3.9
- python-version: "3.10"
hatch-env: all.py3.10
- python-version: "3.11"
hatch-env: all.py3.11
- python-version: "3.11"
hatch-env: lower-bounds
label: lower bounds
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
Expand All @@ -50,14 +39,11 @@ jobs:
- name: Install Hatch
run: pip install --upgrade hatch

- name: List dependencies
run: hatch run ${{ matrix.hatch-env }}:pip freeze

- name: Run vizro-ai integration tests with pypi vizro
run: |
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
export OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE }}
hatch run ${{ matrix.hatch-env }}:test-integration
hatch run all.py${{ matrix.python-version }}:test-integration
- name: Run vizro-ai integration tests with local vizro
run: |
Expand All @@ -66,5 +52,5 @@ jobs:
cd ../vizro-core
hatch build
cd ../vizro-ai
hatch run ${{ matrix.hatch-env }}:pip install ../vizro-core/dist/vizro*.tar.gz
hatch run ${{ matrix.hatch-env }}:test-integration
hatch run all.py${{ matrix.python-version }}:pip install ../vizro-core/dist/vizro*.tar.gz
hatch run all.py${{ matrix.python-version }}:test-integration
59 changes: 33 additions & 26 deletions .github/workflows/test-integration-vizro-core.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Integration tests for Vizro
name: test-integration-vizro-core

defaults:
run:
Expand All @@ -9,49 +9,56 @@ on:
branches: [main]
pull_request:
branches:
- main
- "main"

concurrency:
group: test-integration-${{ github.head_ref }}

env:
PYTHONUNBUFFERED: 1
FORCE_COLOR: 1
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"

jobs:
test-integration-vizro-core:
name: test-integration-vizro-core on Py${{ matrix.python-version }} ${{ matrix.label }}

runs-on: ubuntu-latest
run:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.8"
hatch-env: all.py3.8
- python-version: "3.9"
hatch-env: all.py3.9
- python-version: "3.10"
hatch-env: all.py3.10
- python-version: "3.11"
hatch-env: all.py3.11
- python-version: "3.11"
hatch-env: lower-bounds
label: lower bounds
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install --upgrade hatch
- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ steps.branch-name.outputs.current_branch }}-pip-${{ hashFiles('hatch.toml') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-${{ steps.branch-name.outputs.current_branch }}-pip-
- name: List dependencies
run: hatch run ${{ matrix.hatch-env }}:pip freeze
- name: Run ubuntu integration tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pip install --upgrade hatch
hatch run all.py${{ matrix.python-version }}:test-integration
- name: Run integration tests
run: hatch run ${{ matrix.hatch-env }}:test-integration
- name: Run windows integration tests
if: ${{ matrix.os == 'windows-latest' }}
run: |
$env:PYTHONPATH=".;D:\a\vizro\vizro\vizro-core\src"
pip install -r ../.github/requirements.txt
pip install .
pytest tests/integration --headless -k default
pytest tests/integration --headless -k dict
pytest tests/integration --headless -k json
pytest tests/integration --headless -k yaml
Loading

0 comments on commit 77bc6ea

Please sign in to comment.