Fix release-readiness findings and release 1.6.3#15
Merged
Conversation
Addresses the holistic review in REVIEW.md, in order of severity. CRITICAL - Fix the ReadTheDocs build: nbsphinx executed the example notebooks in a separate Jupyter kernel that has neither conf.py's sys.path insert nor an installed encomp (RTD uses --no-install-project), so every RTD build broke from PR #13 and the 1.6.2 docs never published. Render committed notebook outputs on RTD (nbsphinx_execute="never" when READTHEDOCS is set) and keep CI's sphinx-build -W as the notebook-correctness gate. Update the stale .readthedocs.yaml comment. MAJOR - Reword docs/usage.md "Custom base dimensionalities": only `normal` and `currency` are predefined; media dims (dry_air/fuel) are user-defined, and `water` is a pint density unit that cannot be used as a media tag. MINOR - Add a docs-rtd CI job that rebuilds the docs in an RTD-equivalent environment (no project install, READTHEDOCS set) and gate publish on it, so an RTD-only break fails the PR instead of silently landing. - Add FrequencyUnits literal + __new__ overloads so Q(50, "Hz") infers Frequency statically and Hz is in get_registered_units(). - Document the stray-.env import-failure footgun in the README Settings section. - Clean up test-debt markers in test_units.py: assert the current redirect behavior instead of a disabled negative test, and narrow broad pytest.raises(Exception) catches to DimensionalityTypeError. NIT - Reword the "base class cannot be instantiated" usage note. - Cache lib_version() with lru_cache like its siblings. - Delete the redundant Water.REPR_PROPERTIES (inherited unchanged). - Add README changelog pointer (GitHub Releases) and document the in-wheel test suite as a post-install smoke test. Tests - Add meaningful public-API tests for previously-uncovered behavior: isinstance_types non-Quantity unions, convert_volume_mass Series-density validation, convert_gas_volume invalid-condition typing, Dimensionality subclass errors, coolprop invalid assume_phase, Quantity.check() with a Dimensionality instance / raw pint quantity, Fluid/Water/HumidAir fixed-point-count validation, describe() unknown name, and Frequency inference. conversion/gases/misc reach 100%. Bump version to 1.6.3 (pyproject, uv.lock, README logo tag). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Works through the findings in
REVIEW.mdin order of severity, then bumps the patch version to 1.6.3.CRITICAL
conf.py'ssys.pathinsert nor an installedencomp(RTD uses--no-install-project), so every RTD build broke from PR Address release readiness review #13 onward and the 1.6.2 docs never published. Render committed notebook outputs on RTD (nbsphinx_execute="never"whenREADTHEDOCSis set); CI'ssphinx-build -W(real plugin, executes notebooks) stays the correctness gate. Stale.readthedocs.yamlcomment updated.MAJOR
docs/usage.mdmedia-dimensionalities claim corrected. Onlynormalandcurrencyare predefined; media dims (dry_air/fuel) are user-defined viadefine_dimensionality(), andwateris a pint density unit that can't be used as a media tag.MINOR
docs-rtdCI job rebuilds the docs in an RTD-equivalent environment (no project install,READTHEDOCSset);publishnow depends on it, so an RTD-only break fails the PR instead of silently landing.FrequencyUnitsliteral +__new__overloads:Q(50, "Hz")now infersFrequencystatically andHzis inget_registered_units()..envimport-failure footgun.test_units.py: assert the current redirect behavior instead of a disabled negative test; narrow broadpytest.raises(Exception)toDimensionalityTypeError.NIT
@lru_cacheonlib_version(); deleted the redundantWater.REPR_PROPERTIES; README changelog pointer (GitHub Releases) + in-wheel test-suite note.Tests
convert_volume_massSeries-density validation,convert_gas_volumeinvalid condition,Dimensionalitysubclass errors, coolprop invalidassume_phase,Quantity.check()with aDimensionalityinstance / raw pint quantity, Fluid/Water/HumidAir fixed-point-count validation,describe()unknown name, Frequency inference).conversion/gases/miscreach 100%.Local verification
pyright(strict): 0 errors.pyrefly check: 0 errors (42 suppressed).ruff check/format: clean.pytest: 694 passed.-Wboth ways: RTD path (READTHEDOCS=True, notebooks not executed) and CI path (notebooks executed with the real plugin).🤖 Generated with Claude Code