Skip to content

Pandas Compatibility and Python 3.14 Upgrade#384

Merged
f-allian merged 6 commits intomainfrom
f-allian/version-bump
May 8, 2026
Merged

Pandas Compatibility and Python 3.14 Upgrade#384
f-allian merged 6 commits intomainfrom
f-allian/version-bump

Conversation

@f-allian
Copy link
Copy Markdown
Collaborator

@f-allian f-allian commented May 1, 2026

Closes issue #376 and #383.

This pull request updates the project to drop support for Python 3.10 and add support for Python 3.14, while also updating dependencies and configuration files to align with the new supported Python versions. It also includes minor code improvements and test adjustments for better compatibility and accuracy.

Python version support and configuration updates:

  • Updated all documentation, CI workflows (.github/workflows/ci-tests.yaml, .github/workflows/ci-tests-drafts.yaml, .github/workflows/publish-to-pypi.yaml, .github/workflows/publish-to-dafni.yaml), and the pyproject.toml and .pre-commit-config.yaml files to support Python 3.11–3.14 instead of 3.10–3.13. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

  • Updated dependency versions in pyproject.toml to use more recent and compatible versions, and simplified conditional dependency logic.

Code and test improvements:

  • Improved type checking for numeric data in causal_testing/estimation/linear_regression_estimator.py to use pd.api.types.is_numeric_dtype, making the code more robust.
  • Minor code cleanup in causal_testing/estimation/ipcw_estimator.py for resetting indices.
  • Adjusted kurtosis test assertions in tests/testing_tests/test_causal_test_adequacy.py to use assertAlmostEqual with a tolerance, improving reliability across platforms and Pandas versions. [1] [2]
  • Removed an unused import in tests/testing_tests/test_causal_test_adequacy.py.

Tutorial and result data updates:

  • Updated small floating-point values in docs/source/tutorials/vaccinating_elderly/causal_test_results.json for improved numerical precision. [1] [2]

@f-allian f-allian self-assigned this May 1, 2026
@f-allian f-allian added the bug Something isn't working label May 1, 2026
@f-allian f-allian added the feature New functionality label May 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 32 0 0.94s
✅ PYTHON pylint 32 0 5.89s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.89%. Comparing base (6dae63f) to head (21d4b50).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #384   +/-   ##
=======================================
  Coverage   97.89%   97.89%           
=======================================
  Files          27       27           
  Lines        1568     1568           
=======================================
  Hits         1535     1535           
  Misses         33       33           
Files with missing lines Coverage Δ
causal_testing/estimation/ipcw_estimator.py 99.26% <100.00%> (ø)
..._testing/estimation/linear_regression_estimator.py 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4ce4e5...21d4b50. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@f-allian f-allian marked this pull request as ready for review May 1, 2026 11:48
@f-allian f-allian requested a review from jmafoster1 May 1, 2026 11:49
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this file be committed? Is it needed for the tutorial or could it be in the .gitignore?

Copy link
Copy Markdown
Collaborator

@jmafoster1 jmafoster1 left a comment

Choose a reason for hiding this comment

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

Thanks, that was much more straightforward than I thought too!

@jmafoster1
Copy link
Copy Markdown
Collaborator

@f-allian I notice that there's still 3.10 runs "Waiting for status". Please can you look into where these are coming from?

@f-allian
Copy link
Copy Markdown
Collaborator Author

f-allian commented May 8, 2026

@jmafoster1 You just need to merge this PR. It's using the old workflows that use the 310 matrix.

@jmafoster1
Copy link
Copy Markdown
Collaborator

Should it not be using the new workflows from the PR? Merging is blocked until everything is passed anyway, so this could be a tricky one...

@f-allian
Copy link
Copy Markdown
Collaborator Author

f-allian commented May 8, 2026

@jmafoster1 No, the PR can't use the new workflows if it hasn't been merged. I'll fix it now.

@f-allian f-allian merged commit 9f06df2 into main May 8, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature New functionality

Projects

Development

Successfully merging this pull request may close these issues.

2 participants