Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle plus sign in scientific notation floats #223

Merged
merged 4 commits into from
Mar 10, 2025

Conversation

cvigilv
Copy link
Contributor

@cvigilv cvigilv commented Jan 16, 2025

This PR adds the ability to have floating number in scientific notation as follows:

1e+10
1E+10

Before, it would raise an error of the type:

problem with number read 1e, not a float number
problem with number read 1E, not a float number

Example:

julia> net = readnewick("((a:1,(b:1)):5,(c:1):1e+10);")
HybridNetwork, Rooted Network
6 edges
7 nodes: 3 tips, 0 hybrid nodes, 4 internal tree nodes.
tip labels: a, b, c
((a:1.0,(b:1.0)):5.0,(c:1.0):1.0e10);

To Do:

  • Cover with unit tests

@cvigilv
Copy link
Contributor Author

cvigilv commented Jan 16, 2025

This is a draft PR since I'm unsure where to put the test. Please let me know and I'll do that.

@cecileane cecileane marked this pull request as ready for review March 10, 2025 21:51
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/readwrite.jl 90.37% <100.00%> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cecileane cecileane merged commit 336a82c into JuliaPhylo:master Mar 10, 2025
5 checks passed
@cecileane
Copy link
Member

Thank you Carlos @cvigilv for your contribution! 🎉 This is so much appreciated.
I apologize for the delay in acting on your PR. The start of the semester was busy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants