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

Could the function names clarify which ones perform an HTTP request? #64

Closed
maelle opened this issue Mar 3, 2022 · 10 comments
Closed
Assignees

Comments

@maelle
Copy link
Collaborator

maelle commented Mar 3, 2022

No description provided.

@maelle
Copy link
Collaborator Author

maelle commented Mar 3, 2022

@annakrystalli I was thinking about this whilst adding fixtures. It'd be nice to know at a glance which ones recycle info from say the client, and which ones don't.

@maelle
Copy link
Collaborator Author

maelle commented Mar 11, 2022

I have been thinking about this again.

@maelle
Copy link
Collaborator Author

maelle commented May 3, 2022

@annakrystalli @salvafern what's your take on this?

@maelle
Copy link
Collaborator Author

maelle commented May 3, 2022

Related #53

@salvafern
Copy link
Collaborator

Hi, I'm not aware of the best practices but seems like a valid point. Other packages use "download" instead of "get" indeed.

@maelle
Copy link
Collaborator Author

maelle commented May 3, 2022

I was inspired by the Art of Readable Code where they wrote "Many Programmers are used to the convention that methods starting with get are 'lightweight accessors' that simply return an internal member."

But maybe we should follow ows4R lead to not confuse users 🤔

@salvafern
Copy link
Collaborator

Well if you think it will improve the code readability I am all in!

@maelle
Copy link
Collaborator Author

maelle commented May 6, 2022

Notes

  • Even if creating the client beforehand, emodnet_get_wfs_info() needs an internet connection because of guess_layer_format(). So maybe its name should contain "fetch"? (or download, I thought of fetch because it's a shorter word)

@maelle
Copy link
Collaborator Author

maelle commented May 6, 2022

  • emodnet_get_layer_info() also performs a query.

@maelle
Copy link
Collaborator Author

maelle commented May 6, 2022

  • emodnet_get_layers() also performs a query.

@maelle maelle closed this as completed Feb 28, 2024
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

No branches or pull requests

3 participants