From a564ccd4b306934034bb5c0f5dc5857fe728675b Mon Sep 17 00:00:00 2001 From: Tom Goetz Date: Sat, 2 Nov 2024 13:56:18 -0400 Subject: [PATCH 1/3] Issue #231: handle no avtivity name --- Fit | 2 +- dev-requirements.txt | 8 +- garmindb/download.py | 2 +- garmindb/version_info.py | 2 +- requirements.in | 6 +- requirements.txt | 155 +++++++++++++++++++++++++++++++++++++-- test/test_fit_file.py | 3 +- 7 files changed, 159 insertions(+), 19 deletions(-) diff --git a/Fit b/Fit index 56fe4dd..008dd9c 160000 --- a/Fit +++ b/Fit @@ -1 +1 @@ -Subproject commit 56fe4dd214d84f6b7c4d7877a723cd633ee5f1a3 +Subproject commit 008dd9c1c2f261cc0c088ea451588d9f8bb03d27 diff --git a/dev-requirements.txt b/dev-requirements.txt index 1ea41cf..ca1028e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -flake8==7.0.0 -build==1.0.3 -wheel==0.42.0 -twine==5.0.0 +flake8==7.1.1 +build==1.2.1 +wheel==0.44.0 +twine==5.1.1 diff --git a/garmindb/download.py b/garmindb/download.py index 7b85175..0977864 100755 --- a/garmindb/download.py +++ b/garmindb/download.py @@ -243,7 +243,7 @@ def get_activities(self, directory, count, overwite=False): activities = self.__get_activity_summaries(0, count) for activity in tqdm(activities or [], unit='activities'): activity_id_str = str(activity['activityId']) - activity_name_str = conversions.printable(activity['activityName']) + activity_name_str = conversions.printable(activity.get('activityName')) root_logger.info("get_activities: %s (%s)", activity_name_str, activity_id_str) json_filename = f'{directory}/activity_{activity_id_str}' if not os.path.isfile(json_filename + '.json') or overwite: diff --git a/garmindb/version_info.py b/garmindb/version_info.py index 87cd2ec..52571aa 100644 --- a/garmindb/version_info.py +++ b/garmindb/version_info.py @@ -8,7 +8,7 @@ python_required = (3, 0, 0) dev_python_required = (3, 9, 0) python_tested = (3, 11, 4) -version_info = (3, 6, 0) +version_info = (3, 6, 1) prerelease = True diff --git a/requirements.in b/requirements.in index 70672cc..ad6c808 100644 --- a/requirements.in +++ b/requirements.in @@ -1,8 +1,8 @@ -sqlalchemy~=2.0.27 +sqlalchemy~=2.0.32 python-dateutil cached-property tqdm -garth>=0.4.44 -fitfile>=1.1.7 +garth>=0.4.46 +fitfile>=1.1.8 tcxfile>=1.0.4 idbutils>=1.1.0 diff --git a/requirements.txt b/requirements.txt index 12cb8e6..a58fc7e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,148 @@ -SQLAlchemy==2.0.27 -python-dateutil==2.8.2 +SQLAlchemy==2.0.32 +python-dateutil==2.9.0.post0 cached-property==1.5.2 -tqdm==4.66.2 -garth>=0.4.44 -fitfile>=1.1.7 -tcxfile>=1.0.4 -idbutils>=1.1.0 - +tqdm==4.66.5 +garth==0.4.46 +fitfile==1.1.8 +tcxfile==1.0.4 +idbutils==1.1.0 +## The following requirements were added by pip freeze: +annotated-types==0.7.0 +anyio==4.4.0 +appnope==0.1.4 +argon2-cffi==23.1.0 +argon2-cffi-bindings==21.2.0 +arrow==1.3.0 +asttokens==2.4.1 +async-lru==2.0.4 +attrs==24.2.0 +babel==2.16.0 +backports.tarfile==1.2.0 +beautifulsoup4==4.12.3 +bleach==6.1.0 +branca==0.7.2 +build==1.2.1 +certifi==2024.8.30 +cffi==1.17.0 +charset-normalizer==3.3.2 +comm==0.2.2 +contourpy==1.3.0 +cycler==0.12.1 +debugpy==1.8.5 +decorator==5.1.1 +defusedxml==0.7.1 +docutils==0.21.2 +executing==2.1.0 +fastjsonschema==2.20.0 +flake8==7.1.1 +fonttools==4.53.1 +fqdn==1.5.1 +h11==0.14.0 +httpcore==1.0.5 +httpx==0.27.2 +idna==3.8 +importlib_metadata==8.4.0 +ipykernel==6.29.5 +ipyleaflet==0.19.2 +ipython==8.27.0 +ipython-genutils==0.2.0 +ipywidgets==8.1.5 +isoduration==20.11.0 +jaraco.classes==3.4.0 +jaraco.context==6.0.1 +jaraco.functools==4.0.2 +jedi==0.19.1 +Jinja2==3.1.4 +json5==0.9.25 +jsonpointer==3.0.0 +jsonschema==4.23.0 +jsonschema-specifications==2023.12.1 +jupyter-events==0.10.0 +jupyter-leaflet==0.19.2 +jupyter-lsp==2.2.5 +jupyter_client==8.6.2 +jupyter_core==5.7.2 +jupyter_server==2.14.2 +jupyter_server_terminals==0.5.3 +jupyterlab==4.2.5 +jupyterlab_pygments==0.3.0 +jupyterlab_server==2.27.3 +jupyterlab_widgets==3.0.13 +keyring==25.3.0 +kiwisolver==1.4.5 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 +matplotlib==3.9.2 +matplotlib-inline==0.1.7 +mccabe==0.7.0 +mdurl==0.1.2 +mistune==3.0.2 +more-itertools==10.4.0 +nbclient==0.10.0 +nbconvert==7.16.4 +nbformat==5.10.4 +nest-asyncio==1.6.0 +nh3==0.2.18 +notebook==7.2.2 +notebook_shim==0.2.4 +numpy==2.1.0 +oauthlib==3.2.2 +overrides==7.7.0 +packaging==24.1 +pandas==2.2.2 +pandocfilters==1.5.1 +parso==0.8.4 +pexpect==4.9.0 +pillow==10.4.0 +pkginfo==1.10.0 +platformdirs==4.2.2 +prometheus_client==0.20.0 +prompt_toolkit==3.0.47 +psutil==6.0.0 +ptyprocess==0.7.0 +pure_eval==0.2.3 +pycodestyle==2.12.1 +pycparser==2.22 +pydantic==2.8.2 +pydantic_core==2.20.1 +pyflakes==3.2.0 +Pygments==2.18.0 +pyparsing==3.1.4 +pyproject_hooks==1.1.0 +python-json-logger==2.0.7 +pytz==2024.1 +PyYAML==6.0.2 +pyzmq==26.2.0 +readme_renderer==44.0 +referencing==0.35.1 +requests==2.32.3 +requests-toolbelt==1.0.0 +rfc3339-validator==0.1.4 +rfc3986==2.0.0 +rfc3986-validator==0.1.1 +rich==13.8.0 +rpds-py==0.20.0 +Send2Trash==1.8.3 +six==1.16.0 +snakemd==2.2.0 +sniffio==1.3.1 +soupsieve==2.6 +stack-data==0.6.3 +terminado==0.18.1 +tinycss2==1.3.0 +tornado==6.4.1 +traitlets==5.14.3 +traittypes==0.2.1 +twine==5.1.1 +types-python-dateutil==2.9.0.20240821 +typing_extensions==4.12.2 +tzdata==2024.1 +uri-template==1.3.0 +urllib3==2.2.2 +wcwidth==0.2.13 +webcolors==24.8.0 +webencodings==0.5.1 +websocket-client==1.8.0 +widgetsnbextension==4.0.13 +xyzservices==2024.6.0 +zipp==3.20.1 diff --git a/test/test_fit_file.py b/test/test_fit_file.py index 1e60e53..d335620 100644 --- a/test/test_fit_file.py +++ b/test/test_fit_file.py @@ -16,7 +16,7 @@ root_logger = logging.getLogger() handler = logging.FileHandler('fit_file.log', 'w') root_logger.addHandler(handler) -root_logger.setLevel(logging.INFO) +root_logger.setLevel(logging.DEBUG) logger = logging.getLogger(__name__) @@ -180,6 +180,7 @@ def check_monitoring_file(self, filename): self.check_monitoring_messages(fit_file) def check_activity_file(self, filename): + logger.info('parsing %s', filename) fit_file = fitfile.file.File(filename, self.measurement_system) logger.info('%s (%s) activity file message types: %s', filename, fit_file.time_created_local, fit_file.message_types) self.check_message_types(fit_file, dump_message=True) From 588ef6ac90f3e1f7521e0b4457a4da7e4ec1581d Mon Sep 17 00:00:00 2001 From: Tom Goetz Date: Sat, 2 Nov 2024 16:56:28 -0400 Subject: [PATCH 2/3] update requirements --- Fit | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Fit b/Fit index 008dd9c..306ad50 160000 --- a/Fit +++ b/Fit @@ -1 +1 @@ -Subproject commit 008dd9c1c2f261cc0c088ea451588d9f8bb03d27 +Subproject commit 306ad50288a1ead8dec9502708560d410ac69306 diff --git a/requirements.txt b/requirements.txt index a58fc7e..4568045 100644 --- a/requirements.txt +++ b/requirements.txt @@ -44,7 +44,7 @@ idna==3.8 importlib_metadata==8.4.0 ipykernel==6.29.5 ipyleaflet==0.19.2 -ipython==8.27.0 +ipython==8.29.0 ipython-genutils==0.2.0 ipywidgets==8.1.5 isoduration==20.11.0 From b1b558c853ec0736a3bd5c734626944fa4a1a53f Mon Sep 17 00:00:00 2001 From: Tom Goetz Date: Sat, 2 Nov 2024 17:00:31 -0400 Subject: [PATCH 3/3] update pipeline python version to 3.11 --- .github/workflows/pythonapp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index bb7e4af..299fad5 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -14,7 +14,7 @@ jobs: - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.11 - name: Setup repo run: | make setup_repo