Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
JWCook committed Jun 15, 2024
1 parent a2c4082 commit e336d0e
Show file tree
Hide file tree
Showing 27 changed files with 717 additions and 675 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: sudo apt-get install -y '^libxcb.*-dev' libegl-dev libwebp-dev libpng16-16 libx11-xcb-dev rpm
- name: Cache python packages
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ env.LATEST_PY_VERSION }}-pyinstaller-${{ matrix.os }}-${{ hashFiles('poetry.lock') }}
Expand Down Expand Up @@ -111,21 +111,21 @@ jobs:
# Upload workflow artifacts
- name: Upload pyinstaller package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: naturtag-${{ env.DIST_NAME }}.tar.gz
path: naturtag-${{ env.DIST_NAME }}.tar.gz

- name: Upload disk image (macOS)
if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: naturtag.dmg
path: dist/naturtag.dmg

- name: Upload FPM workflow artifacts (Linux)
if : ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: naturtag-fpm
path: dist/naturtag.*
Expand All @@ -136,7 +136,7 @@ jobs:
runs-on: ubuntu-latest
needs: build-app-packages
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- name: Collect artifacts from workflow subdirs
run: |
find . -type d -depth -name 'naturtag*' -exec mv {} {}_dir \;
Expand All @@ -145,7 +145,7 @@ jobs:
ls -ARl
- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: 'naturtag*'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# Cache packages per python version, and reuse until lockfile changes
- name: Cache python packages
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
with:
python-version: ${{ env.LATEST_PY_VERSION }}
- name: Run style checks & linting
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1
- name: Scan dependencies for known vulnerabilities
uses: pypa/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
rev: v0.4.9
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.0
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: [attrs, types-python-dateutil, types-requests, types-PyYAML]
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config file for Sphinx documentation"""

from importlib.metadata import version as pkg_version
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions naturtag/app/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Main Qt app window and entry point"""

import sys
import webbrowser
from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions naturtag/app/controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Menu bar
* Global keyboard shortcuts
"""

from functools import partial
from logging import getLogger
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions naturtag/app/threadpool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Adapted from examples in Python & Qt6 by Martin Fitzpatrick"""

from logging import getLogger
from threading import RLock
from typing import Callable, Optional
Expand Down
1 change: 1 addition & 0 deletions naturtag/controllers/observation_search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Components for searching for observations"""

from logging import getLogger

from pyinaturalist import Observation
Expand Down
1 change: 1 addition & 0 deletions naturtag/controllers/observation_view.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Components for displaying taxon info"""

# TODO: code reuse with taxon_view
# TODO: nav history
import webbrowser
Expand Down
1 change: 1 addition & 0 deletions naturtag/controllers/taxon_search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Components for searching for taxa"""

from logging import getLogger
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions naturtag/controllers/taxon_view.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Components for displaying taxon info"""

import webbrowser
from collections import deque
from logging import getLogger
Expand Down
1 change: 1 addition & 0 deletions naturtag/metadata/gps_metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for converting GPS coordinates to/from EXIF and XMP image metadata"""

import re
from typing import Optional

Expand Down
1 change: 1 addition & 0 deletions naturtag/metadata/inat_metadata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tools to translate iNaturalist observations and taxa into image metadata"""

# TODO: Get separate keywords for species, binomial, and trinomial
# TODO: Get common names for specified locale (requires using different endpoints)
# TODO: Handle observation with no taxon ID?
Expand Down
4 changes: 3 additions & 1 deletion naturtag/settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Basic utilities for reading and writing settings from config files"""

# TODO: use user data dir for logfile
import sqlite3
from collections import Counter, OrderedDict
Expand Down Expand Up @@ -63,7 +64,8 @@ class YamlMixin:
@classmethod
def read(cls, path: Optional[Path]) -> 'YamlMixin':
"""Read settings from config file"""
path = path or cls.path
# TODO: conflicts with class variable access?
path = path or cls.path # type: ignore

# New file; no contents to read
if not path or not path.is_file():
Expand Down
1 change: 1 addition & 0 deletions naturtag/utils/i18n.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Internationalization utilities"""

import json
import sqlite3
from logging import getLogger
Expand Down
1 change: 1 addition & 0 deletions naturtag/utils/image_glob.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for finding and resolving image paths from directories, URIs, and/or glob patterns"""

from fnmatch import fnmatch
from glob import glob
from itertools import chain
Expand Down
1 change: 0 additions & 1 deletion naturtag/utils/parsing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Misc URL and string parsing utilities"""


from typing import Optional
from urllib.parse import urlparse

Expand Down
1 change: 1 addition & 0 deletions naturtag/utils/thumbnails.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities for generating and retrieving image thumbnails"""

from io import IOBase
from logging import getLogger

Expand Down
1 change: 1 addition & 0 deletions naturtag/widgets/images.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Generic image widgets and base classes for other page-specific widgets.
Includes plain images, cards, scrollable lists, and fullscreen image views.
"""

from logging import getLogger
from pathlib import Path
from typing import TYPE_CHECKING, Iterator, Optional, TypeAlias, Union
Expand Down
1 change: 1 addition & 0 deletions naturtag/widgets/layouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* https://doc.qt.io/qtforpython/examples/example_widgets_layouts_flowlayout.html
* Many hours of frustration
"""

from logging import getLogger
from typing import TYPE_CHECKING, Callable, Iterator, Optional, TypeAlias

Expand Down
1 change: 1 addition & 0 deletions naturtag/widgets/observation_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Image widgets specifically for observation photos"""

from logging import getLogger
from string import capwords
from typing import Iterable, Optional
Expand Down
1 change: 1 addition & 0 deletions naturtag/widgets/taxon_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Image widgets specifically for taxon photos"""

import re
from logging import getLogger
from string import capwords
Expand Down
1 change: 1 addition & 0 deletions naturtag/widgets/toggle_switch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Material-style toggle switch.
Source: https://stackoverflow.com/a/51825815/15592055
"""

from PySide6.QtCore import Property, QPropertyAnimation, QRectF, QSize, Qt
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import QAbstractButton, QSizePolicy
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* 'lint' command: tools and environments are managed by pre-commit
* All other commands: the current environment will be used instead of creating new ones
"""

from os.path import join
from shutil import rmtree

Expand Down
1 change: 1 addition & 0 deletions packaging/get_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python
"""Get app version from poetry config"""

from pathlib import Path

import tomlkit
Expand Down
Loading

0 comments on commit e336d0e

Please sign in to comment.