Skip to content
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
35 changes: 0 additions & 35 deletions .azure-pipelines/azure-pipelines-linux.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .azure-pipelines/azure-pipelines-macos.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .azure-pipelines/azure-pipelines-win.yml

This file was deleted.

127 changes: 93 additions & 34 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,107 @@ name: Python application
on: [push, pull_request]

jobs:
build:
name: ANDES Tests
runs-on: ubuntu-latest
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for setuptools-scm
- uses: conda-incubator/setup-miniconda@v3
fetch-depth: 0

- uses: actions/setup-python@v5
with:
miniforge-variant: Miniforge3
miniforge-version: latest
use-mamba: true
python-version: '3.11'
channels: conda-forge,defaults
channel-priority: true
activate-environment: test-env
- shell: bash -el {0}
name: Install dependencies
run: |
mamba install -y nbmake pytest-xdist line_profiler flake8 pytest build
pip install -e .[dev]
- shell: bash -el {0}
name: Run pip check
run: |
pip check
- shell: bash -el {0}
name: Lint with flake8
if: github.event_name == 'pull_request'
run: |
flake8 .
- shell: bash -el {0}
name: Run tests

- name: Install dependencies
run: pip install -e .[dev,interop]

Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old GitHub Actions workflow included a pip check step to verify package dependencies are consistent and compatible. This validation step has been removed from the new workflow. Consider adding a pip check step after installing dependencies in at least one of the jobs (e.g., in the test job for ubuntu-latest) to catch dependency conflicts early.

Suggested change
- name: Check dependency consistency
if: matrix.os == 'ubuntu-latest'
run: pip check

Copilot uses AI. Check for mistakes.
- name: Run tests with coverage
if: matrix.os == 'ubuntu-latest'
run: |
pytest
pytest --nbmake examples --ignore=examples/verification
- shell: bash -el {0}
name: Build and publish if tagged
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
coverage run -m pytest
coverage report -m

- name: Run tests
if: matrix.os != 'ubuntu-latest'
run: pytest

lint:
name: Lint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install flake8
run: pip install flake8

- name: Lint with flake8
run: flake8 .

notebooks:
name: Notebook Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: pip install -e .[dev,interop]

- name: Run notebook tests
run: pytest --nbmake examples --ignore=examples/verification

docs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: pip install -e .[dev,interop]

- name: Build docs
run: make -C docs html

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [test, notebooks, docs]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Build and publish
run: |
pip install build twine
python -m build
pip install twine
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
4 changes: 0 additions & 4 deletions azure-pipelines.yml

This file was deleted.

10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ classifiers = [
]

dependencies = [
"kvxopt>=1.3.2.0",
"kvxopt>=1.3.2.0,<1.4",
"numpy",
"scipy<1.14",
"scipy<=1.16.3",
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The scipy version constraint has been changed from <1.14 to <=1.16.3. However, scipy 1.16.3 does not exist - as of January 2025, the latest scipy version is in the 1.14.x series. This will cause installation failures. Consider reverting to scipy<1.15 or using a constraint like scipy<1.14.1 if 1.14.0 specifically has issues.

Suggested change
"scipy<=1.16.3",
"scipy<1.15",

Copilot uses AI. Check for mistakes.
"sympy>=1.6,!=1.10.0",
"pandas",
"matplotlib",
Expand All @@ -33,6 +33,7 @@ dependencies = [
"dill",
"pathos",
"tqdm",
"ipywidgets",
Copy link

Copilot AI Jan 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding ipywidgets to the main dependencies creates a version conflict with the web extras which pins ipywidgets to version 7.7. Since ipywidgets is unconstrained here, it will install the latest version (likely 8.x), which conflicts with web[ipywidgets==7.7]. Consider either removing this from main dependencies if it's only needed for the web extras, or aligning the versions across both dependency groups.

Suggested change
"ipywidgets",
"ipywidgets==7.7",

Copilot uses AI. Check for mistakes.
"pyyaml",
"coloredlogs",
"chardet",
Expand All @@ -45,7 +46,10 @@ dependencies = [
dev = [
"coverage",
"pytest==7.4",
"pytest-xdist",
"nbmake",
"flake8",
"line_profiler",
"sphinx",
"ipython",
"numpydoc",
Expand All @@ -68,7 +72,7 @@ doc = [
"mdit-py-plugins>=0.3.1,<0.4",
]
interop = [
"pandapower",
"pandapower>=3,<=3.3",
"pypowsybl",
]
web = [
Expand Down