Skip to content

Update 1.5.0

Choose a tag to compare

@molshape molshape released this 14 Sep 13:56
· 16 commits to main since this release
8129256

What's Changed

  • Refactor code base and add support for hydrogen isotopes -> v1.5.0 by @molshape in #21

Full Changelog: v1.4.1...v1.5.0

This release adds hydrogen isotope support and brings significant improvements to code quality, documentation, and Python compatibility.

New Features and Functionality

  • Adds support for hydrogen isotopes (deuterium "D" and tritium "T") via a global AllowHydrogenIsotopes flag in chemformula.config, with corresponding documentation and usage examples (README.md, examples/example5.py, src/chemformula/chemformula.py) [1] [2] [3] [4].
  • This new feature closes the feature requests #14 and #20.
  • Introduces .contains_isotopes attribute to the ChemFormula class for detecting specific isotopes in formulas, and updates documentation and examples accordingly (README.md, examples/example5.py, src/chemformula/chemformula.py) [1] [2].

Code Quality and Type Safety

  • Adds type stub files chemformula.pyi, elements.pyi, and config.pyi that provide explicit type signatures for all public methods and properties of the ChemFormula class, enhancing static type checking and editor support.
  • Updates development dependencies to include mypy and pins minimum versions for all dev tools; test coverage options are now set in pyproject.toml [1] [2].

Documentation and Example Enhancements

  • Improved README.md: clarified installation instructions, added isotope usage section, fixed typos, updated attribute names (e.g., .radioactive.is_radioactive), and improved output examples for consistency (README.md, examples/example1.py, examples/example2.py, examples/example_general.py) [1] [2] [3] [4] [5] [6] [7] [8].
  • Added docstrings to all attributes and methods for better documentation.