uk-fci / nhs-number

Python package to provide utilities for NHS Numbers, including validity checks, normalisation, and generation.
https://nhs-number.uk-fci.tech/
MIT License
4 stars 6 forks source link

Rename `normalise_number()` to `normalise()`? #16

Closed pacharanero closed 1 year ago

pacharanero commented 1 year ago

It's pretty obvious throughout that we are dealing with a number, so the _number bit in normalise_number() is tautologous. I think from an external API point of view it is neater. Any objections to renaming normalise_number() to normalise()? Or, we could alias it, so that calling normalise_number() calls normalise(), and then users can choose.

eatyourpeas commented 1 year ago

I think normalise() is better. Or standard_format() might be even clearer, but normalise() for sure works.

andylaw commented 1 year ago

I vote standardise_format(). On reflection, normalisation is a statistical process and there will be dozens of packages with their own normalise() functions. I prefer standardise_format() over standard_format() because my head mostly prefers function names to be "active"

andylaw commented 1 year ago

The logical additional change will then be to rename the file from normalise.py to standardise.py

pacharanero commented 1 year ago

How about just standardise()? I agree with preferring functions with 'active' names. Also agree that normalise()(ation) is a statistical/database related term.

Options are:

We could cater for more than one of the above by 'wrapping' function() in function_alternate_name() which calls function() with the same parameters. This might help us avoid breaking the current API for any existing users.

andylaw commented 1 year ago

I prefer the explicitness of standardise_format(). See Pull Request #20