Skip to content

Commit

Permalink
v1.16.0
Browse files Browse the repository at this point in the history
ci: condense workflows

add missing test data .bz2 file

ci: add timeout
  • Loading branch information
scivision committed Nov 26, 2021
1 parent 529c9b0 commit 2b305ae
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 26 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,31 @@ on:

jobs:

linux:
runs-on: ubuntu-latest
ci:
timeout-minutes: 15
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, 3.9]
python-version: ["3.7", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- run: pip install -e .[tests,lint,io]

- run: flake8
- run: mypy
- run: pip install .[tests,lint,io]

- run: pytest

integration:
needs: linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: syntax check
timeout-minutes: 1
if: startsWith(matrix.os,'ubuntu')
run: flake8

- run: pip install .[tests,io]
- name: type annotation check
timeout-minutes: 10
if: startsWith(matrix.os,'ubuntu')
run: mypy

- run: pytest
timeout-minutes: 5
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = georinex
version = 1.15.1
version = 1.16.0
author = Michael Hirsch, Ph.D.
author_email = [email protected]
description = Python RINEX 2/3 NAV/OBS reader with speed and simplicity.
Expand Down
7 changes: 4 additions & 3 deletions src/georinex/rio.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def opener(fn: T.TextIO | Path, header: bool = False) -> T.Iterator[T.TextIO]:

if suffix == ".gz":
with gzip.open(fn, "rt") as f:
version, is_crinex = rinex_version(first_nonblank_line(f))
_, is_crinex = rinex_version(first_nonblank_line(f))
f.seek(0)

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

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

if is_crinex and not header:
Expand Down
Binary file not shown.

0 comments on commit 2b305ae

Please sign in to comment.