PolicyEngine / PolicyEngine/policyengine-uk

Replace `num_*` with `count_*` for variables that indicate number of something

Open
#418 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code-health
Dominant language
Python
Stars
50
Forks
33
Avg merge
20h 58m
Merged PRs (30d)
14

Description

num_ can be confused for an identifier, the online consensus suggests that count is clearer. Or we could also drop the qualifier altogether, e.g. num_adults -> adults.

Example:

https://github.com/PolicyEngine/openfisca-uk/blob/1f788df0c8307fc9e6b93c15d4e67f53da0581b0/openfisca_uk/variables/demographic/household.py#L164

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with variables/demographic/household.py at the referenced line, then search the repository for num_ variable names and their references. Establish whether count_ or unqualified names are intended before updating the affected definitions and usages; done means the naming is consistent throughout and the existing checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.