Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on documentation correctness and clarity across Decimo’s Mojo codebase, primarily by expanding docstrings with explicit Raises: sections and converting some file header comments into proper module docstrings.
Changes:
- Add/standardize
Raises:sections across many public APIs (BigDecimal/BigInt/BigUInt/Decimal128/TOML utilities, CLI engine, test helpers). - Improve module-level documentation by replacing banner-style comments with descriptive module docstrings and adding missing package/module docstrings.
- Minor benchmark helper adjustment:
_pad()now usesString.byte_length()when computing padding.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/bigdecimal/test_bigdecimal_methods.mojo | Docstring wording/punctuation tweaks for the test module header. |
| tests/bigdecimal/test_bigdecimal_arithmetics.mojo | Docstring list formatting tweaks. |
| src/decimo/toml/parser.mojo | Adds Raises: sections to TOML public APIs and parse helpers. |
| src/decimo/tests.mojo | Adds Raises: sections to shared test/benchmark helpers. |
| src/decimo/rational/rational.mojo | Adds Raises: sections for Rational arithmetic operators. |
| src/decimo/rational/comparison.mojo | New module docstring for Rational comparison operations. |
| src/decimo/rational/arithmetics.mojo | New module docstring for Rational arithmetic operations. |
| src/decimo/decimal128/utility.mojo | Replaces header comments with a module docstring. |
| src/decimo/decimal128/decimal128.mojo | Adds Raises: sections for Decimal128 operations. |
| src/decimo/decimal128/init.mojo | Adds package docstring for decimal128 subpackage. |
| src/decimo/biguint/biguint.mojo | Adds Raises: sections for multiple BigUInt methods. |
| src/decimo/biguint/arithmetics.mojo | Adds Raises: sections to division helpers. |
| src/decimo/bigint10/bigint10.mojo | Adds Raises: sections and expands docstring(s). |
| src/decimo/bigint/number_theory.mojo | Adds Raises: sections for number theory helpers. |
| src/decimo/bigint/bigint.mojo | Adds Raises: sections for conversion and modular ops. |
| src/decimo/bigfloat/bigfloat.mojo | Adds Raises: sections for conversions and power forwarding. |
| src/decimo/bigdecimal/trigonometric.mojo | Adds module docstring and Raises: sections for trig functions. |
| src/decimo/bigdecimal/rounding.mojo | Adds Raises: sections to rounding helpers. |
| src/decimo/bigdecimal/exponential.mojo | Adds Raises: sections to cache and exponential helpers. |
| src/decimo/bigdecimal/constants.mojo | Adds Raises: sections for π computation helpers. |
| src/decimo/bigdecimal/bigdecimal.mojo | Adds Raises: sections across many BigDecimal APIs. |
| src/decimo/bigdecimal/arithmetics.mojo | Adds Raises: sections to arithmetic helpers. |
| src/cli/calculator/engine.mojo | Documents propagated errors for evaluation helpers. |
| benches/decimal128/mojo/bigdec_ref.mojo | _pad() now uses byte_length() when computing padding. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This PR focuses on documentation correctness and clarity across Decimo’s Mojo codebase, primarily by expanding docstrings with explicit
Raises:sections and converting some file header comments into proper module docstrings.Changes:
Raises:sections across many public APIs (BigDecimal/BigInt/BigUInt/Decimal128/TOML utilities, CLI engine, test helpers)._pad()now usesString.byte_length()when computing padding.