Skip to content

Commit

Permalink
update to support 3.8 to 3.11, linting (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
BryonLewis authored Feb 29, 2024
1 parent 6d8b2bf commit 27f68d9
Show file tree
Hide file tree
Showing 12 changed files with 839 additions and 720 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: [3.8, 3.11]
steps:
- name: Update Package References
run: sudo apt-get update
Expand Down
4 changes: 2 additions & 2 deletions docker/girder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN yarn build:web
# == SERVER BUILD STAGE ==
# ========================
# Note: server-builder stage will be the same in both dockerfiles
FROM python:3.8-buster as server-builder
FROM python:3.11-buster as server-builder

WORKDIR /opt/dive/src

Expand Down Expand Up @@ -48,7 +48,7 @@ RUN girder build
# =================
# == DIST SERVER ==
# =================
FROM python:3.8-slim-buster as server
FROM python:3.11-slim-buster as server

# Hack: Tell GitPython to be quiet, we aren't using git
ENV GIT_PYTHON_REFRESH="quiet"
Expand Down
1 change: 1 addition & 0 deletions server/dive_server/crud.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""General CRUD operations and utilities shared among views"""

from enum import Enum
import functools
import os
Expand Down
1 change: 1 addition & 0 deletions server/dive_server/views_override.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""adds functionality to existing girder views"""

from girder.api import access
from girder.api.describe import Description, autoDescribeRoute
from girder.api.rest import boundHandler
Expand Down
1 change: 1 addition & 0 deletions server/dive_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utilities that are common to both the viame server and tasks package."""

import itertools
import re
from typing import Any, Dict, List, Union
Expand Down
1 change: 1 addition & 0 deletions server/dive_utils/serializers/kpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
It is the python implementation of client/platform/backend/serializers/kpf.ts
"""

from collections import defaultdict
from typing import Dict, List, Mapping, Tuple, TypedDict, cast

Expand Down
1 change: 1 addition & 0 deletions server/dive_utils/serializers/kwcoco.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
KWCOCO JSON format deserializer
"""

import functools
from typing import Any, Dict, List, Tuple

Expand Down
1 change: 1 addition & 0 deletions server/dive_utils/serializers/viame.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
VIAME Fish format deserializer
"""

import csv
import datetime
import io
Expand Down
1,536 changes: 823 additions & 713 deletions server/poetry.lock

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.black]
line-length = 100
skip-string-normalization = true
target-version = ["py38"]
target-version = ["py311"]
exclude = '\.eggs|\.git|\.mypy_cache|\.tox|\.env|\.venv|env|venv|_build|buck-out|build|dist'

[tool.isort]
Expand All @@ -13,7 +13,7 @@ force_sort_within_sections = true
combine_as_imports = true

[tool.mypy]
python_version = 3.8
python_version = 3.11
ignore_missing_imports = true
show_error_context = true
show_column_numbers = true
Expand All @@ -37,6 +37,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.11",
]
packages = [
{ include = "dive_server" },
Expand All @@ -45,7 +46,7 @@ packages = [
]

[tool.poetry.dependencies]
python = ">=3.8,<3.10"
python = ">=3.8,<3.12"
cheroot = ">=8.4.5"
click = "^8.1.3"
girder = ">=3.1.16"
Expand Down Expand Up @@ -78,7 +79,7 @@ dive_server = "dive_server:GirderPlugin"
dive_tasks = "dive_tasks:DIVEPlugin"

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry-dynamic-versioning]
Expand Down
1 change: 1 addition & 0 deletions server/scripts/commands_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Debug cli needs [dev] extra_require from setuptools.
"""

import os

import click
Expand Down
1 change: 1 addition & 0 deletions server/scripts/commands_main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Cli tools for using parts of the DIVE codebase outside a web server environment
"""

import functools
import json
from typing import BinaryIO, Dict, List, Optional, TextIO
Expand Down

0 comments on commit 27f68d9

Please sign in to comment.