Skip to content

Commit 1e685bd

Browse files
committed
deprecate python 3.8
1 parent e39ce53 commit 1e685bd

7 files changed

Lines changed: 477 additions & 423 deletions

File tree

.github/workflows/build_new_version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919
strategy:
2020
matrix:
21-
python-version: ["3.8", "3.11", "3.12"]
21+
python-version: ["3.9", "3.11", "3.12"]
2222
os: [ubuntu-latest, macos-latest, windows-latest]
2323
fail-fast : false
2424
defaults:

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ target/
151151
profile_default/
152152
ipython_config.py
153153

154-
# pyenv
155-
# .python-version
156-
157154
# pipenv
158155
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
159156
# However, in case of collaboration, if having platform-specific dependencies or dependencies

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.9
1+
3.9.19

gnss_lib_py/parsers/google_decimeter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, input_path, remove_timing_outliers=True):
4949
derived_timestamps = pd_df['millisSinceGpsEpoch'].unique()
5050
mapper = dict(zip(derived_timestamps[1:],derived_timestamps[:-1]))
5151
pd_df = pd_df[pd_df['millisSinceGpsEpoch'] != derived_timestamps[0]]
52-
pd_df.replace({"millisSinceGpsEpoch" : mapper},inplace=True)
52+
pd_df["millisSinceGpsEpoch"] = pd_df["millisSinceGpsEpoch"].replace(mapper)
5353

5454
# Correction 5 implemented verbatim from competition tips
5555
if remove_timing_outliers:

poetry.lock

Lines changed: 463 additions & 411 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ classifiers = [
1717
]
1818

1919
[tool.poetry.dependencies]
20-
python = ">=3.8, < 3.13"
20+
python = ">=3.9, < 3.13"
2121
numpy = "^1.21.0"
22-
pandas = "^2.0.0"
22+
pandas = "^2.2.0"
2323
georinex = "<=1.16.1"
2424
unlzw3 = "^0.2.1"
2525
pynmea2 = "^1.18.0"

tests/parsers/test_google_decimeter.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,11 @@ def test_derived_df_equivalence(derived_path_2021, pd_df, derived_row_map):
135135
derived = google_decimeter.AndroidDerived2021(derived_path_2021,
136136
remove_timing_outliers=False)
137137
measure_df = derived.pandas_df()
138-
measure_df.replace({'gnss_id',"gps"},1,inplace=True)
139-
measure_df.replace({'gnss_id',"glonass"},3,inplace=True)
140-
measure_df.replace({'gnss_id',"galileo"},6,inplace=True)
138+
gnss_id_map = {"gps":1,
139+
"glonass":3,
140+
"galileo":6,
141+
}
142+
measure_df['gnss_id'] = measure_df['gnss_id'].replace(gnss_id_map)
141143
signal_map = {"GPS_L1" : "l1",
142144
"GPS_L5" : "l5",
143145
"GAL_E1" : "e1",
@@ -150,10 +152,13 @@ def test_derived_df_equivalence(derived_path_2021, pd_df, derived_row_map):
150152
"BDS_B2A" : "b2a",
151153
}
152154
for s_key, s_value in signal_map.items():
153-
measure_df.replace({'signal_type',s_value},s_key,inplace=True)
155+
measure_df['signal_type'] = measure_df['signal_type'].replace(s_value,s_key)
154156
measure_df.rename(columns=derived_row_map, inplace=True)
155157
measure_df = measure_df.drop(columns='corr_pr_m')
158+
derived_timestamps = pd_df['millisSinceGpsEpoch'].unique()
159+
mapper = dict(zip(derived_timestamps[1:],derived_timestamps[:-1]))
156160
pd_df = pd_df[pd_df['millisSinceGpsEpoch'] != pd_df.loc[0,'millisSinceGpsEpoch']]
161+
pd_df["millisSinceGpsEpoch"] = pd_df["millisSinceGpsEpoch"].replace(mapper)
157162
pd_df.reset_index(drop=True, inplace=True)
158163
pd.testing.assert_frame_equal(pd_df.sort_index(axis=1),
159164
measure_df.sort_index(axis=1),

0 commit comments

Comments
 (0)