Update 1.5.0
What's Changed
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
AllowHydrogenIsotopesflag inchemformula.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_isotopesattribute to theChemFormulaclass 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, andconfig.pyithat provide explicit type signatures for all public methods and properties of theChemFormulaclass, enhancing static type checking and editor support. - Updates development dependencies to include
mypyand pins minimum versions for all dev tools; test coverage options are now set inpyproject.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.