Skip to content

Commit

Permalink
add georinex.versions for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Oct 18, 2023
1 parent c689a5a commit b3e0fc5
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ requires = ["setuptools>=61.0.0", "wheel"]

[project]
name = "georinex"
version = "1.16.1"
description = "Python RINEX 2/3 NAV/OBS reader with speed and simplicity."
keywords = ["RINEX", "sp3", "HDF5", "NetCDF4"]
classifiers = [
Expand All @@ -16,12 +15,13 @@ classifiers = [
"Topic :: Scientific/Engineering :: Atmospheric Science"
]
requires-python = ">=3.7"
dynamic = ["readme"]
dynamic = ["readme", "version"]
dependencies = ["python-dateutil", "numpy", "xarray", "hatanaka", "ncompress"]


[tool.setuptools.dynamic]
readme = {file = ["README.md"], content-type = "text/markdown"}
version = {attr = "georinex.__version__"}

[project.optional-dependencies]
tests = ["pytest", "pytest-timeout"]
Expand Down
2 changes: 2 additions & 0 deletions src/georinex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
from .nav3 import rinexnav3, navheader3, navtime3
from .sp3 import load_sp3
from .keplerian import keplerian2ecef

__version__ = "1.16.2"
1 change: 0 additions & 1 deletion src/georinex/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def batch_convert(
*,
fast: bool = True,
):

path = Path(path).expanduser()

flist = (f for f in path.glob(glob) if f.is_file())
Expand Down
2 changes: 0 additions & 2 deletions src/georinex/nav2.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def rinexnav2(fn: T.TextIO | Path, tlim: tuple[datetime, datetime] = None):
raws = []

with opener(fn) as f:

header = navheader2(f)

if header["filetype"] == "N":
Expand Down Expand Up @@ -230,7 +229,6 @@ def navheader2(f: T.TextIO) -> dict[T.Hashable, T.Any]:


def _timenav(ln: str) -> datetime:

year = int(ln[3:5])
if 80 <= year <= 99:
year += 1900
Expand Down
3 changes: 0 additions & 3 deletions src/georinex/nav3.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ def _skip(f: T.TextIO, Nl: int):


def _time(ln: str) -> datetime:

return datetime(
year=int(ln[4:8]),
month=int(ln[9:11]),
Expand Down Expand Up @@ -233,7 +232,6 @@ def _sparefields(cf: list[str], sys: str, N: int) -> list[str]:


def _fields(ln: str, sv_sys: str) -> list[str]:

if sv_sys == "G":
"""
ftp://igs.org/pub/data/format/rinex303.pdf
Expand Down Expand Up @@ -466,7 +464,6 @@ def _fields(ln: str, sv_sys: str) -> list[str]:


def navheader3(f: T.TextIO) -> dict[T.Hashable, T.Any]:

if isinstance(f, (str, Path)):
with opener(f, header=True) as h:
return navheader3(h)
Expand Down
2 changes: 0 additions & 2 deletions src/georinex/obs2.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def rinexobs2(
fast: bool = True,
interval: float | int | timedelta = None,
):

if isinstance(use, str):
use = {use}

Expand Down Expand Up @@ -561,7 +560,6 @@ def _timehdr(ln: str) -> datetime:


def _timeobs(ln: str) -> datetime:

year = int(ln[1:3])
if year < 80:
year += 2000
Expand Down
1 change: 0 additions & 1 deletion src/georinex/plot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
axs = fg.subplots(4, 1, sharex=True)

for v, ax in zip(what, axs):

if v not in obs:
continue

Expand Down
2 changes: 0 additions & 2 deletions src/georinex/tests/test_hatanaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


def test_obs2():

fn = R / "york0440.15d"

info = gr.rinexinfo(fn)
Expand All @@ -23,7 +22,6 @@ def test_obs2():

@pytest.mark.timeout(30)
def test_obs3_gz():

fn = R / "CEBR00ESP_R_20182000000_01D_30S_MO.crx.gz"

info = gr.rinexinfo(fn)
Expand Down
1 change: 0 additions & 1 deletion src/georinex/tests/test_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
ids=["obs2", "obs3", "nav2", "nav3", "Cobs1", "NetCDF_obs2"],
)
def test_header(fn, rtype, vers):

if fn.suffix == ".nc" and netCDF4 is None:
pytest.skip("no netCDF4")

Expand Down
1 change: 0 additions & 1 deletion src/georinex/tests/test_nav3.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def test_mixed(fname):
ids=["SBAS", "GPS", "BDS", "GAL", "GLO"],
)
def test_large(filename, sv, shape):

nav = gr.load(R / filename, use=sv[0])

assert nav.svtype[0] == sv[0] and len(nav.svtype) == 1
Expand Down
1 change: 0 additions & 1 deletion src/georinex/tests/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def test_tlim(fn, tlim, tref, tlen):
# %% currently, interval is only for OBS2 and OBS3
@pytest.mark.parametrize("interval, expected_len", [(None, 14), (15, 14), (35, 8)])
def test_interval_obs3(interval, expected_len):

obs = gr.load(
R / "CEDA00USA_R_20182100000_23H_15S_MO.rnx.gz",
interval=interval,
Expand Down
1 change: 0 additions & 1 deletion src/georinex/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@


def globber(path: Path, glob: list[str]) -> list[Path]:

path = Path(path).expanduser()
if path.is_file():
return [path]
Expand Down
18 changes: 18 additions & 0 deletions src/georinex/versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import xarray
import numpy
import sys
import pandas
from . import __version__

print("Georinex", __version__)
print("Python", sys.version, sys.platform)
print("xarray", xarray.__version__)
print("Numpy", numpy.__version__)
print("Pandas", pandas.__version__)

try:
import pytest

print("Pytest", pytest.__version__)
except ImportError:
pass

0 comments on commit b3e0fc5

Please sign in to comment.