-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] Windows paths #837
Merged
Merged
[Fix] Windows paths #837
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
c714bfd
Fix asset paths on Windows
antonymilne cf725dc
Bump version
antonymilne c7c0e2b
Another small fix
antonymilne 0fb311a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 6cdf3d6
Run tests on windows
antonymilne 93a802b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7cb0c7c
Try again
antonymilne 9dab047
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5ec50a6
Run tests on windows
antonymilne b9b4972
Run tests on windows
antonymilne ebed348
Tidy config
antonymilne 5855673
All the tests
antonymilne 493644e
Fix
antonymilne 7bc52ce
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] b0db4e7
Test to see what jobs run
antonymilne ca4ca33
Test to see what jobs run
antonymilne d16ddd3
Test to see what jobs run
antonymilne b528940
Test to see what jobs run
antonymilne af9233b
Test to see what jobs run
antonymilne 3bfec30
Test to see what jobs run
antonymilne 3a2bf44
Test to see what jobs run
antonymilne 55e4767
Test to see what jobs run
antonymilne 644e080
Test to see what jobs run
antonymilne 38f86f4
Test to see what jobs run
antonymilne 48f2ff8
Test to see what jobs run
antonymilne 248a070
Try same logic on all workflows
antonymilne 308d9ed
Remove 3.13 for VizroAI
antonymilne 36bc767
Urgh
antonymilne eae7dd4
Fix VizroAI integration tests
antonymilne ee5e59f
Fix a few more bits
antonymilne 265be4d
Check fix is working
antonymilne d281fb6
Prepare for merge
antonymilne 70c9f88
Merge branch 'main' into fix/windows-paths
antonymilne 3364a69
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,23 +21,46 @@ env: | |
jobs: | ||
test-integration-vizro-ai-fork: | ||
if: ${{ github.event.pull_request.head.repo.fork }} | ||
name: test-integration-vizro-ai on Py${{ matrix.python-version }} ${{ matrix.label }} | ||
runs-on: ubuntu-latest | ||
name: test-integration-vizro-ai on Py${{ matrix.config.python-version }} ${{ matrix.config.label }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# This is not a nice way to define the matrix, but it's the only way that's possible so that we only run | ||
# the job on Windows on merge to main rather than in every PR. See: | ||
# https://stackoverflow.com/questions/66025220/paired-values-in-github-actions-matrix | ||
# https://github.com/orgs/community/discussions/26253 | ||
# https://github.com/actions/runner/issues/1985 | ||
config: | ||
- python-version: "3.9" | ||
hatch-env: all.py3.9 | ||
os: ubuntu-latest | ||
- python-version: "3.10" | ||
hatch-env: all.py3.10 | ||
os: ubuntu-latest | ||
- python-version: "3.11" | ||
hatch-env: all.py3.11 | ||
os: ubuntu-latest | ||
- python-version: "3.12" | ||
hatch-env: all.py3.12 | ||
os: ubuntu-latest | ||
- python-version: "3.9" | ||
hatch-env: lower-bounds | ||
os: ubuntu-latest | ||
label: lower bounds | ||
- python-version: "3.12" | ||
hatch-env: all.py3.12 | ||
os: windows-latest | ||
label: Windows | ||
is_pr: | ||
- ${{ github.event_name == 'pull_request' }} | ||
exclude: | ||
- is_pr: true | ||
config: | ||
python-version: "3.12" | ||
hatch-env: all.py3.12 | ||
os: windows-latest | ||
label: Windows | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -47,55 +70,76 @@ jobs: | |
|
||
test-integration-vizro-ai: | ||
if: ${{ ! github.event.pull_request.head.repo.fork }} | ||
name: test-integration-vizro-ai on Py${{ matrix.python-version }} ${{ matrix.label }} | ||
runs-on: ubuntu-latest | ||
name: test-integration-vizro-ai on Py${{ matrix.config.python-version }} ${{ matrix.config.label }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# This is not a nice way to define the matrix, but it's the only way that's possible so that we only run | ||
# the job on Windows on merge to main rather than in every PR. See: | ||
# https://stackoverflow.com/questions/66025220/paired-values-in-github-actions-matrix | ||
# https://github.com/orgs/community/discussions/26253 | ||
# https://github.com/actions/runner/issues/1985 | ||
config: | ||
- python-version: "3.9" | ||
hatch-env: all.py3.9 | ||
os: ubuntu-latest | ||
- python-version: "3.10" | ||
hatch-env: all.py3.10 | ||
os: ubuntu-latest | ||
- python-version: "3.11" | ||
hatch-env: all.py3.11 | ||
os: ubuntu-latest | ||
- python-version: "3.12" | ||
hatch-env: all.py3.12 | ||
os: ubuntu-latest | ||
- python-version: "3.9" | ||
hatch-env: lower-bounds | ||
os: ubuntu-latest | ||
label: lower bounds | ||
- python-version: "3.12" | ||
hatch-env: all.py3.12 | ||
os: windows-latest | ||
label: Windows | ||
is_pr: | ||
- ${{ github.event_name == 'pull_request' }} | ||
exclude: | ||
- is_pr: true | ||
config: | ||
python-version: "3.12" | ||
hatch-env: all.py3.12 | ||
os: windows-latest | ||
label: Windows | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
- name: Set up Python ${{ matrix.config.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
python-version: ${{ matrix.config.python-version }} | ||
|
||
- name: Install Hatch | ||
run: pip install hatch | ||
|
||
- name: Show dependency tree | ||
run: hatch run ${{ matrix.hatch-env }}:pip tree | ||
run: hatch run ${{ matrix.config.hatch-env }}:pip tree | ||
|
||
- 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 }} | ||
export VIZRO_TYPE=pypi | ||
hatch run ${{ matrix.hatch-env }}:test-integration | ||
- name: Run vizro-ai integration tests with PyPI vizro | ||
run: hatch run ${{ matrix.config.hatch-env }}:test-integration | ||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | ||
VIZRO_TYPE: pypi | ||
|
||
- name: Run vizro-ai integration tests with local vizro | ||
run: | | ||
export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} | ||
export OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE }} | ||
export VIZRO_TYPE=local | ||
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 ${{ matrix.config.hatch-env }}:pip install ../vizro-core | ||
hatch run ${{ matrix.config.hatch-env }}:test-integration | ||
Comment on lines
+137
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI @l0uden I tidied this up by just installing |
||
env: | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
OPENAI_API_BASE: ${{ secrets.OPENAI_API_BASE }} | ||
VIZRO_TYPE: local | ||
|
||
- name: Send custom JSON data to Slack | ||
id: slack | ||
|
@@ -104,7 +148,7 @@ jobs: | |
with: | ||
payload: | | ||
{ | ||
"text": "Vizro-ai ${{ matrix.hatch-env }} integration tests build result: ${{ job.status }}\nBranch: ${{ github.head_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
"text": "Vizro-ai ${{ matrix.config.hatch-env }} integration tests build result: ${{ job.status }}\nBranch: ${{ github.head_ref }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
|
@@ -114,6 +158,6 @@ jobs: | |
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: Report-${{ matrix.python-version }}-${{ matrix.label }} | ||
name: Report-${{ matrix.config.python-version }}-${{ matrix.config.label }} | ||
path: | | ||
/home/runner/work/vizro/vizro/vizro-ai/tests/integration/reports/report*.csv |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI @l0uden this is a better way to define environment variables in GHA because it works on all OS.