Skip to content

Commit

Permalink
Update 3.9 plus
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Feb 7, 2023
1 parent eba3b0a commit 2de014b
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
target: ["3.7", "3.8", "3.9", "3.10.6", "3.11"]
target: ["3.9", "3.10"]
steps:
- name: checkout
uses: actions/checkout@v2
Expand Down
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
args: [--py39-plus]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
args: [--profile, black]
types: [python]

- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.1.0
hooks:
- id: black
args: [--target-version=py37]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -37,7 +32,7 @@ repos:
- id: trailing-whitespace

- repo: http://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
Expand All @@ -46,14 +41,14 @@ repos:
- id: python-use-type-annotations

- repo: https://github.com/pycqa/pylint
rev: v2.15.5
rev: v2.16.0
hooks:
- id: pylint
language: system
types: [python]

- repo: https://github.com/pycqa/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
language: system
Expand All @@ -77,11 +72,16 @@ repos:
rev: 1.5.3
hooks:
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==3.3.1]
args: [--py39-plus]
- id: nbqa-isort
additional_dependencies: [isort==5.12.0]
args: [--float-to-top]
- id: nbqa-black
additional_dependencies: [black==23.1.0]
args: [--target-version=py39]
- id: nbqa-flake8
additional_dependencies: [flake8==6.0.0]

- repo: local
hooks:
Expand Down
19 changes: 8 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = [
"pip>=22.0.4",
"pip>=23",
"pytest-runner>=6.0.0",
"setuptools>=61.2.0",
"setuptools_scm[toml]>=6.4.2",
"wheel>=0.37.1",
"setuptools>=67.1.0",
"setuptools_scm[toml]>=7.1.0",
"wheel>=0.38.4",
]
build-backend = "setuptools.build_meta"

Expand All @@ -22,17 +22,14 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: Unix",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Utilities",
]
dependencies = [
"blosc==1.10.6",
"cfgenvy>=1.4.2",
"cfgenvy>=2.0.0",
"numpy>=1.15.4",
"pandas>=0.23.4",
"requests>=2.26.0",
Expand All @@ -41,7 +38,7 @@ description = "An opinionated library to help deploy data science projects"
dynamic = ["version"]
license = { file = "license.txt" }
name = "dsdk"
requires-python = ">=3.7"
requires-python = ">=3.9"
readme = "readme.md"

[project.optional-dependencies]
Expand Down Expand Up @@ -90,7 +87,7 @@ Tracker = "https://github.com/pennsignals/dsdk/issues"

[tool.black]
line-length = 79
target-version = ["py37","py38","py39","py310","py311"]
target-version = ["py39","py310"]

[tool.coverage.report]
exclude_lines = [
Expand All @@ -107,7 +104,7 @@ branch = true
parallel = true

[tool.distutils.bdist_wheel]
python-tag = "py37.py38.py39.py310"
python-tag = "py39.py310"

[tool.isort]
profile = "black"
Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/flowsheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

from abc import ABC
from base64 import b64encode
from collections.abc import Generator, Mapping
from contextlib import contextmanager
from datetime import datetime
from json import JSONDecodeError, dumps
from time import sleep as default_sleep
from typing import TYPE_CHECKING, Any, Generator, Mapping
from typing import TYPE_CHECKING, Any
from urllib.parse import urlencode

from cfgenvy import YamlMapping
Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

from __future__ import annotations

from collections.abc import Generator
from contextlib import contextmanager
from logging import getLogger
from time import perf_counter_ns
from typing import Any, Generator
from typing import Any

from cfgenvy import YamlMapping

Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from __future__ import annotations

from abc import ABC
from collections.abc import Generator
from contextlib import contextmanager
from json import dumps
from logging import getLogger
from typing import TYPE_CHECKING, Any, Generator
from typing import TYPE_CHECKING, Any

from cfgenvy import yaml_type

Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
from __future__ import annotations

from abc import ABC
from collections.abc import Generator
from contextlib import contextmanager
from json import dumps
from logging import getLogger
from typing import TYPE_CHECKING, Any, Generator
from typing import TYPE_CHECKING, Any

from .persistor import Persistor as BasePersistor
from .service import Service
Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/persistor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from collections.abc import Generator, Sequence
from contextlib import contextmanager
from hashlib import blake2b
from itertools import chain
Expand All @@ -10,7 +11,7 @@
from pathlib import Path
from re import compile as re_compile
from string import Formatter
from typing import Any, Generator, Sequence
from typing import Any

from cfgenvy import YamlMapping, yaml_type
from pandas import DataFrame, concat
Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

from abc import ABC
from collections import deque
from collections.abc import Generator
from contextlib import contextmanager
from json import dumps
from logging import getLogger
from typing import TYPE_CHECKING, Any, Generator
from typing import TYPE_CHECKING, Any

from numpy import integer
from pandas import DataFrame, NaT, Series, isna
Expand Down
4 changes: 2 additions & 2 deletions src/dsdk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

import pickle
from collections import OrderedDict
from collections.abc import Generator, Mapping, Sequence
from contextlib import contextmanager
from datetime import date, datetime, tzinfo
from json import dumps
from logging import getLogger
from typing import Any, Callable, Generator, Mapping, Sequence
from typing import Any, Callable

from cfgenvy import Parser, YamlMapping
from numpy import allclose
Expand Down Expand Up @@ -256,7 +257,6 @@ def __init__(
def __call__(self) -> Batch:
"""Run."""
with self.open_batch() as batch:

# if one of the mixins didn't set these properties...
if batch.as_of is None:
batch.as_of = now_utc_datetime()
Expand Down
3 changes: 2 additions & 1 deletion src/dsdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from collections.abc import Generator, Sequence
from datetime import datetime, timezone, tzinfo
from functools import wraps
from json import dump as json_dump
Expand All @@ -15,7 +16,7 @@
from pickle import loads as pickle_loads
from sys import stderr, stdout
from time import sleep as default_sleep
from typing import Any, Callable, Generator, Sequence
from typing import Any, Callable

from blosc import compress, decompress
from dateutil import parser, tz
Expand Down
3 changes: 2 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

from __future__ import annotations

from collections.abc import Generator, Sequence
from contextlib import contextmanager
from pathlib import Path
from typing import Any, Generator, Sequence
from typing import Any

from pandas import DataFrame
from pytest import fixture
Expand Down
3 changes: 2 additions & 1 deletion test/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

from __future__ import annotations

from collections.abc import Generator
from contextlib import contextmanager
from typing import Any, Generator
from typing import Any

from pandas.testing import assert_frame_equal
from pytest import raises
Expand Down
3 changes: 2 additions & 1 deletion test/test_union_all.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""Test union all."""

from collections.abc import Generator
from contextlib import contextmanager
from typing import Any, Generator
from typing import Any

from pandas import DataFrame

Expand Down

0 comments on commit 2de014b

Please sign in to comment.