PyMPDATA icon indicating copy to clipboard operation
PyMPDATA copied to clipboard

add alternative implementation of `clock()` for use with Python > 3.12

Open Sfonxu opened this issue 9 months ago • 4 comments

Fix concerning #551.

Sfonxu avatar May 08 '25 11:05 Sfonxu

@Sfonxu, WOW, it seems that bumping pylint job to Python 3.13 will not work:

PyMPDATA/solver.py:1:0: F0002: PyMPDATA/solver.py: Fatal error while checking 'PyMPDATA/solver.py'.
Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in
 '/home/runner/.cache/pylint/pylint-crash-2025-05-09-12-49-16.txt'. (astroid-error)

I guess, we should:

  • [ ] submit a bug report as requested
  • [x] stick to earlier Python version for the pylint job, and add a pylint-disable comment for the offending ctypes code

slayoo avatar May 09 '25 12:05 slayoo

hmmmm... the crash also happens on 3.12

slayoo avatar May 09 '25 13:05 slayoo

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.98%. Comparing base (ba4999f) to head (91588c8). Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
+ Coverage   91.85%   91.98%   +0.12%     
==========================================
  Files          30       30              
  Lines        1485     1509      +24     
==========================================
+ Hits         1364     1388      +24     
  Misses        121      121              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar May 09 '25 18:05 codecov[bot]

closing & reopening to trigger CI build against current main

slayoo avatar May 09 '25 22:05 slayoo

Well, this turned out to be a bit of a mess. I'll think about how to best write the crash report. There are also similar issues already present (#10326 & #10014). It's also an issue with pylint<3.0.0 on python 3.13 I think. It does not occur with pylint>3.0.0 (on my machine) but generates a lot of warnings as per #411.

@Sfonxu, WOW, it seems that bumping pylint job to Python 3.13 will not work:

PyMPDATA/solver.py:1:0: F0002: PyMPDATA/solver.py: Fatal error while checking 'PyMPDATA/solver.py'.
Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in
 '/home/runner/.cache/pylint/pylint-crash-2025-05-09-12-49-16.txt'. (astroid-error)

I guess, we should:

* [ ]  submit a bug report as requested

* [x]  stick to earlier Python version for the pylint job, and add a pylint-disable comment for the offending ctypes code

Sfonxu avatar May 12 '25 16:05 Sfonxu

I also have no idea how to make Codecov realize we are actually testing both variants of clock during CI runs

Sfonxu avatar May 12 '25 17:05 Sfonxu

I also have no idea how to make Codecov realize we are actually testing both variants of clock during CI runs

Seems to work with changes in https://github.com/open-atmos/PyMPDATA/pull/553/commits/5f88435464f78809f5580eedc30e78c4341abb4b and https://github.com/open-atmos/PyMPDATA/pull/553/commits/91588c86fce8c0d1cbbf9beba0ae21014806868f - codecov sums the coverage

slayoo avatar May 14 '25 23:05 slayoo