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

DM-44261: Add support for parsing IVOA POS string #65

Merged
merged 10 commits into from
May 10, 2024
Merged

Conversation

timj
Copy link
Member

@timj timj commented May 8, 2024

@gpdf here is a quick implementation for parsing IVOA POS strings.

  • I copied the continueClass code from lsst.utils since I'm not sure we want to add utils as a dependency.
  • I put all the code in __init__.py since the package is a bit oddly designed in terms of the code all coming from C++.
  • There are no real tests that I did things properly since writing a test that the range/circle/polygon is correct is a bit tricky since if I have implemented this incorrectly I would mostly be creating a sphgeom Region in the same incorrect way in the test. Ideally I need a third party to write some tests.

cc/ @TallJimbo

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@timj timj force-pushed the tickets/DM-44261 branch 2 times, most recently from 4407aa7 to 2ea6e06 Compare May 8, 2024 23:16
Copy link

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks good, few minor questions/comments.

python/lsst/sphgeom/__init__.py Outdated Show resolved Hide resolved
python/lsst/sphgeom/__init__.py Outdated Show resolved Hide resolved
python/lsst/sphgeom/__init__.py Outdated Show resolved Hide resolved
python/lsst/sphgeom/__init__.py Outdated Show resolved Hide resolved
tests/test_ivoa.py Show resolved Hide resolved
@timj timj force-pushed the tickets/DM-44261 branch 3 times, most recently from 7186b1c to 9efc77d Compare May 10, 2024 19:45
@timj
Copy link
Member Author

timj commented May 10, 2024

I have added Region.to_ivoa_pos() so you can now generate POS strings from a region.

@timj timj requested a review from andy-slac May 10, 2024 19:56
@timj
Copy link
Member Author

timj commented May 10, 2024

@andy-slac I changed enough that it's probably worth a quick once over again. Thanks.

Copy link

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks great, a couple of minor comments.

python/lsst/sphgeom/__init__.py Outdated Show resolved Hide resolved
python/lsst/sphgeom/_continue_class.py Show resolved Hide resolved
python/lsst/sphgeom/_continue_class.py Outdated Show resolved Hide resolved
@timj timj merged commit 63cd933 into main May 10, 2024
15 checks passed
@timj timj deleted the tickets/DM-44261 branch May 10, 2024 20:38
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.

2 participants