Skip to content

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

Merged
sbillinge merged 6 commits into
diffpy:mainfrom
bobleesj:isfloat
Dec 31, 2024
Merged

refactor: separate isfloat into a new file within validators.py and rename to is_number#301
sbillinge merged 6 commits into
diffpy:mainfrom
bobleesj:isfloat

Conversation

@bobleesj

Copy link
Copy Markdown
Contributor

Closes#7

Copy link
Copy Markdown
ContributorAuthor

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


import numpy

from diffpy.utils import validators

@bobleesjbobleesjDec 31, 2024

Copy link
Copy Markdown
ContributorAuthor

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

Comment threadtests/test_validators.py Outdated
from diffpy.utils.validators import is_number
import pytest

@pytest.mark.parametrize("input,expected", [

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Lots of tests

@codecov

codecovBot commented Dec 31, 2024

Copy link
Copy Markdown

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 linesCoverage Δ
tests/test_validators.py100.00% <100.00%> (ø)

@bobleesjbobleesj changed the title refactor: separate isfloat into a separate file within validators.py and rename to is_numberrefactor: separate isfloat into a new file within validators.py and rename to is_numberDec 31, 2024
@bobleesj

Copy link
Copy Markdown
ContributorAuthor

@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:mainDec 31, 2024
@sbillinge

Copy link
Copy Markdown
Contributor

very beautiful.

Sign up for freeto 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

@bobleesj@sbillinge