Skip to content

Pandas Compatibility and Python 3.14 Upgrade#384

Open
f-allian wants to merge 5 commits intomainfrom
f-allian/version-bump
Open

Pandas Compatibility and Python 3.14 Upgrade#384
f-allian wants to merge 5 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 1.6s
✅ PYTHON pylint 32 0 6.31s

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.90%. Comparing base (f4361b5) to head (7a2437b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #384   +/-   ##
=======================================
  Coverage   97.90%   97.90%           
=======================================
  Files          27       27           
  Lines        1572     1572           
=======================================
  Hits         1539     1539           
  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 2bd52f1...7a2437b. 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!

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