-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
140 changed files
with
5,433 additions
and
825 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: checks-vizro-ai | ||
defaults: | ||
run: | ||
working-directory: vizro-ai | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: | ||
- "vizro-ai/**" | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- "vizro-ai/**" | ||
|
||
concurrency: | ||
group: checks-ai-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
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 ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Hatch | ||
run: pip install --upgrade hatch | ||
|
||
- name: List dependencies | ||
run: hatch run all.py${{ matrix.python-version }}:pip freeze | ||
|
||
- name: Check requirements for Snyk are up to date | ||
run: hatch run all.py${{ matrix.python-version }}:update-snyk-requirements --check | ||
|
||
- name: Find added changelog fragments | ||
id: added-files | ||
run: | | ||
if ${{ github.event_name == 'pull_request' }}; then | ||
echo "added_files=$(git diff --name-only --diff-filter=A -r HEAD^1 HEAD -- changelog.d/*.md | xargs)" >> $GITHUB_OUTPUT | ||
else | ||
echo "added_files=$(git diff --name-only --diff-filter=A ${{ github.event.before }} ${{ github.event.after }} -- changelog.d/*.md | xargs)" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Fail if no fragment added in PR | ||
run: | | ||
if [ -z "${{ steps.added-files.outputs.added_files }}" ]; | ||
then | ||
echo "No changelog fragment .md file within changelog.d was detected. Run 'hatch run changelog:add' to create such a fragment."; | ||
echo "If your PR contains changes that should be mentioned in the CHANGELOG in the next release, please uncomment the relevant section in your created fragment and describe the changes to the user." | ||
echo "If your changes are not relevant for the CHANGELOG, please save and commit the file as is." | ||
exit 1 | ||
else | ||
echo "${{ steps.added-files.outputs.added_files }} was added - ready to go!"; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: lint-vizro-all | ||
|
||
defaults: | ||
run: | ||
working-directory: vizro-core # but could be any folder | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
concurrency: | ||
group: lint-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
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 ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Hatch | ||
run: pip install --upgrade hatch | ||
|
||
- name: List dependencies | ||
run: hatch run all.py${{ matrix.python-version }}:pip freeze | ||
|
||
- name: Lint | ||
run: hatch run all.py${{ matrix.python-version }}:lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#name: test-integration-vizro-ai | ||
# | ||
#defaults: | ||
# run: | ||
# working-directory: vizro-core | ||
# | ||
##### TODO: adjust below according to other scripts | ||
#on: | ||
# # push: | ||
# # branches: [main] | ||
# pull_request: | ||
# # branches: | ||
# # - "main" | ||
# | ||
#concurrency: | ||
# group: test-integration-${{ github.head_ref }} | ||
# cancel-in-progress: true | ||
# | ||
#env: | ||
# PYTHONUNBUFFERED: "1" | ||
# FORCE_COLOR: "1" | ||
# | ||
#jobs: | ||
# run: | ||
# name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
# runs-on: ${{ matrix.os }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# os: [ubuntu-latest, windows-latest] | ||
# python-version: ["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 }} | ||
# | ||
# - 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: Run ubuntu integration tests | ||
# if: ${{ matrix.os == 'ubuntu-latest' }} | ||
# run: | | ||
# pip install --upgrade hatch | ||
# hatch run all.py${{ matrix.python-version }}:test-integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: test-unit-vizro-ai | ||
|
||
defaults: | ||
run: | ||
working-directory: vizro-ai | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: | ||
- "main" | ||
|
||
concurrency: | ||
group: test-unit-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
run: | ||
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- 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 | ||
|
||
- name: List dependencies | ||
run: hatch run all.py${{ matrix.python-version }}:pip freeze | ||
|
||
- name: Run unit tests | ||
run: | | ||
hatch run all.py${{ matrix.python-version }}:cov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
|
||
<!-- All enhancements and patches to vizro will be documented | ||
in this file. It adheres to the structure of http://keepachangelog.com/. | ||
This project adheres to Semantic Versioning (http://semver.org/). --> | ||
|
||
## Unreleased | ||
|
||
See the fragment files in the [changelog.d directory](https://github.com/mckinsey/vizro/tree/main/vizro-ai/changelog.d). | ||
|
||
<!-- scriv-insert-here --> |
Oops, something went wrong.