Skip to content
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

Adjust CI for numpy 2.0, graphviz, pint #200

Merged
merged 3 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ jobs:
license: ${{ secrets.GAMS_LICENSE }}

- uses: ts-graphviz/setup-graphviz@v2
with:
macos-skip-brew-update: true
# TEMPORARY Work around ts-graphviz/setup-graphviz#630
if: ${{ ! startswith(matrix.os, 'macos-') }}

- name: Install packages and dependencies
# By default, install:
Expand All @@ -109,6 +109,10 @@ jobs:

pip install .[docs,tests] ${{ matrix.upstream.extra-deps }}

# TEMPORARY Work around hgrecco/pint#2007, unionai-oss/pandera#1685;
# see https://github.com/khaeru/genno/issues/140
pip install "pint != 0.24.0" "numpy < 2"

- name: Configure local data path
run: |
mkdir -p message-local-data/cache
Expand Down
21 changes: 15 additions & 6 deletions message_ix_models/tests/test_workflow.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import platform
import re
from typing import Optional

Expand All @@ -6,12 +7,19 @@
from message_ix import make_df

from message_ix_models import Workflow, testing
from message_ix_models.testing import GHA
from message_ix_models.workflow import WorkflowStep, make_click_command, solve

MARK = pytest.mark.skipif(
condition=ixmp.__version__ < "3.5",
reason="ixmp.TimeSeries.url not available prior to ixmp 3.5.0",
)
MARK = {
0: pytest.mark.skipif(
condition=ixmp.__version__ < "3.5",
reason="ixmp.TimeSeries.url not available prior to ixmp 3.5.0",
),
1: pytest.mark.xfail(
condition=GHA and platform.system() == "Darwin",
reason="Graphviz not available for GitHub Actions jobs on macOS",
),
}


# Functions for WorkflowSteps
Expand Down Expand Up @@ -87,7 +95,8 @@ def _wf(
return wf


@MARK
@MARK[0]
@MARK[1]
def test_make_click_command(mix_models_cli) -> None:
import click

Expand Down Expand Up @@ -123,7 +132,7 @@ def test_make_click_command(mix_models_cli) -> None:
assert output in result.output


@MARK
@MARK[0]
def test_workflow(caplog, request, test_context, wf) -> None:
# Retrieve some information from the fixture
mp = wf.graph.pop("_base_platform")
Expand Down
Loading