Refactor variable names for consistency #253
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request renames variables throughout the project for consistency and closes #165.
In general, the goal is to use the term "array" when referring to Zarr arrays and the term "field" in most other situations, as opposed to "column" or "variable".
In this pull request, I typically use the type of the Python object to determine an appropriate name. For example, I would name a Python variable that is a
ZarrArraySpec
instancearray_spec
. I determined the type of the objects by running the unit tests with the debugger. There are other locations in the code that refer toZarrArraySpec
instances as "fields" though—if desired, I can rename these as well for more consistency.I also searched for uses of "var". In most cases, it seemed like "var" was used to mean "variant" and not "variable", so I left most of these alone.
Methods
I used regular expression searches to find the instances of the different terminology. For example,
col[^umn]
to find variables named something likecol
.I used PyCharm's refactoring features to rename the Python variables.
Testing
I did not perform any testing of the changes. I am assuming that the unit tests will detect any issues.