Skip to content

Comments

Add CI testing for pypsa2smspp package integration#53

Open
Copilot wants to merge 7 commits intomainfrom
copilot/add-pypsa2smspp-test-ci
Open

Add CI testing for pypsa2smspp package integration#53
Copilot wants to merge 7 commits intomainfrom
copilot/add-pypsa2smspp-test-ci

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Adds CI testing for the pypsa2smspp package to ensure compatibility with pySMSpp by running pypsa2smspp's full test suite within the existing SMSpp test job.

Changes

  • .github/workflows/test.yml: Modified the test_with_smspp job to include pypsa2smspp testing:

    • Added step to clone and install pypsa2smspp from its GitHub repository with dev dependencies
    • Added step to run the full pypsa2smspp test suite using the pySMSpp package being tested
    • Uses -W ignore flag to suppress all warnings during pypsa2smspp tests
    • Tests run on Python 3.13 with Ubuntu, macOS, and Windows (based on trigger event)
  • .gitignore: Added pypsa2smspp/ directory to prevent accidentally committing the cloned repository

Rationale

The CI job ensures that pypsa2smspp (which depends on pySMSpp) continues to work correctly with the version of pySMSpp being developed. By running pypsa2smspp's own test suite with the pySMSpp under test within the SMSpp testing job, we can catch any breaking changes early while keeping the workflow streamlined.

Testing

  • ✅ YAML syntax validated
  • ✅ Pre-commit hooks pass
  • ✅ No security vulnerabilities detected by CodeQL
  • ✅ pypsa2smspp tests integrated into existing test_with_smspp job
Original prompt

This section details on the original issue you should resolve

<issue_title>Add execution of test of pypsa2smspp to the CI</issue_title>
<issue_description>Add execution of test of latest version of pypsa2smspp package, installable using pip, to the CI</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits February 18, 2026 14:13
Co-authored-by: davide-f <67809479+davide-f@users.noreply.github.com>
Co-authored-by: davide-f <67809479+davide-f@users.noreply.github.com>
Co-authored-by: davide-f <67809479+davide-f@users.noreply.github.com>
Copilot AI changed the title [WIP] Add execution of pypsa2smspp test to the CI Add CI testing for pypsa2smspp package integration Feb 18, 2026
Copilot AI requested a review from davide-f February 18, 2026 14:17
Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

@copilot Ensure pre-commit to pass and solve the errors mentioned here.

Comment on lines 65 to 66
- "3.13"
- "3.12"
Copy link
Member

Choose a reason for hiding this comment

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

Limit to 3.13

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to Python 3.13 only in commit cb80a74.

Comment on lines 90 to 92
- name: Test pypsa2smspp integration
run: |
pytest test/test_pypsa2smspp.py -v
Copy link
Member

Choose a reason for hiding this comment

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

I want to execute pytest on pypsa2smspp package using the pysmspp package being tested

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in commit cb80a74. The CI now clones the pypsa2smspp repository and runs its full test suite, which will use the pysmspp package being tested from the current PR.

- Limit Python version to 3.13 only as requested
- Clone pypsa2smspp repository and run its full test suite
- Remove custom integration tests in favor of pypsa2smspp's own tests
- This ensures pypsa2smspp tests use the pysmspp package being tested

Co-authored-by: davide-f <67809479+davide-f@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 18, 2026

@copilot Ensure pre-commit to pass and solve the errors mentioned here.

Pre-commit checks pass successfully. All formatting and linting issues have been resolved in commit cb80a74.

Copilot AI requested a review from davide-f February 18, 2026 14:27
@davide-f davide-f marked this pull request as ready for review February 18, 2026 14:27
Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

@copilot

  • move the pysmspp test as a step after test_with_smspp
  • ignore futurewarning in the pytest of pypsa2smspp

- Changed test_pypsa2smspp job to depend on test_with_smspp instead of test
- Added -W ignore::FutureWarning flag to pytest command to suppress FutureWarnings
- This addresses pypsa2smspp tests failing due to FutureWarnings being treated as errors

Co-authored-by: davide-f <67809479+davide-f@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 18, 2026

@copilot

  • move the pysmspp test as a step after test_with_smspp
  • ignore futurewarning in the pytest of pypsa2smspp

Both changes completed in commit 20e58a4:

  • Moved test_pypsa2smspp job to run after test_with_smspp (changed needs dependency)
  • Added -W ignore::FutureWarning flag to pytest command to ignore FutureWarnings

Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

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

Comment on lines 157 to 166
- name: Install pypsa2smspp with tests
run: |
git clone https://github.com/SPSUnipi/pypsa2smspp.git
cd pypsa2smspp
pip install -e .[dev]

- name: Test pypsa2smspp package
run: |
cd pypsa2smspp
pytest -v -W ignore::FutureWarning
Copy link
Member

Choose a reason for hiding this comment

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

Move these two steps as steps of test_pypsa2smspp and ignore all warnings

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Completed in commit 8d52bc9:

  • Moved the two steps as steps of test_with_smspp job
  • Changed pytest to use -W ignore to ignore all warnings

- Removed separate test_pypsa2smspp job
- Added pypsa2smspp installation and testing as steps in test_with_smspp job
- Changed pytest to ignore all warnings with -W ignore (instead of just FutureWarning)
- This simplifies the CI workflow by consolidating pypsa2smspp tests with SMSpp tests

Co-authored-by: davide-f <67809479+davide-f@users.noreply.github.com>
Copilot AI requested a review from davide-f February 18, 2026 18:59
@davide-f davide-f force-pushed the copilot/add-pypsa2smspp-test-ci branch from ea634cf to 8d52bc9 Compare February 19, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add execution of test of pypsa2smspp to the CI

2 participants