RadioAstronomySoftwareGroup / RadioAstronomySoftwareGroup/pyuvdata

Refactor equality testing in uvbase and parameter to allow diff printing and move printing in `__eq__` calls to logging

Open
#1,265 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement UVBase
Dominant language
Python
Stars
102
Forks
35
Avg merge
1d 20h
Merged PRs (30d)
14

Description

It would be useful to be able to print the differences between objects without calling __eq__ and we probably do not want __eq__ to print out things by default (it's super useful in test debugging but probably not very useful for users).

Proposal is to move all the code to a helper function that returns a message containing information about the differences.

Then add a method to just print that info, and update the __eq__ function to call it without the printing but add it to logging with a level of "info".

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 by locating the uvbase and parameter equality implementations and reading how their current difference information is produced and printed. Trace the existing logging setup and compare all affected eq calls; done means differences can be requested and printed separately while equality no longer prints by default and reports the information at info level.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.