[Git][debian-gis-team/pymap3d][upstream] New upstream version 2.9.1
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Mon Jul 4 07:05:57 BST 2022
Antonio Valentino pushed to branch upstream at Debian GIS Project / pymap3d
Commits:
46be89a8 by Antonio Valentino at 2022-07-04T05:29:13+00:00
New upstream version 2.9.1
- - - - -
16 changed files:
- + .github/workflows/README.md
- .github/workflows/ci_stdlib_only.yml
- + .github/workflows/publish-python-package.yml
- .lgtm.yml
- LICENSE.txt → LICENSE
- pyproject.toml
- scripts/benchmark_ecef2geo.py
- scripts/benchmark_vincenty.py
- setup.cfg
- src/pymap3d/__init__.py
- src/pymap3d/latitude.py
- src/pymap3d/lox.py
- src/pymap3d/mathfun.py
- src/pymap3d/spherical.py
- src/pymap3d/utils.py
- src/pymap3d/vincenty.py
Changes:
=====================================
.github/workflows/README.md
=====================================
@@ -0,0 +1,11 @@
+# GitHub Actions CI workflows
+Definitions for GitHub Actions (continuous integration) workflows
+
+## Publishing
+To publish a new version of the `pymap3d` package to PyPI, create and publish a
+release in GitHub (preferrably from a Git tag) for the version; the workflow
+will automatically build and publish an sdist and wheel from the tag.
+
+Requires the repo secret `PYPI_API_TOKEN` to be set to a PyPI API token: see
+[PyPI's help](https://pypi.org/help/#apitoken) for instructions on how to
+generate one.
=====================================
.github/workflows/ci_stdlib_only.yml
=====================================
@@ -17,7 +17,7 @@ jobs:
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
strategy:
matrix:
- python-version: [ '3.7', '3.8', '3.9', '3.10' ]
+ python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11-dev' ]
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
=====================================
.github/workflows/publish-python-package.yml
=====================================
@@ -0,0 +1,32 @@
+name: publish
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+
+ - uses: actions/checkout at v2
+
+ - name: Set up Python
+ uses: actions/setup-python at v2
+ with:
+ python-version: '3.x'
+
+ - name: Update pip
+ run: pip install -U pip
+
+ - name: Install builder
+ run: pip install build
+
+ - name: Build package
+ run: pyproject-build --outdir dist/ .
+
+ - name: Publish package
+ uses: pypa/gh-action-pypi-publish at release/v1
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_API_TOKEN }}
=====================================
.lgtm.yml
=====================================
@@ -1,3 +1,7 @@
+path_classifiers:
+ test:
+ - exclude: scripts
+
extraction:
python:
python_setup:
=====================================
LICENSE.txt → LICENSE
=====================================
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2018 Michael Hirsch, Ph.D.
+Copyright (c) 2014-2022 Michael Hirsch, Ph.D.
Copyright (c) 2013, Felipe Geremia Nievinski
Copyright (c) 2004-2007 Michael Kleder
@@ -8,4 +8,4 @@ Redistribution and use in source and binary forms, with or without modification,
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=====================================
pyproject.toml
=====================================
@@ -1,5 +1,6 @@
[build-system]
requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
[tool.black]
line-length = 100
=====================================
scripts/benchmark_ecef2geo.py
=====================================
@@ -17,7 +17,7 @@ def bench(N: int) -> float:
z = np.random.random(N)
tic = time.monotonic()
- lat, lon, alt = ecef2geodetic(x, y, z)
+ _, _, _ = ecef2geodetic(x, y, z)
return time.monotonic() - tic
=====================================
scripts/benchmark_vincenty.py
=====================================
@@ -31,7 +31,7 @@ def bench_vreckon(N: int) -> float:
az = np.random.random(N)
tic = time.monotonic()
- a, b = vreckon(ll0[0], ll0[1], sr, az)
+ _, _ = vreckon(ll0[0], ll0[1], sr, az)
return time.monotonic() - tic
@@ -41,7 +41,7 @@ def bench_vdist(N: int) -> float:
lon = np.random.random(N)
tic = time.monotonic()
- asr, aaz = vdist(ll0[0], ll0[1], lat, lon)
+ _, _ = vdist(ll0[0], ll0[1], lat, lon)
return time.monotonic() - tic
=====================================
setup.cfg
=====================================
@@ -1,12 +1,11 @@
[metadata]
name = pymap3d
-version = attr: src.pymap3d.__version__
+version = attr: pymap3d.__version__
author = Michael Hirsch, Ph.D.
author_email = scivision at users.noreply.github.com
description = pure Python (no prereqs) coordinate conversions, following convention of several popular Matlab routines.
long_description = file: README.md
long_description_content_type = text/markdown
-url = https://github.com/geospace-code/pymap3d
keywords =
coordinate conversion
classifiers =
@@ -17,7 +16,11 @@ classifiers =
Programming Language :: Python :: 3
Topic :: Scientific/Engineering :: GIS
license_files =
- LICENSE.txt
+ LICENSE
+project_urls =
+ Documentation = https://geospace-code.github.io/pymap3d
+ Source = https://github.com/geospace-code/pymap3d
+ Tracker = https://github.com/geospace-code/pymap3d/issues
[options]
python_requires = >= 3.7
=====================================
src/pymap3d/__init__.py
=====================================
@@ -29,7 +29,7 @@ Companion packages exist for:
* Fortran: [Maptran3D](https://github.com/geospace-code/maptran3d)
"""
-__version__ = "2.9.0"
+__version__ = "2.9.1"
from .aer import ecef2aer, aer2ecef, geodetic2aer, aer2geodetic
=====================================
src/pymap3d/latitude.py
=====================================
@@ -5,8 +5,8 @@ from __future__ import annotations
from math import pi
from .ellipsoid import Ellipsoid
-from .mathfun import atan, radians, degrees, tan, sin, cos, asinh, atanh, exp, sqrt, inf
-from .utils import sanitize, sign
+from .mathfun import atan, radians, degrees, tan, sin, cos, asinh, atanh, exp, sqrt, inf, sign
+from .utils import sanitize
from . import rcurve
COS_EPS = 1e-9 # tolerance for angles near abs([90, 270])
=====================================
src/pymap3d/lox.py
=====================================
@@ -10,8 +10,7 @@ except ImportError:
from math import pi, tau
from .ellipsoid import Ellipsoid
-from .mathfun import radians, degrees, cos, atan2, tan
-from .utils import sign
+from .mathfun import radians, degrees, cos, atan2, tan, sign
from . import rcurve
from . import rsphere
from .latitude import (
=====================================
src/pymap3d/mathfun.py
=====================================
@@ -21,9 +21,26 @@ try:
arcsinh as asinh,
arctanh as atanh,
power,
+ sign,
+ cbrt,
)
except ImportError:
from math import sin, cos, sqrt, exp, log, inf, isnan, radians, tan, atan, hypot, degrees, atan2, asin, asinh, atanh # type: ignore
def power(x, y): # type: ignore
return pow(x, y)
+
+ def sign(x) -> float: # type: ignore
+ """signum function"""
+ if x < 0:
+ y = -1.0
+ elif x > 0:
+ y = 1.0
+ else:
+ y = 0.0
+
+ return y
+
+ def cbrt(x) -> float: # type: ignore
+ """math.cbrt was added in Python 3.11"""
+ return x ** (1 / 3)
=====================================
src/pymap3d/spherical.py
=====================================
@@ -5,10 +5,10 @@ radius).
"""
from __future__ import annotations
-from .mathfun import radians, sin, hypot, degrees, atan2, asin, sqrt, power
+from .mathfun import radians, sin, hypot, degrees, atan2, asin, sqrt, power, cbrt
from .ellipsoid import Ellipsoid
-from .utils import sanitize, cbrt
+from .utils import sanitize
__all__ = [
=====================================
src/pymap3d/utils.py
=====================================
@@ -5,30 +5,15 @@ all assume radians"""
from __future__ import annotations
from math import pi
-from .ellipsoid import Ellipsoid
-from .mathfun import atan2, hypot, cos, sin, radians
-
try:
- from numpy import asarray, sign, cbrt
+ from numpy import asarray
except ImportError:
+ pass
- def sign(x) -> float: # type: ignore
- """signum function"""
- if x < 0:
- y = -1.0
- elif x > 0:
- y = 1.0
- else:
- y = 0.0
-
- return y
-
- def cbrt(x) -> float: # type: ignore
- """math.cbrt was added in Python 3.11"""
- return x ** (1 / 3)
-
+from .ellipsoid import Ellipsoid
+from .mathfun import atan2, hypot, cos, sin, radians
-__all__ = ["cart2pol", "pol2cart", "cart2sph", "sph2cart", "sign"]
+__all__ = ["cart2pol", "pol2cart", "cart2sph", "sph2cart"]
def cart2pol(x, y) -> tuple:
=====================================
src/pymap3d/vincenty.py
=====================================
@@ -13,9 +13,8 @@ try:
except ImportError:
pass
-from .mathfun import sqrt, tan, sin, cos, isnan, atan, atan2, asin, radians, degrees
+from .mathfun import sqrt, tan, sin, cos, isnan, atan, atan2, asin, radians, degrees, sign
from .ellipsoid import Ellipsoid
-from .utils import sign
__all__ = ["vdist", "vreckon", "track2"]
View it on GitLab: https://salsa.debian.org/debian-gis-team/pymap3d/-/commit/46be89a8fd662de84fffbee65778d7ca7b2d4aab
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pymap3d/-/commit/46be89a8fd662de84fffbee65778d7ca7b2d4aab
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/20220704/80a77707/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list