Skip to content

Conversation

@ischoegl
Copy link
Member

@ischoegl ischoegl commented Feb 6, 2025

Changes proposed in this pull request

Minor follow-up to #1850. IndexError and ArraySizeError have different APIs (one uses max index and the other array size), where the former has the wrinkle that it won't work for empty arrays (with npos being a workaround). The update avoids having to call IndexError with array size - 1.

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

@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 35.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 74.40%. Comparing base (fd1a410) to head (e3adce4).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/equil/MultiPhase.cpp 0.00% 3 Missing ⚠️
src/base/ctexceptions.cpp 33.33% 1 Missing and 1 partial ⚠️
src/kinetics/Kinetics.cpp 33.33% 2 Missing ⚠️
include/cantera/base/Solution.h 0.00% 1 Missing ⚠️
include/cantera/oneD/Domain1D.h 50.00% 1 Missing ⚠️
include/cantera/oneD/OneDim.h 0.00% 1 Missing ⚠️
src/base/SolutionArray.cpp 0.00% 1 Missing ⚠️
src/thermo/Phase.cpp 50.00% 1 Missing ⚠️
src/zeroD/ReactorNet.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1851   +/-   ##
=======================================
  Coverage   74.40%   74.40%           
=======================================
  Files         386      386           
  Lines       53630    53630           
  Branches     9064     9064           
=======================================
  Hits        39905    39905           
  Misses      10653    10653           
  Partials     3072     3072           

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

@ischoegl ischoegl marked this pull request as ready for review February 6, 2025 04:49
@ischoegl ischoegl requested a review from a team February 6, 2025 04:49
@ischoegl ischoegl force-pushed the consistent-IndexError branch from 82329fc to e3adce4 Compare February 9, 2025 15:22
Copy link
Member

@speth speth left a comment

Choose a reason for hiding this comment

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

Thanks, @ischoegl. This is a good simplification.

@speth speth merged commit 0720efb into Cantera:main Feb 14, 2025
48 of 49 checks passed
@ischoegl ischoegl deleted the consistent-IndexError branch June 3, 2025 16:43
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