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

factor out isfloat to a separate file #7

Open
1 task
pavoljuhas opened this issue Feb 28, 2018 · 5 comments
Open
1 task

factor out isfloat to a separate file #7

pavoljuhas opened this issue Feb 28, 2018 · 5 comments
Milestone

Comments

@pavoljuhas
Copy link
Member

Perhaps to diffpy.utils.typecheck module?

  • check if there is any existing Python package with "isfloat" functionality.
@Sparks29032
Copy link
Collaborator

Could use isfloat from fastnumbers, compatible with 3.7+ (including 3.11).

Maybe good to create a new module diffpy.utils.helpers or something to put isfloat into. I would also like to put the exceptions in the custom_exceptions.py file into that new module.

@sbillinge
Copy link
Contributor

I guess isfloat could go into validators if we make that (see my recent issue). I think keeping custom_exceptions in a module with that name will make them more discoverable too, or mayb just exceptions.py . So we have "validators", "exceptions", serializers" and so on . It seems like a good organizational scheme for a repo that is called "utils".

btw, why does it have to be a float? is an integer not ok? Python automatically treats integers as floats if they are composed int a math expression with other floats. What is the reason it has to be a float and not a number (more general)?

@Sparks29032
Copy link
Collaborator

The times isfloat is used is when checking whe a nonnumerical data type (like string) may encode a float. It can be given a more generic name like isnumber.

@sbillinge sbillinge added this to the 3.5.1 release milestone Nov 15, 2024
@bobleesj
Copy link
Contributor

@lucas-lemos-da-silva has volunteered to resolve this issue. if you have any questions regarding this issue, please feel free to tag @sbillinge or @bobleesj here.

@bobleesj
Copy link
Contributor

Lucas, please let us know today or tmr - if this issue is a bit challenging, I can resolve this issue since 3.6.0 is pending soon

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 a pull request may close this issue.

4 participants