Skip to content

Fix composite action location and missing checkout in CI workflows#1999

Merged
Flix6x merged 3 commits intofix/copilot-setup-steps-shares-steps-with-lint-and-testfrom
copilot/sub-pr-1998
Mar 4, 2026
Merged

Fix composite action location and missing checkout in CI workflows#1999
Flix6x merged 3 commits intofix/copilot-setup-steps-shares-steps-with-lint-and-testfrom
copilot/sub-pr-1998

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

  • Fix copilot-setup-steps.yml, which was giving errors
  • Added changelog item in documentation/changelog.rst
  • Move .github/actions/setup-test-env.yml to .github/actions/setup-test-env/action.yml (correct location for composite actions)
  • Add actions/checkout as first step in both lint-and-test.yml and copilot-setup-steps.yml before referencing local action
  • Remove duplicate actions/checkout from inside the composite action
  • Replace pkg_resources with importlib.metadata in visualize_data_model.py to fix Python 3.12 test failure

💡 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.

…e local action reference

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix copilot setup steps to align with lint and test Fix composite action location and missing checkout in CI workflows Mar 4, 2026
@read-the-docs-community
Copy link

read-the-docs-community bot commented Mar 4, 2026

Documentation build overview

📚 flexmeasures | 🛠️ Build #31655978 | 📁 Comparing b4b9e31 against latest (eb8c218)


🔍 Preview build

Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
File Status
changelog.html 📝 modified
api/v3_0.html 📝 modified

@Flix6x
Copy link
Contributor

Flix6x commented Mar 4, 2026

@copilot fix the issue for the one failing test for Python 3.12:

FAILED flexmeasures/tests/test_schemas.py::test_all_custom_fields_call_super_deserialize - ModuleNotFoundError: No module named 'pkg_resources'

…model.py for Python 3.12 compatibility

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot fix the issue for the one failing test for Python 3.12:

...

Fixed in commit b4b9e31. The root cause was that flexmeasures/data/scripts/visualize_data_model.py had a top-level import pkg_resources, which fails in Python 3.12 because setuptools (which provides pkg_resources) is no longer pre-installed. When the test scans all modules via pkgutil.walk_packages, this import triggers the error.

Replaced pkg_resources with importlib.metadata (standard library since Python 3.8).

Copy link
Contributor

@Flix6x Flix6x left a comment

Choose a reason for hiding this comment

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

Good, the test pipeline runs again.

@Flix6x Flix6x merged commit bca347f into fix/copilot-setup-steps-shares-steps-with-lint-and-test Mar 4, 2026
6 of 7 checks passed
@Flix6x Flix6x deleted the copilot/sub-pr-1998 branch March 4, 2026 09:17
Flix6x added a commit that referenced this pull request Mar 4, 2026
* fix: match matrix variable name

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* style: lowercase secrets is correct GitHub expression syntax

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* fix: setup-test-env.yml uses same composite action as lint-and-test.yml

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* refactor: streamline options formatting

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* fix: move composite actions to dedicated folder

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* fix: ensure cache path exists

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <claessen@seita.nl>

* Fix composite action location and missing checkout in CI workflows (#1999)

* Initial plan

* fix: move composite action to correct location and add checkout before local action reference

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

* fix: replace pkg_resources with importlib.metadata in visualize_data_model.py for Python 3.12 compatibility

Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Flix6x <30658763+Flix6x@users.noreply.github.com>

---------

Signed-off-by: F.N. Claessen <claessen@seita.nl>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants