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

Updated SIA up-casing behavior #545

Merged
merged 5 commits into from
May 22, 2024
Merged

Updated SIA up-casing behavior #545

merged 5 commits into from
May 22, 2024

Conversation

d-giles
Copy link
Contributor

@d-giles d-giles commented May 6, 2024

Modified the behavior of the SIA service where it would upcase all format keywords. Modified to upcase keywords "ALL", "METADATA", and "GRAPHIC", otherwise the parameter is passed unchanged. The format "GRAPHIC-xyz" will capitalize "GRAPHIC" and leave the rest unchanged.

Tests have been added to check that the formats are cased as expected. Variable names have been updated to be more descriptive.

Edit: changed description of PR to reflect updates.

Copy link
Contributor

@msdemlei msdemlei left a comment

Choose a reason for hiding this comment

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

As commented in #544, I think this is a welcome robustness patch.

You should address the style issues, though, and I think a changelog entry "More robust handling of SIA1 FORMAT" would be in order. I am pretty sure that passing in bytes would have failed before anyway, so I don't think dropping it needs mentioning.

The failing tests look unrelated; I suppose we need to work on the robustness of the doctests...

Whoever merges this: My vote is that this should be squash-merged.

pyvo/dal/sia.py Outdated Show resolved Hide resolved
pyvo/dal/sia.py Outdated Show resolved Hide resolved
pyvo/dal/sia.py Outdated Show resolved Hide resolved
@bsipocz bsipocz added the bug label May 8, 2024
@bsipocz bsipocz added this to the v1.5.2 milestone May 8, 2024
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Minor fixes: please remove the debug line, it should fix the test, and fix the style things. You can run flake8 pyvo --count locally to see what they are until the count drops down to 0.

Also, please rebase. Currently, you have each of the commits twice in this PR. A rebase workflow will help mainaining a clean commit history by not allowing multiple versions of the same branches entangled, and it also keeps a clean resolution for commit conflicts, too. I'm happy to walk you through a rebase if you want.

pyvo/dal/sia.py Outdated Show resolved Hide resolved
pyvo/dal/sia.py Outdated Show resolved Hide resolved
@bsipocz
Copy link
Member

bsipocz commented May 8, 2024

We don't need to worry about the changelog failure above, I can move the entry to the bugfix section when/if I'm cutting a bugfix release (not yet sure we will have that or go ahead with the feature release sometimes soon).

@bsipocz
Copy link
Member

bsipocz commented May 8, 2024

@pllim - please add @d-giles to the org, so I don't need to approve CI after each commit

@pllim
Copy link
Member

pllim commented May 8, 2024

Re: #545 (comment)

Added. Hope it helps!

@bsipocz
Copy link
Member

bsipocz commented May 22, 2024

Given the imminent 1.5.2 release, I go ahead and rebase this to fix the conflict, and rerun with a fixed CI.

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

All review comments have been addressed, so I'll merge once CI is all green.

Thank you @d-giles!

@bsipocz bsipocz dismissed msdemlei’s stale review May 22, 2024 02:19

Review comments have been addressed, going ahead with the merge to have this in the new bugfix release.

@bsipocz bsipocz merged commit 0668a3a into astropy:main May 22, 2024
10 checks passed
bsipocz added a commit that referenced this pull request May 22, 2024
Updated SIA up-casing behavior
bsipocz added a commit that referenced this pull request May 22, 2024
Updated SIA up-casing behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants