SethMMorton / fastnumbers

Super-fast and clean conversions to numbers for Python.
https://pypi.org/project/fastnumbers/
MIT License
105 stars 13 forks source link

Make map option of functions #67

Closed SethMMorton closed 1 year ago

SethMMorton commented 1 year ago

To simplify the surface area of the API, we will remove the map_* functions and add a map option to the try_* functions. Once this is achieved, we can make it toggle-able as to whether map returns a list or iter.

codecov[bot] commented 1 year ago

Codecov Report

Base: 94.42% // Head: 94.51% // Increases project coverage by +0.08% :tada:

Coverage data is based on head (8bc4afb) compared to base (aec997a). Patch coverage: 97.66% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #67 +/- ## ========================================== + Coverage 94.42% 94.51% +0.08% ========================================== Files 16 19 +3 Lines 1705 1787 +82 Branches 238 242 +4 ========================================== + Hits 1610 1689 +79 - Misses 21 22 +1 - Partials 74 76 +2 ``` | [Impacted Files](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton) | Coverage Δ | | |---|---|---| | [include/fastnumbers/parser/base.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9wYXJzZXIvYmFzZS5ocHA=) | `85.71% <66.66%> (ø)` | | | [include/fastnumbers/exception.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9leGNlcHRpb24uaHBw) | `77.77% <77.77%> (ø)` | | | [include/fastnumbers/iteration.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9pdGVyYXRpb24uaHBw) | `86.79% <90.90%> (+0.12%)` | :arrow_up: | | [include/fastnumbers/selectors.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9zZWxlY3RvcnMuaHBw) | `92.85% <92.85%> (ø)` | | | [src/cpp/implementation.cpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-c3JjL2NwcC9pbXBsZW1lbnRhdGlvbi5jcHA=) | `97.92% <97.08%> (-0.45%)` | :arrow_down: | | [include/fastnumbers/buffer.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9idWZmZXIuaHBw) | `97.95% <100.00%> (-0.05%)` | :arrow_down: | | [include/fastnumbers/c\_str\_parsing.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9jX3N0cl9wYXJzaW5nLmhwcA==) | `88.46% <100.00%> (ø)` | | | [include/fastnumbers/ctype\_extractor.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9jdHlwZV9leHRyYWN0b3IuaHBw) | `95.04% <100.00%> (ø)` | | | [include/fastnumbers/evaluator.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9ldmFsdWF0b3IuaHBw) | `86.74% <100.00%> (ø)` | | | [include/fastnumbers/implementation.hpp](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton#diff-aW5jbHVkZS9mYXN0bnVtYmVycy9pbXBsZW1lbnRhdGlvbi5ocHA=) | `100.00% <100.00%> (ø)` | | | ... and [14 more](https://codecov.io/gh/SethMMorton/fastnumbers/pull/67?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Seth+Morton)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.