Skip to content

Record the CODATA edition instead of a timestamp in the generated constants file - #279

Open
apdavison wants to merge 1 commit into
python-quantities:masterfrom
apdavison:codata
Open

apdavison wants to merge 1 commit into
python-quantities:masterfrom
apdavison:codata

Conversation

@apdavison

Copy link
Copy Markdown
Contributor

The header of NIST_codata.txt now states the CODATA edition (2006), in the same place and form as in current NIST files. The generator reads it and writes it into _codata.py in place of the "LAST GENERATED" timestamp. The timestamp changed on every build, so building the package always left _codata.py modified in the working copy; the generated file now matches the committed one exactly.

_codata.py keeps one constant per line, so it is easy to search, and these lines can be up to 153 characters long. Ruff's line-length check (E501) is turned off for this file; all other rules still apply to it.

Related to #278

…stants file

The header of NIST_codata.txt now states the CODATA edition (2006), in the same place and form as in current NIST files. The generator reads it and writes it into _codata.py in place of the "LAST GENERATED" timestamp. The timestamp changed on every build, so building the package always left _codata.py modified in the working copy; the generated file now matches the committed one exactly.

_codata.py keeps one constant per line, so it is easy to search, and these lines can be up to 153 characters long. Ruff's line-length check (E501) is turned off for this file; all other rules still apply to it.
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

Successfully merging this pull request may close these issues.

1 participant