Skip to content

Fix CI: Quote Python versions, update actions, and install Open Babel - #2

Merged
fbischoff merged 6 commits into
mainfrom
copilot/fix-ci-issues
Jan 21, 2026
Merged

Fix CI: Quote Python versions, update actions, and install Open Babel#2
fbischoff merged 6 commits into
mainfrom
copilot/fix-ci-issues

Conversation

Copilot AI commented Jan 21, 2026

Copy link
Copy Markdown

CI workflows failed with "The version '3.1' with architecture 'x64' was not found" while tests passed locally.

Changes

  • Quote Python version numbers in matrix: YAML parses 3.10 as float 3.1, losing trailing zero. Changed to strings: ["3.9", "3.10", "3.11"]
  • Update actions/setup-python@v4@v5: v4 runner deprecated and incompatible with current GitHub Actions
  • Install Open Babel: Add openbabel system package installation to both workflows to provide the obabel command-line tool required for z-matrix conversions
  • Create requirements.txt: Add requirements file with pytest and numpy dependencies for better dependency management
  • Standardize Python versions: Remove Python 3.8 from pytest.yml for consistency with python-pytest.yml (both now test 3.9, 3.10, 3.11)
  • Add .gitignore: Exclude Python cache and build artifacts
   strategy:
     matrix:
-      python-version: [3.8, 3.9, 3.10, 3.11]
+      python-version: ["3.9", "3.10", "3.11"]
+      - name: Install Open Babel
+        run: |
+          sudo apt-get update
+          sudo apt-get install -y openbabel
+
       - name: Install dependencies
         run: |
           python -m pip install --upgrade pip
-          pip install pytest numpy
+          pip install -r requirements.txt

Both workflow files (pytest.yml, python-pytest.yml) now have consistent, correct configuration with all required dependencies.

Original prompt

This section details on the original issue you should resolve

<issue_title>fix CI</issue_title>
<issue_description></issue_description>

<agent_instructions>using pytest the tests work locally, but not on the github server. Set up a working CI</agent_instructions>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 21, 2026 21:18
Co-authored-by: fbischoff <7567292+fbischoff@users.noreply.github.com>
Co-authored-by: fbischoff <7567292+fbischoff@users.noreply.github.com>
Co-authored-by: fbischoff <7567292+fbischoff@users.noreply.github.com>
@fbischoff
fbischoff marked this pull request as ready for review January 21, 2026 21:21
Copilot AI review requested due to automatic review settings January 21, 2026 21:21
Co-authored-by: fbischoff <7567292+fbischoff@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI to ensure tests run successfully on GitHub server Fix CI: Quote Python versions and update deprecated actions Jan 21, 2026
Copilot AI requested a review from fbischoff January 21, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes CI workflow configuration issues that prevented tests from running successfully on GitHub Actions. The primary issue was YAML parsing unquoted Python version numbers (e.g., 3.10) as floats (3.1), causing version lookup failures. The solution includes quoting Python versions, updating to the latest actions/setup-python version, ensuring numpy is installed, and adding a comprehensive .gitignore file.

Changes:

  • Quote all Python version numbers in workflow matrices to prevent YAML float parsing
  • Update actions/setup-python from deprecated v4 to v5
  • Add numpy to dependencies in pytest.yml (already present in python-pytest.yml)

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
.gitignore Adds comprehensive Python, IDE, testing, and OS-specific ignore patterns
.github/workflows/python-pytest.yml Quotes Python versions and updates setup-python to v5
.github/workflows/pytest.yml Quotes Python versions, updates setup-python to v5, and adds numpy dependency
Comments suppressed due to low confidence (1)

.github/workflows/pytest.yml:32

  • This workflow file appears to duplicate the functionality of python-pytest.yml. Both workflows run pytest on multiple Python versions with similar configurations. Having two separate workflow files with overlapping purposes can lead to maintenance overhead and confusion. Consider consolidating these into a single workflow file or clearly differentiating their purposes with distinct names and configurations.
name: CI

on:
  push:
    branches: [ main, master ]
  pull_request:
    branches: [ main, master ]

jobs:
  test:
    name: Run tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.8", "3.9", "3.10", "3.11"]
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pytest numpy

      - name: Run pytest
        run: pytest -q


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/pytest.yml Outdated
@fbischoff

Copy link
Copy Markdown
Owner

obabel is not found: add a requirement to have openbabel or obabel available

@fbischoff fbischoff left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

obabel is not found in CI: add a requirements.txt to ensure availability

Co-authored-by: fbischoff <7567292+fbischoff@users.noreply.github.com>

Copilot AI commented Jan 21, 2026

Copy link
Copy Markdown
Author

obabel is not found: add a requirement to have openbabel or obabel available

Added Open Babel installation to both CI workflows and created requirements.txt. The workflows now install openbabel system package before running tests. Changes in commit 43a206a.

obabel is not found in CI: add a requirements.txt to ensure availability

Created requirements.txt with pytest and numpy dependencies. Both workflows now install Open Babel system package (openbabel) which provides the obabel command. Changes in commit 43a206a.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title Fix CI: Quote Python versions and update deprecated actions Fix CI: Quote Python versions, update actions, and install Open Babel Jan 21, 2026
Copilot AI requested a review from fbischoff January 21, 2026 21:39
@fbischoff
fbischoff merged commit 4af856c into main Jan 21, 2026
0 of 6 checks passed
@fbischoff
fbischoff deleted the copilot/fix-ci-issues branch January 21, 2026 21:41
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.

fix CI

3 participants