Skip to content

Restore compatibility with expected minimum Cython version#1798

Merged
ischoegl merged 2 commits intoCantera:mainfrom
speth:cython-backwards-compat
Oct 21, 2024
Merged

Restore compatibility with expected minimum Cython version#1798
ischoegl merged 2 commits intoCantera:mainfrom
speth:cython-backwards-compat

Conversation

@speth
Copy link
Copy Markdown
Member

@speth speth commented Oct 21, 2024

Changes proposed in this pull request

The stated minimum version of Cython is 0.29.31, in both the documentation of the dependencies and as checked by SCons. However, Cantera currently fails to compile except with Cython 3.0.0 and newer due to differences in the way __add__/__radd__ and related operators are implemented.

While I expect we'll probably drop support for anything older than Cython 3.0.0 after the Cantera 3.1 release, I'd like to maintain support for these older versions for the time being.

This also updates the CI configuration to make sure we're testing more than just the latest and greatest Cython version.

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

@speth speth force-pushed the cython-backwards-compat branch from d49b4c8 to 6320dd4 Compare October 21, 2024 02:34
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.23%. Comparing base (4a954f9) to head (6320dd4).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
interfaces/cython/cantera/func1.pyx 76.47% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1798      +/-   ##
==========================================
- Coverage   73.24%   73.23%   -0.01%     
==========================================
  Files         381      381              
  Lines       54377    54390      +13     
  Branches     9066     9066              
==========================================
+ Hits        39826    39833       +7     
- Misses      11580    11585       +5     
- Partials     2971     2972       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@speth speth marked this pull request as ready for review October 21, 2024 16:38
Copy link
Copy Markdown
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

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

@speth ... thanks for catching this. I was honestly under the impression that we did test multiple Cython versions.

@ischoegl ischoegl merged commit bb12f25 into Cantera:main Oct 21, 2024
@speth speth deleted the cython-backwards-compat branch October 21, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants