[Git][debian-gis-team/python-pyproj][experimental] 5 commits: Add Breaks for rdeps with autopkgtest failures.

Bas Couwenberg gitlab at salsa.debian.org
Sun May 3 05:55:50 BST 2020



Bas Couwenberg pushed to branch experimental at Debian GIS Project / python-pyproj


Commits:
4529572d by Bas Couwenberg at 2020-05-02T16:14:21+02:00
Add Breaks for rdeps with autopkgtest failures.

- - - - -
f40914e6 by Bas Couwenberg at 2020-05-03T06:45:02+02:00
New upstream version 2.6.1~rc1+ds
- - - - -
93292042 by Bas Couwenberg at 2020-05-03T06:45:04+02:00
Update upstream source from tag 'upstream/2.6.1_rc1+ds'

Update to upstream version '2.6.1~rc1+ds'
with Debian dir feced5cf834cdbc6abb203eaf6962d41074dbb0b
- - - - -
74d55e6f by Bas Couwenberg at 2020-05-03T06:45:19+02:00
New upstream release candidate.

- - - - -
c9deed50 by Bas Couwenberg at 2020-05-03T06:48:02+02:00
Set distribution to experimental.

- - - - -


8 changed files:

- debian/changelog
- debian/control
- pyproj/__init__.py
- pyproj/_transformer.pyx
- pyproj/proj.py
- pyproj/transformer.py
- test/test_proj.py
- test/test_transformer.py


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+python-pyproj (2.6.1~rc1+ds-1~exp1) experimental; urgency=medium
+
+  * New upstream release candidate.
+  * Add Breaks for rdeps with autopkgtest failures.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 03 May 2020 06:47:48 +0200
+
 python-pyproj (2.6.1~rc0+ds-1~exp1) experimental; urgency=medium
 
   * New upstream release candidate.


=====================================
debian/control
=====================================
@@ -27,6 +27,7 @@ Depends: ${python3:Depends},
          ${shlibs:Depends},
          ${misc:Depends},
          proj-data
+Breaks: pyresample (<= 1.15.0+ds-1)
 Description: Python 3 interface to PROJ library
  PROJ performs cartographic transformations between geographic (lat/lon)
  and map projection (x/y) coordinates. It can also transform directly


=====================================
pyproj/__init__.py
=====================================
@@ -28,7 +28,7 @@ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIO
 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 """
-__version__ = "2.6.1rc0"
+__version__ = "2.6.1rc1"
 __all__ = [
     "Proj",
     "Geod",


=====================================
pyproj/_transformer.pyx
=====================================
@@ -424,8 +424,8 @@ cdef class _Transformer(Base):
             return
         if radians and self.is_pipeline:
             warnings.warn(
-                "radian input with pipelines is not supported and may result "
-                "in unexpected transformations."
+                "radian input with pipelines is not supported in pyproj 2. "
+                "support for raidans will be added in pyproj 3."
             )
 
         tmp_pj_direction = _PJ_DIRECTION_MAP[TransformDirection.create(direction)]


=====================================
pyproj/proj.py
=====================================
@@ -137,6 +137,7 @@ class Proj(_Proj):
         latitude: Any,
         inverse: bool = False,
         errcheck: bool = False,
+        radians: bool = False,
     ) -> Tuple[Any, Any]:
         """
         Calling a Proj class instance with the arguments lon, lat will
@@ -158,6 +159,11 @@ class Proj(_Proj):
         inverse: boolean, optional
             If inverse is True the inverse transformation from x/y to
             lon/lat is performed. Default is False.
+        radians: boolean, optional
+            If True, will expect input data to be in radians and will return radians
+            if the projection is geographic. Default is False (degrees).
+            This does not work with pyproj 2 and is ignored. It will be enabled again
+            in pyproj 3.
         errcheck: boolean, optional
             If True an exception is raised if the errors are found in the process.
             By default errcheck=False and ``inf`` is returned.
@@ -167,6 +173,11 @@ class Proj(_Proj):
         Tuple[Any, Any]:
             The transformed coordinates.
         """
+        if radians:
+            warnings.warn(
+                "radian input is currently not supported in pyproj 2. "
+                "Support for radian input will be added in pyproj 3."
+            )
         # process inputs, making copies that support buffer API.
         inx, xisfloat, xislist, xistuple = _copytobuffer(longitude)
         iny, yisfloat, yislist, yistuple = _copytobuffer(latitude)


=====================================
pyproj/transformer.py
=====================================
@@ -363,7 +363,7 @@ class Transformer:
         radians: boolean, optional
             If True, will expect input data to be in radians and will return radians
             if the projection is geographic. Default is False (degrees). Ignored for
-            pipeline transformations.
+            pipeline transformations with pyproj 2, but will work in pyproj 3.
         errcheck: boolean, optional
             If True an exception is raised if the transformation is invalid.
             By default errcheck=False and an invalid transformation


=====================================
test/test_proj.py
=====================================
@@ -522,3 +522,9 @@ def test_numpy_bool_kwarg_true():
         proj="utm", zone=32, ellipsis="WGS84", datum="WGS84", units="m", south=south
     )
     assert "+south " in proj.srs
+
+
+def test_proj_radians_warning():
+    proj = Proj("epsg:4326")
+    with pytest.warns(UserWarning, match="radian"):
+        proj(1, 2, radians=True)


=====================================
test/test_transformer.py
=====================================
@@ -594,16 +594,15 @@ def test_transform_group__missing_best():
             )
 
         assert not trans_group.best_available
-        assert len(trans_group.transformers) == 37
-        assert len(trans_group.unavailable_operations) == 41
+        assert "ntv2_0" not in trans_group.transformers[0].definition
+        assert "ntv2_0" in trans_group.unavailable_operations[0].to_proj4()
     else:
         # assuming all grids avaiable or PROJ_NETWORK=ON
         trans_group = pyproj.transformer.TransformerGroup(
             lat_lon_proj.crs, alaska_aea_proj.crs
         )
         assert trans_group.best_available
-        assert len(trans_group.transformers) == 78
-        assert len(trans_group.unavailable_operations) == 0
+        assert "ntv2_0" in trans_group.transformers[0].definition
 
 
 def test_transform_group__area_of_interest():
@@ -738,5 +737,5 @@ def test_pipeline_itransform(pipeline_str):
 
 def test_pipeline_radian_transform_warning():
     trans = Transformer.from_pipeline("+proj=pipeline +ellps=GRS80 +step +proj=cart")
-    with pytest.warns(UserWarning):
+    with pytest.warns(UserWarning, match="radian"):
         trans.transform(0.1, 0.1, 0, radians=True)



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/-/compare/b6f95328dc0e04eba2622b9e86587ad572bc7c52...c9deed50ceeef58504044a980a4e5e3d62ff586b

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/-/compare/b6f95328dc0e04eba2622b9e86587ad572bc7c52...c9deed50ceeef58504044a980a4e5e3d62ff586b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20200503/6ce27db4/attachment-0001.html>


More information about the Pkg-grass-devel mailing list