-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fixing a query generation for the epn-tap data model. #395
Conversation
Codecov Report
@@ Coverage Diff @@
## main #395 +/- ##
=======================================
Coverage ? 79.96%
=======================================
Files ? 52
Lines ? 5969
Branches ? 0
=======================================
Hits ? 4773
Misses ? 1196
Partials ? 0
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this PR and this works for me:
registry.search(registry.Datamodel('epntap'))
now retrieves 244 rows.
Thanks msdemlei !
pyvo/registry/tests/test_regtap.py
Outdated
# the following test is written this oddly to avoid that extra | ||
# warnings break it. | ||
expectation = set( | ||
['The resource ivo://pyvo/test_regtap.py has multipl']) | ||
assert set(str(w.message)[:50] for w in recwarn | ||
) & expectation == expectation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a simpler way to check for the expected warning in the set?
# the following test is written this oddly to avoid that extra | |
# warnings break it. | |
expectation = set( | |
['The resource ivo://pyvo/test_regtap.py has multipl']) | |
assert set(str(w.message)[:50] for w in recwarn | |
) & expectation == expectation | |
assert 'The resource ivo://pyvo/test_regtap.py has multipl' in [str(w.message)[:50] for w in recwarn] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit over engineered, any reasons not to use the pytest.warns
context in tests?
4048ced
to
5c3c474
Compare
On Tue, Jan 10, 2023 at 10:49:43AM -0800, Adrian wrote:
```suggestion
assert 'The resource ivo://pyvo/test_regtap.py has multipl' in [str(w.message)[:50] for w in recwarn]
```
Fair enough. Force-pushed the change.
Thanks!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good except for the style issues.
Given this is a user reported bug and also present in the latest release, it should have a changelog entry. |
5c3c474
to
c7ad518
Compare
On Wed, Jan 11, 2023 at 03:43:09PM -0800, Brigitta Sipőcz wrote:
Given this is a user reported bug and also present in the latest
release, it should have a changelog entry.
Added one, force-pushed. @andamian: is that the style issue you were
mentioning? If so, would you merge? Thanks!
|
The style check action is still not green in CI. Check https://github.com/astropy/pyvo/actions/runs/3900161110/jobs/6660548272 |
On Thu, Jan 12, 2023 at 01:45:43AM -0800, Adrian wrote:
The style check action is still not green in CI. Check https://github.com/astropy/pyvo/actions/runs/3900161110/jobs/6660548272
Ah dang, missed that. I'll need to fix my commit routine...
|
Given this is all approved, I'll just go ahead and fix the minor issue and changelog conflict and merge it. |
c7ad518
to
4fc8d11
Compare
Thanks @msdemlei for the fix! |
On Tue, Jan 24, 2023 at 11:22:40AM -0800, Brigitta Sipőcz wrote:
Given this is all approved, I'll just go ahead and fix the minor issue and changelog conflict and merge it.
Thanks! (And sorry for having missed the problem).
|
Fixing a query generation for the epn-tap data model.
This closes bug #393