[Git][debian-gis-team/pymap3d][upstream] New upstream version 2.4.2
Antonio Valentino
gitlab at salsa.debian.org
Tue Jul 28 08:46:46 BST 2020
Antonio Valentino pushed to branch upstream at Debian GIS Project / pymap3d
Commits:
d803aeba by Antonio Valentino at 2020-07-28T06:11:23+00:00
New upstream version 2.4.2
- - - - -
29 changed files:
- .coveragerc
- .github/workflows/ci.yml
- .github/workflows/ci_stdlib_only.yml
- + .github/workflows/codeql-analysis.yml
- mypy.ini → .mypy.ini
- README.md
- + codemeta.json
- pyproject.toml
- − pytest.ini
- tests/benchmark_vincenty.py → scripts/benchmark_vincenty.py
- setup.cfg
- tests/test_aer.py → src/pymap3d/tests/test_aer.py
- tests/test_eci.py → src/pymap3d/tests/test_eci.py
- tests/test_elliposid.py → src/pymap3d/tests/test_elliposid.py
- tests/test_enu.py → src/pymap3d/tests/test_enu.py
- tests/test_geodetic.py → src/pymap3d/tests/test_geodetic.py
- tests/test_latitude.py → src/pymap3d/tests/test_latitude.py
- tests/test_look_spheroid.py → src/pymap3d/tests/test_look_spheroid.py
- tests/test_ned.py → src/pymap3d/tests/test_ned.py
- tests/test_pyproj.py → src/pymap3d/tests/test_pyproj.py
- tests/test_rcurve.py → src/pymap3d/tests/test_rcurve.py
- tests/test_rhumb.py → src/pymap3d/tests/test_rhumb.py
- tests/test_rsphere.py → src/pymap3d/tests/test_rsphere.py
- tests/test_sidereal.py → src/pymap3d/tests/test_sidereal.py
- tests/test_sky.py → src/pymap3d/tests/test_sky.py
- tests/test_time.py → src/pymap3d/tests/test_time.py
- tests/test_vincenty.py → src/pymap3d/tests/test_vincenty.py
- tests/test_vincenty_dist.py → src/pymap3d/tests/test_vincenty_dist.py
- tests/test_vincenty_vreckon.py → src/pymap3d/tests/test_vincenty_vreckon.py
Changes:
=====================================
.coveragerc
=====================================
@@ -1,21 +1,31 @@
+# .coveragerc to control coverage.py
[run]
-cover_pylib = false
+branch = True
+source = src/
+
omit =
- /home/travis/virtualenv/*
- */site-packages/*
- */tests/*
+ archive/*
+ */.local/*
[report]
+# Regexes for lines to exclude from consideration
exclude_lines =
- pragma: no cover
- def __repr__
- except RuntimeError
- except NotImplementedError
- except ImportError
- raise ImportError
- except FileNotFoundError
- except CalledProcessError
- logging.warning
- logging.error
- logging.critical
- if __name__ == .__main__.:
+ # Have to re-enable the standard pragma
+ pragma: no cover
+
+ # Don't complain about missing debug-only code:
+ def __repr__
+ if self\.debug
+
+ # Don't complain if tests don't hit defensive assertion code:
+ raise AssertionError
+ raise NotImplementedError
+
+ # Don't complain if non-runnable code isn't run:
+ if 0:
+ if __name__ == .__main__.:
+
+ignore_errors = True
+
+[html]
+directory = coverage_html_report
=====================================
.github/workflows/ci.yml
=====================================
@@ -12,12 +12,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout at v2
- - uses: actions/setup-python at v1
+ - name: Setup python
+ uses: actions/setup-python at v2
with:
python-version: 3.8
- run: pip install .[full,tests,lint]
- run: flake8
- - run: mypy .
+ - run: mypy . src
- run: pytest
+
+# codecov coverage
+ - run: pip install codecov pytest-cov
+ - run: pytest --cov --cov-report=xml
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action at v1
=====================================
.github/workflows/ci_stdlib_only.yml
=====================================
@@ -12,10 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout at v2
- - uses: actions/setup-python at v1
+ - uses: actions/setup-python at v2
with:
python-version: 3.5
- run: pip install .[tests]
- run: pytest
- working-directory: tests
=====================================
.github/workflows/codeql-analysis.yml
=====================================
@@ -0,0 +1,50 @@
+name: "CodeQL"
+
+on:
+ push:
+ schedule:
+ - cron: '0 10 * * 6'
+
+jobs:
+ analyse:
+ name: Analyse
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout at v2
+ with:
+ # We must fetch at least the immediate parents so that if this is
+ # a pull request then we can checkout the head.
+ fetch-depth: 2
+
+ # If this run was triggered by a pull request event, then checkout
+ # the head of the pull request instead of the merge commit.
+ - run: git checkout HEAD^2
+ if: ${{ github.event_name == 'pull_request' }}
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init at v1
+ # Override language selection by uncommenting this and choosing your languages
+ # with:
+ # languages: go, javascript, csharp, python, cpp, java
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild at v1
+
+ # ℹ️ Command-line programs to run using the OS shell..
+ # 📚 https://git.io/JvXDl
+
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze at v1
=====================================
mypy.ini → .mypy.ini
=====================================
=====================================
README.md
=====================================
@@ -3,29 +3,28 @@
[](https://doi.org/10.5281/zenodo.213676)
[](https://doi.org/10.21105/joss.00580)
[](https://github.com/Ullaakut/astronomer/)
-
+[](https://lgtm.com/projects/g/geospace-code/pymap3d/context:python)


-
-[](https://lgtm.com/projects/g/scivision/pymap3d/context:python)
+
+[](https://codecov.io/gh/geospace-code/pymap3d)
[](https://pypi.python.org/pypi/pymap3d)
[](http://pepy.tech/project/pymap3d)
Pure Python (no prerequistes beyond Python itself) 3-D geographic coordinate conversions and geodesy.
-API similar to popular $1000 Matlab Mapping Toolbox routines for:
-
-* Python
-* [Matlab, GNU Octave](https://github.com/geospace-code/matmap3d)
-* [modern Fortran](https://github.com/geospace-code/maptran)
-
+API similar to popular $1000 Matlab Mapping Toolbox routines for Python
PyMap3D is intended for non-interactive use on massively parallel (HPC) and embedded systems.
-Includes some relevant
-[Vallado algorithms](http://www.smad.com/vallado/fortran/fortran.html).
[API docs](https://geospace-code.github.io/pymap3d/)
Thanks to our [contributors](./contributors.md).
+## Similar toolboxes in other code languages
+
+* [Matlab, GNU Octave](https://github.com/geospace-code/matmap3d)
+* [Fortran](https://github.com/geospace-code/maptran)
+* [Rust](https://github.com/gberrante/map_3d)
+
## Prerequisites
Pymap3d is compatible with Python ≥ 3.5 including PyPy.
=====================================
codemeta.json
=====================================
@@ -0,0 +1,35 @@
+{
+ "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
+ "@type": "SoftwareSourceCode",
+ "license": "https://spdx.org/licenses/BSD-2-Clause",
+ "codeRepository": "https://github.com/geospace-code/pymap3d",
+ "contIntegration": "https://github.com/geospace-code/pymap3d/actions",
+ "dateCreated": "2014-08-01",
+ "datePublished": "2014-08-03",
+ "dateModified": "2020-05-10",
+ "issueTracker": "https://github.com/geospace-code/pymap3d/issues",
+ "name": "PyMap3d",
+ "version": "2.4.1",
+ "identifier": "10.5281/zenodo.3262738",
+ "description": "pure-Python (Numpy optional) 3D coordinate conversions for geospace",
+ "applicationCategory": "geospace",
+ "developmentStatus": "active",
+ "funder": {
+ "@type": "Organization",
+ "name": "AFOSR"
+ },
+ "keywords": [
+ "coordinate transformation"
+ ],
+ "programmingLanguage": [
+ "Python"
+ ],
+ "author": [
+ {
+ "@type": "Person",
+ "@id": "https://orcid.org/0000-0002-1637-6526",
+ "givenName": "Michael",
+ "familyName": "Hirsch"
+ }
+ ]
+}
=====================================
pyproject.toml
=====================================
@@ -2,4 +2,7 @@
requires = ["setuptools", "wheel"]
[tool.black]
-line-length = 132
\ No newline at end of file
+line-length = 132
+
+[tool.pytest.ini_options]
+addopts = "-ra -v"
=====================================
pytest.ini deleted
=====================================
@@ -1,2 +0,0 @@
-[pytest]
-addopts = -ra -v
=====================================
tests/benchmark_vincenty.py → scripts/benchmark_vincenty.py
=====================================
=====================================
setup.cfg
=====================================
@@ -1,6 +1,6 @@
[metadata]
name = pymap3d
-version = 2.4.1
+version = 2.4.2
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.
=====================================
tests/test_aer.py → src/pymap3d/tests/test_aer.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
from math import radians
import pytest
from pytest import approx
@@ -79,7 +78,3 @@ def test_aer_ned(aer, ned):
pm.aer2ned(aer[0], aer[1], -1)
assert pm.ned2aer(*ned) == approx(aer)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_eci.py → src/pymap3d/tests/test_eci.py
=====================================
@@ -94,7 +94,3 @@ def test_aer2eci(use_astropy):
with pytest.raises(ValueError):
pm.aer2eci(aer[0], aer[1], -1, *lla, t)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_elliposid.py → src/pymap3d/tests/test_elliposid.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
import pymap3d as pm
@@ -28,7 +27,3 @@ def test_ellipsoid():
assert pm.ecef2geodetic(*xyz0, ell=pm.Ellipsoid("mars")) == approx([42.009428417, -82.006479, 2.981246e6])
assert pm.ecef2geodetic(*xyz0, ell=pm.Ellipsoid("venus")) == approx([41.8233663, -82.0064785, 3.17878159e5])
assert pm.ecef2geodetic(*xyz0, ell=pm.Ellipsoid("moon")) == approx([41.8233663, -82.0064785, 4.630878e6])
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_enu.py → src/pymap3d/tests/test_enu.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
from math import radians
import pytest
from pytest import approx
@@ -56,7 +55,3 @@ def test_enu_ecef(enu, lla, xyz):
assert e == approx(enu[0])
assert n == approx(enu[1])
assert u == approx(enu[2])
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_geodetic.py → src/pymap3d/tests/test_geodetic.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
from math import radians, nan, sqrt, isnan
@@ -187,7 +186,3 @@ def test_somenan():
lat, lon, alt = pm.ecef2geodetic(xyz[:, 0], xyz[:, 1], xyz[:, 2])
assert (lat[0], lon[0], alt[0]) == approx(lla0)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_latitude.py → src/pymap3d/tests/test_latitude.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
import pytest
from pytest import approx
from math import radians, inf
@@ -143,7 +142,3 @@ def test_badvals(lat):
pm.geodetic2parametric(lat)
with pytest.raises(ValueError):
pm.parametric2geodetic(lat)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_look_spheroid.py → src/pymap3d/tests/test_look_spheroid.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
import pymap3d as pm
@@ -47,7 +46,3 @@ def test_array():
truth = np.array([[42.00103959, lla0[1], 230.9413173], [42.00177328, -81.9995808, 282.84715651], [nan, nan, nan]])
assert np.column_stack((lat, lon, sr)) == approx(truth, nan_ok=True)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_ned.py → src/pymap3d/tests/test_ned.py
=====================================
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-import pytest
from pytest import approx
import pymap3d as pm
@@ -55,7 +53,3 @@ def test_ned_geodetic():
assert isinstance(lat, float)
assert isinstance(lon, float)
assert isinstance(alt, float)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_pyproj.py → src/pymap3d/tests/test_pyproj.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
from pymap3d.vincenty import vreckon
@@ -31,7 +30,3 @@ def test_compare_geodetic():
assert pyproj.transform(lla, ecef, lla0[1], lla0[0], lla0[2]) == approx(xyz)
assert pyproj.transform(ecef, lla, *xyz) == approx((lla0[1], lla0[0], lla0[2]))
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_rcurve.py → src/pymap3d/tests/test_rcurve.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
import pytest
from pytest import approx
import pymap3d as pm
@@ -32,7 +31,3 @@ def test_numpy_meridian():
def test_numpy_transverse():
pytest.importorskip("numpy")
assert pm.rcurve_transverse([0, 90]) == approx([A, 6399593.626])
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_rhumb.py → src/pymap3d/tests/test_rhumb.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
import pymap3d as pm
@@ -92,7 +91,3 @@ def test_numpy_loxodrome_direct():
def test_meanm(lat, lon):
pytest.importorskip("numpy")
assert pm.meanm(lat, lon) == approx([47.26967, 18.460557])
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_rsphere.py → src/pymap3d/tests/test_rsphere.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
import pytest
from pytest import approx
import pymap3d as pm
@@ -47,7 +46,3 @@ def test_rsphere_euler():
def test_numpy_rsphere_euler():
pytest.importorskip("numpy")
assert pm.rsphere_euler([42, 0], [82, 0], 44, 100) == approx([6386606.829131, 6363111.70923164])
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_sidereal.py → src/pymap3d/tests/test_sidereal.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
from math import radians
@@ -32,7 +31,3 @@ def test_anglesep():
def test_anglesep_meeus():
# %% compare with astropy
assert pmh.anglesep_meeus(35, 23, 84, 20) == approx(ha)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_sky.py → src/pymap3d/tests/test_sky.py
=====================================
@@ -34,7 +34,3 @@ def test_numpy_radec2azel(use_astropy):
pytest.importorskip("numpy")
azel1 = pm.radec2azel([166.503208, 166.503208], [55, 55], lat, lon, t0, use_astropy=use_astropy)
assert azel1 == approx(azel, rel=0.01)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_time.py → src/pymap3d/tests/test_time.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
from datetime import datetime
@@ -54,7 +53,3 @@ def test_pandas_time():
t = pandas.Series([t0, t0])
assert (str2dt(t) == t0).all()
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_vincenty.py → src/pymap3d/tests/test_vincenty.py
=====================================
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-import pytest
from pytest import approx
import pymap3d.vincenty as vincenty
@@ -8,7 +6,3 @@ def test_track2():
lats, lons = vincenty.track2(40, 80, 65, -148, npts=3)
assert lats == approx([40, 69.633139886, 65])
assert lons == approx([80, 113.06849104, -148])
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_vincenty_dist.py → src/pymap3d/tests/test_vincenty_dist.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python3
import pytest
from pytest import approx
import pymap3d.vincenty as vincenty
@@ -47,7 +46,3 @@ def test_identity(lat, lon, slantrange, az):
assert dist == approx(slantrange)
assert az1 == approx(az)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
=====================================
tests/test_vincenty_vreckon.py → src/pymap3d/tests/test_vincenty_vreckon.py
=====================================
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import pytest
from pytest import approx
import pymap3d.vincenty as vincenty
@@ -46,7 +45,3 @@ def test_both_vector():
a, b = vincenty.vreckon(10, 20, sr1, az1)
assert a == approx(lat3)
assert b == approx(lon3)
-
-
-if __name__ == "__main__":
- pytest.main([__file__])
View it on GitLab: https://salsa.debian.org/debian-gis-team/pymap3d/-/commit/d803aeba94d4db906be340516e78d3d8a047c5d1
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pymap3d/-/commit/d803aeba94d4db906be340516e78d3d8a047c5d1
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/20200728/11b1f99c/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list