Skip to content

Conversation

itnonaka
Copy link

Changes proposed in this pull request

  • Added the "m³" line in src/base/Units.cpp so Cantera can not only get m^3 but also read m³ as volume unit.
  • Added the "m³" in unit basic conversion in test/general/test_units.cpp so it can also be tested.

If applicable, provide an example illustrating new features this pull request is introducing

When reading a .yaml file, it must have the units that the coefficients are referring to. However, sometimes people may use the same unit but in a different format, for example, m³ instead of m^3. Now, both ways can be read.

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

Copy link
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.

Thanks, @itnonaka - this is a nice follow-up to the recently introduced support for the unicode alternative to m^2. I have a couple of minor requests.

  • Documentation: search for instances of m^3 in *.md files ... there are several instances where m^3 is used in sample code. Replace 2 or 3 instances of sample code while leaving the rest as m^3 so users see both versions; however, replace all instances of m^3 that are part of comments.
  • Documentation (cont'd): search for "Supported compound units are:" and add to the Volume entry, so it's clear that it's an alternative to m^3 that is supported (you could also add the unicode version of dyn/cm^2 on the line above
  • Python unit tests: add alternative lines in test_utils.py (as in the C++ google tests, add new lines with cm³ without replacing cm^3).

@ischoegl ischoegl added the Input Input parsing and conversion (for example, ck2yaml) label Sep 30, 2025
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.43%. Comparing base (99550d0) to head (3678fa1).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1989      +/-   ##
==========================================
- Coverage   75.58%   75.43%   -0.15%     
==========================================
  Files         451      454       +3     
  Lines       56362    56348      -14     
  Branches     9299     9299              
==========================================
- Hits        42602    42508      -94     
- Misses      10616    10698      +82     
+ Partials     3144     3142       -2     

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

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

@itnonaka itnonaka requested a review from ischoegl October 6, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Input Input parsing and conversion (for example, ck2yaml)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants