Skip to content

Commit

Permalink
Try out adding vizro-ai dep
Browse files Browse the repository at this point in the history
  • Loading branch information
maxschulz-COL committed Mar 4, 2025
1 parent b4a27dd commit 308ae82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-vizro-whl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
run: |
hatch run pip install playwright
hatch run playwright install --with-deps chromium
- name: Install vizro-ai # This makes vizro-ai present in repo
run: |
hatch run pip install -e ../vizro-ai
- name: Print PR Number
run: |
echo "Pull Request Number: ${{ github.event.workflow_run.pull_requests[0].number }}"
Expand Down
12 changes: 5 additions & 7 deletions tools/pycafe/pycafe_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import requests
import vizro
import vizro_ai
from github import Auth, Github
from github.Commit import Commit
from github.Repository import Repository
Expand All @@ -27,6 +28,7 @@ class PyCafeConfig:
pycafe_url: str = "https://py.cafe"
vizro_raw_url: str = "https://raw.githubusercontent.com/mckinsey/vizro"
package_version: str = vizro.__version__
vizro_ai_package_version: str = vizro_ai.__version__


def create_github_client(config: PyCafeConfig) -> tuple[Repository, Commit]:
Expand Down Expand Up @@ -54,7 +56,7 @@ def _get_vizro_ai_requirement(config: PyCafeConfig, use_latest_release: bool = F
return "vizro-ai"
return (
f"{config.pycafe_url}/gh/artifact/mckinsey/vizro/actions/runs/{config.run_id}/"
f"pip2/vizro_ai-{config.package_version}-py3-none-any.whl"
f"pip2/vizro_ai-{config.vizro_ai_package_version}-py3-none-any.whl"
)


Expand Down Expand Up @@ -92,13 +94,9 @@ def generate_link(
# Requirements - either use latest release or commit's wheel file
requirements = []
if directory_path.startswith("vizro-ai/"):
requirements.extend(
[
_get_vizro_ai_requirement(config, use_latest_release),
]
)
requirements.extend([_get_vizro_ai_requirement(config, use_latest_release)])
else:
requirements.append(_get_vizro_requirement(config, use_latest_release))
requirements.extend([_get_vizro_requirement(config, use_latest_release)])

if extra_requirements:
requirements.extend(extra_requirements)
Expand Down

0 comments on commit 308ae82

Please sign in to comment.