From f7d86cf7359005588401140c8c178c030135b9c6 Mon Sep 17 00:00:00 2001 From: Renan Rodrigues dos Santos Date: Thu, 4 Apr 2024 19:05:20 +0000 Subject: [PATCH] wip: ci --- .github/workflows/ci.yml | 9 +++++---- src/pixi_kernel/__main__.py | 3 ++- src/pixi_kernel/pixi.py | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b81f7f8..1a261bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,10 +20,11 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v4 - - name: Install pixi ${{ matrix.pixi-version }} - run: | - export PIXI_VERSION=v${{ matrix.pixi-version }} - curl -fsSL https://pixi.sh/install.sh | bash + - name: Install Pixi ${{ matrix.pixi-version }} + uses: prefix-dev/setup-pixi@v0.5.1 + with: + pixi-version: v${{ matrix.pixi-version }} + run-install: false - name: Install Poetry run: pipx install poetry==${{ env.poetry-version }} - name: Install Python ${{ matrix.python-version }} diff --git a/src/pixi_kernel/__main__.py b/src/pixi_kernel/__main__.py index 028fe21..f297917 100644 --- a/src/pixi_kernel/__main__.py +++ b/src/pixi_kernel/__main__.py @@ -2,6 +2,7 @@ import shutil import subprocess from pathlib import Path +from typing import Union import msgspec from packaging import version @@ -15,7 +16,7 @@ logger = logging.getLogger(__name__) -def find_project_manifest() -> str | PixiKernelError: +def find_project_manifest() -> Union[str, PixiKernelError]: # Ensure pixi is installed if shutil.which("pixi") is None: return PixiKernelError( diff --git a/src/pixi_kernel/pixi.py b/src/pixi_kernel/pixi.py index 96cae85..8a98e4f 100644 --- a/src/pixi_kernel/pixi.py +++ b/src/pixi_kernel/pixi.py @@ -1,13 +1,13 @@ from __future__ import annotations -from typing import List +from typing import List, Optional import msgspec class PixiInfo(msgspec.Struct, frozen=True, kw_only=True): environments_info: List[EnvironmentInfo] - project_info: ProjectInfo | None + project_info: Optional[ProjectInfo] class EnvironmentInfo(msgspec.Struct, frozen=True, kw_only=True):