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

consistent naming convention in API #82

Open
ecoon opened this issue Nov 8, 2024 · 1 comment
Open

consistent naming convention in API #82

ecoon opened this issue Nov 8, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ecoon
Copy link

ecoon commented Nov 8, 2024

Is your feature request related to a problem?

It would be nice to have a consistent API naming convention across the various data access classes. Specifically:

https://github.com/hyriver/pynhd/blob/main/src/pynhd/pynhd.py#L727 --> WaterData.byid()

vs.

https://github.com/hyriver/pynhd/blob/main/src/pynhd/core.py#L224 --> AGRBase.byids() (e.g. NHD, NHDPlusHR, etc)

I'm fairly sure that the semantics are the same (e.g. both accept a list of IDs, not just a single ID).

Describe the solution you'd like

Change WaterData.byid() --> WaterData.byids() to match others.

Describe alternatives you've considered

No response

Additional context

I haven't seen any other instances of byid() in hyriver, but probably a quick grep would check to allow making them all consistent across the project. Nice work by the way!

@ecoon ecoon added the enhancement New feature or request label Nov 8, 2024
@cheginit
Copy link
Collaborator

cheginit commented Nov 8, 2024

I agree with this. I've been planning to work on this for a while now, but haven't really had the chance to work on it. It's not just this name, there are other instances like bygeom vs bygeometry. This has to be done in backward compatible way, so essentially just new names are just aliases for the previous functions. A PR is appreciated.

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

No branches or pull requests

2 participants