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

refactor: separate isfloat into a new file within validators.py and rename to is_number #301

Merged
merged 6 commits into from
Dec 31, 2024

Conversation

bobleesj
Copy link
Contributor

Closes #7

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reran auto_api just to ensure the new api is loading since we've created a new file src/diffpy/utils/validators.py

@@ -17,6 +17,8 @@

import numpy

from diffpy.utils import validators
Copy link
Contributor Author

@bobleesj bobleesj Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import is_number from validators

from diffpy.utils.validators import is_number
import pytest

@pytest.mark.parametrize("input,expected", [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of tests

Copy link

codecov bot commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9ce1769) to head (f8b1c41).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #301   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         9    +1     
  Lines          511       516    +5     
=========================================
+ Hits           511       516    +5     
Files with missing lines Coverage Δ
tests/test_validators.py 100.00% <100.00%> (ø)

@bobleesj bobleesj changed the title refactor: separate isfloat into a separate file within validators.py and rename to is_number refactor: separate isfloat into a new file within validators.py and rename to is_number Dec 31, 2024
@bobleesj
Copy link
Contributor Author

@sbillinge ready for review - seems like we are all done with 3.6.0 issues on time! Dec 30th.

I also spoke to Lucas as well. Once merged, I will use this PR as an educational material.

@sbillinge sbillinge merged commit 52f1c79 into diffpy:main Dec 31, 2024
5 checks passed
@sbillinge
Copy link
Contributor

very beautiful.

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.

factor out isfloat to a separate file
2 participants