sgkit-dev / bio2zarr

Convert bioinformatics file formats to Zarr
Apache License 2.0
26 stars 7 forks source link

Refactor variable names for consistency #253

Closed Will-Tyler closed 3 months ago

Will-Tyler commented 3 months ago

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 instance array_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 to ZarrArraySpec 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 like col.

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.

coveralls commented 3 months ago

Coverage Status

coverage: 98.841% (-0.04%) from 98.884% when pulling 74fa91b2a3f0cd824166606ddf1d638e78016bfa on Will-Tyler:issue-165 into 31a593531370e4833e4a68028bbd20626bbc2e70 on sgkit-dev:main.

Will-Tyler commented 3 months ago

252 is merged now, and just rebased this branch!

coveralls commented 3 months ago

Coverage Status

coverage: 98.843%. remained the same when pulling 0dc6dea517fd13b326d212cf7b6d355dfbb129c4 on Will-Tyler:issue-165 into d683a313adb36fb69dbeb0c1bc8b07a9db557a32 on sgkit-dev:main.

coveralls commented 3 months ago

Coverage Status

coverage: 98.886% (+0.04%) from 98.843% when pulling 0dc6dea517fd13b326d212cf7b6d355dfbb129c4 on Will-Tyler:issue-165 into d683a313adb36fb69dbeb0c1bc8b07a9db557a32 on sgkit-dev:main.