Skip to content

Commit 2b305ae

Browse files
committed
v1.16.0
ci: condense workflows add missing test data .bz2 file ci: add timeout
1 parent 529c9b0 commit 2b305ae

File tree

5 files changed

+21
-26
lines changed

5 files changed

+21
-26
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,31 @@ on:
88

99
jobs:
1010

11-
linux:
12-
runs-on: ubuntu-latest
11+
ci:
12+
timeout-minutes: 15
13+
runs-on: ${{ matrix.os }}
1314
strategy:
1415
matrix:
15-
python-version: [3.7, 3.9]
16+
python-version: ["3.7", "3.10"]
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
1619
steps:
1720
- uses: actions/checkout@v2
1821
- uses: actions/setup-python@v2
1922
with:
2023
python-version: ${{ matrix.python-version }}
2124

22-
- run: pip install -e .[tests,lint,io]
23-
24-
- run: flake8
25-
- run: mypy
25+
- run: pip install .[tests,lint,io]
2626

27-
- run: pytest
28-
29-
integration:
30-
needs: linux
31-
runs-on: ${{ matrix.os }}
32-
strategy:
33-
matrix:
34-
os: [windows-latest, macos-latest]
35-
steps:
36-
- uses: actions/checkout@v2
37-
- uses: actions/setup-python@v2
38-
with:
39-
python-version: 3.9
27+
- name: syntax check
28+
timeout-minutes: 1
29+
if: startsWith(matrix.os,'ubuntu')
30+
run: flake8
4031

41-
- run: pip install .[tests,io]
32+
- name: type annotation check
33+
timeout-minutes: 10
34+
if: startsWith(matrix.os,'ubuntu')
35+
run: mypy
4236

4337
- run: pytest
38+
timeout-minutes: 5

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = georinex
3-
version = 1.15.1
3+
version = 1.16.0
44
author = Michael Hirsch, Ph.D.
55
author_email = [email protected]
66
description = Python RINEX 2/3 NAV/OBS reader with speed and simplicity.

src/georinex/rio.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def opener(fn: T.TextIO | Path, header: bool = False) -> T.Iterator[T.TextIO]:
4141

4242
if suffix == ".gz":
4343
with gzip.open(fn, "rt") as f:
44-
version, is_crinex = rinex_version(first_nonblank_line(f))
44+
_, is_crinex = rinex_version(first_nonblank_line(f))
4545
f.seek(0)
4646

4747
if is_crinex and not header:
@@ -50,8 +50,9 @@ def opener(fn: T.TextIO | Path, header: bool = False) -> T.Iterator[T.TextIO]:
5050
f = io.StringIO(crx2rnx(f.read()))
5151
yield f
5252
elif suffix == ".bz2":
53+
# this is for plain bzip2 files, NOT tar.bz2, which requires f.seek(512)
5354
with bz2.open(fn, "rt") as f:
54-
version, is_crinex = rinex_version(first_nonblank_line(f))
55+
_, is_crinex = rinex_version(first_nonblank_line(f))
5556
f.seek(0)
5657

5758
if is_crinex and not header:
@@ -74,7 +75,7 @@ def opener(fn: T.TextIO | Path, header: bool = False) -> T.Iterator[T.TextIO]:
7475
yield f
7576
else: # assume not compressed (or Hatanaka)
7677
with fn.open("r", encoding="ascii", errors="ignore") as f:
77-
version, is_crinex = rinex_version(first_nonblank_line(f))
78+
_, is_crinex = rinex_version(first_nonblank_line(f))
7879
f.seek(0)
7980

8081
if is_crinex and not header:
Binary file not shown.

0 commit comments

Comments
 (0)