Skip to content

Fix standalone import failure in DataTables utilities - #7

Merged
cokelaer merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-job
Aug 28, 2026
Merged

Fix standalone import failure in DataTables utilities#7
cokelaer merged 3 commits into
mainfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

The Python 3.10 Actions job failed during test collection because sequana_report still relied on sequana.lazy at import time. In the standalone package context used by CI, that dependency is not installed, so importing the DataTables utilities raised ModuleNotFoundError.

  • Import compatibility

    • Update sequana_report.utils.datatables_js to use sequana.lazy.pandas when available, with a direct pandas fallback when the parent sequana package is absent.
    • This keeps compatibility with the Sequana runtime while allowing sequana_report to import cleanly as an independent package.
  • Regression coverage

    • Add a focused import regression test that spawns a fresh interpreter and imports sequana_report.utils.datatables_js.
    • This covers the same failure mode seen in CI: package import in an environment where sequana is not present.
  • Behavioral impact

    • No DataTable API changes.
    • Scope is limited to import-time dependency handling for standalone installs.
try:
    from sequana.lazy import pandas as pd
except ImportError:
    import pandas as pd

Copilot AI and others added 2 commits August 28, 2026 23:05
Co-authored-by: cokelaer <778821+cokelaer@users.noreply.github.com>
Co-authored-by: cokelaer <778821+cokelaer@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job 'test (3.10)' Fix standalone import failure in DataTables utilities Aug 28, 2026
Copilot AI requested a review from cokelaer August 28, 2026 23:07
@cokelaer
cokelaer marked this pull request as ready for review August 28, 2026 23:08
@cokelaer
cokelaer merged commit 10aaa8c into main Aug 28, 2026
4 checks passed
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.

2 participants