Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repr for VOTable is now clearer #14702

Merged
merged 1 commit into from Jun 2, 2023
Merged

Conversation

pllim
Copy link
Member

@pllim pllim commented Apr 27, 2023

Description

This pull request is to fix #14700

@pllim pllim added this to the v6.0 milestone Apr 27, 2023
@github-actions
Copy link

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see "When to rebase and squash commits".
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • Is a milestone set? Milestone must be set but we cannot check for it on Actions; do not let the green checkmark fool you.
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@pllim
Copy link
Member Author

pllim commented Jun 2, 2023

Any objection for this one?

Copy link
Contributor

@tomdonaldson tomdonaldson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @pllim.

@pllim pllim merged commit e62fd73 into astropy:main Jun 2, 2023
20 of 23 checks passed
@pllim pllim deleted the votable-print-clearer branch June 2, 2023 12:33
@bsipocz
Copy link
Member

bsipocz commented Jun 2, 2023

Can we call this a bugfix though rather than a new feature? (misrepresenting is a bug in my read)

@pllim pllim added the Bug label Jun 2, 2023
pllim added a commit to pllim/astropy that referenced this pull request Jun 2, 2023
@pllim
Copy link
Member Author

pllim commented Jun 2, 2023

Sure, please see #14906

Comment on lines +2423 to +2425
s = repr(self.to_table())
if s.startswith("<Table"):
s = "<VO" + s[1:]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this again, now I wonder why the conditional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To guard against something else breaking unexpectedly because this is old code and I don't understand the whole stack in this subpackage. So I chose to be very explicit on when to overwrite the repr. Did this if break stuff for you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No break, I'm just about to do some more similar things in pyvo and spotted this as something odd

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are sure you don't need the if, you can remove it. I am just not 100% sure and don't have time to investigate. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: change representation of votable.tree.Table vs table.Table
3 participants