-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add query_geodetic_crs_from_datum #1390
base: main
Are you sure you want to change the base?
Conversation
dc10ebd
to
d15793e
Compare
d15793e
to
66ceda0
Compare
I tried to re-produce the error and couldn't with main...snowman2:pyproj:docker . To debug, I suggest modifying the CI tests to specifically run the test that fails and trying these configurations:
|
Also, it may not hurt to rebase this PR against the latest version. |
e237f2e
to
7b5cb5c
Compare
I did rebase (after some problems), but the tests are not running. Is anything broken in the gh actions? |
I see this error:
|
I was able to re-produce this with PROJ 9.3 (both docker & conda envs) and I did not encounter any errors with PROJ 9.4 on the docker image (#1390 (comment)):
If logic is added in the function to not allow running in PROJ 9.3, I would be okay with adding this in. |
36d5482
to
7da1053
Compare
e283198
to
f86934f
Compare
f86934f
to
359918e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1390 +/- ##
==========================================
+ Coverage 96.50% 96.56% +0.05%
==========================================
Files 20 20
Lines 1830 1832 +2
==========================================
+ Hits 1766 1769 +3
+ Misses 64 63 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -268,3 +269,50 @@ def test_get_database_metadata(): | |||
|
|||
def test_get_database_metadata__invalid(): | |||
assert get_database_metadata("doesnotexist") is None | |||
|
|||
|
|||
def test_query_geodetic_crs_from_datum(): |
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.
pytest.mark.parametrize
could help simplify this test.
assert len(crss) == 3 # EPSG, ESRI, OGC | ||
|
||
|
||
def test_query_geodetic_crs_from_datum_invalid(): |
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.
pytest.mark.parametrize
could help simplify this test.
crss = query_geodetic_crs_from_datum("foo-bar", "EPSG", "6269", None) | ||
assert len(crss) == 0 | ||
|
||
with pytest.raises(ValueError): |
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 recommend creating a separate test where ValueError
is raised and use pytest.mark.parametrize
to help simplify this test.
Adds new API to PROJ.
database.query_geodetic_crs_from_datum
history.rst
for all changes andapi/*.rst
for new API