Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The pip install -e . command uses Poetry's build backend, which only installs the main [tool.poetry.dependencies] (i.e., requests). It does not install the [tool.poetry.group.dev.dependencies] group, which includes pydantic. However, pydantic is imported in tests/conftest.py (from pydantic import BaseSettings), so pytest will still fail with a ModuleNotFoundError: No module named 'pydantic' when importing the test configuration.

The canonical approach used by the project's GitLab CI (in .gitlab-ci.yml) is to install Poetry itself and then run poetry install, which installs all dependency groups including dev. The GitHub Actions workflow should use the same approach:

  1. Install Poetry via pip install poetry
  2. Run poetry install (or poetry install -E keyring if the keyring extra is needed)
  3. Use poetry run flake8 ... and poetry run pytest (or activate the virtual environment Poetry creates) for the lint and test steps.

Alternatively, if keeping the pip-only approach, pydantic (and other dev dependencies) must be explicitly installed, e.g. pip install pydantic pytest-....

Copilot uses AI. Check for mistakes.
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand Down
Loading