Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

Rename functions in resources.py #259

Merged
merged 9 commits into from
Nov 29, 2017
Merged

Rename functions in resources.py #259

merged 9 commits into from
Nov 29, 2017

Conversation

hayfield
Copy link
Contributor

@hayfield hayfield commented Nov 29, 2017

This renames functions as per the proposed changes in #258.

Fixes renaming part of #258

The all adds verbosity to the name. That the function name is plural already indicates that there will be multiple.
@hayfield hayfield added api Changes to the pyIATI API. incomplete A PR that is in a state that is not ready for review. resources Relating to handling of resource (not code) files. labels Nov 29, 2017
Before this, some functions with a 'get' prefix were collating a series of paths, while others were constructing a single path.
Some level of difference could kinda be identified by the plurality of the name. This was not clear.

Having a different verb for different actions is clearer.
The usage of these functions is as if they are constants / variables. As such, code that calls these functions is clearer if they are named as such.
The original name was taken from the pkg_resources module. This module does not have clear naming. As such, better names should be provided when the module is wrapped.
Slight fail in renaming functions for #259...
@hayfield hayfield added complete A PR that is in a state that is ready for review. and removed incomplete A PR that is in a state that is not ready for review. labels Nov 29, 2017
@hayfield hayfield requested a review from a team November 29, 2017 10:52
@hayfield hayfield added incomplete A PR that is in a state that is not ready for review. and removed complete A PR that is in a state that is ready for review. labels Nov 29, 2017
@hayfield
Copy link
Contributor Author

Currently a fail in the renaming of get_all_schema_paths

@hayfield hayfield removed the request for review from a team November 29, 2017 11:10
A renaming fail happened. This resolves it.
A function was missed in c9a013a
This renames that function for the same reason.
@hayfield hayfield added complete A PR that is in a state that is ready for review. and removed incomplete A PR that is in a state that is not ready for review. labels Nov 29, 2017
@hayfield hayfield requested a review from a team November 29, 2017 11:15
@hayfield
Copy link
Contributor Author

hayfield commented Nov 29, 2017

Suggest maybe changing get_schema_paths() to something like get_all_schema_paths() or such to clarify that it's all types of Schema.

Thoughts @dalepotter?

dalepotter
dalepotter previously approved these changes Nov 29, 2017
Copy link
Contributor

@dalepotter dalepotter left a comment

Choose a reason for hiding this comment

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

Looks good to me!

This improves clarity between activity, org, all and every type of Schema
Copy link
Contributor

@dalepotter dalepotter left a comment

Choose a reason for hiding this comment

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

c1caf4d looks good to me.

@hayfield hayfield merged commit 44c68ff into dev Nov 29, 2017
@hayfield hayfield deleted the rename-resources-functions branch November 29, 2017 12:07
@hayfield hayfield mentioned this pull request Nov 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api Changes to the pyIATI API. complete A PR that is in a state that is ready for review. resources Relating to handling of resource (not code) files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants