Skip to content

Commit

Permalink
update reqs
Browse files Browse the repository at this point in the history
  • Loading branch information
toluaina committed Aug 7, 2024
1 parent 90052ee commit 4057e7f
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:

- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black

Expand Down
10 changes: 9 additions & 1 deletion bin/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ logger = logging.getLogger(__name__)
default=False,
help="Turn on verbosity",
)
def main(teardown, config, user, password, host, port, verbose):
def main(
teardown: bool,
config: str,
user: str,
password: bool,
host: str,
port: int,
verbose: bool,
) -> None:
"""Application onetime Bootstrap."""
kwargs: dict = {
"user": user,
Expand Down
2 changes: 1 addition & 1 deletion bin/es_mapping
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def create_es_mapping(index: str) -> None:
help="Schema config",
type=click.Path(exists=True),
)
def main(config):
def main(config: str) -> None:
"""Create custom NGram analyzer for the default mapping."""

config: str = get_config(config)
Expand Down
32 changes: 16 additions & 16 deletions pgsync/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,22 +1414,22 @@ def receive(self) -> None:
default=settings.NUM_WORKERS,
)
def main(
config,
daemon,
host,
password,
port,
sslmode,
sslrootcert,
user,
verbose,
version,
analyze,
num_workers,
polling,
producer,
consumer,
):
config: str,
daemon: bool,
host: str,
password: bool,
port: int,
sslmode: str,
sslrootcert: str,
user: str,
verbose: bool,
version: bool,
analyze: bool,
num_workers: int,
polling: bool,
producer: bool,
consumer: bool,
) -> None:
"""Main application syncer."""
if version:
sys.stdout.write(f"Version: {__version__}\n")
Expand Down
4 changes: 2 additions & 2 deletions plugins/openai_plugin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from functools import lru_cache

from openai import OpenAI

from pgsync import plugin


Expand All @@ -14,6 +12,8 @@ class OpenAIPlugin(plugin.Plugin):

def __init__(self) -> None:
super().__init__()
from openai import OpenAI

self.client: OpenAI = OpenAI()
self.model: str = "text-embedding-3-small"
# vector dims must match models input dims
Expand Down
4 changes: 2 additions & 2 deletions plugins/sentence_transformer_plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from sentence_transformers import SentenceTransformer

from pgsync import plugin


Expand All @@ -14,6 +12,8 @@ class SentenceTransformersPlugin(plugin.Plugin):

def __init__(self) -> None:
super().__init__()
from sentence_transformers import SentenceTransformer

self.model: SentenceTransformer = SentenceTransformer(
"all-MiniLM-L6-v2"
)
Expand Down
6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#
async-timeout==4.0.3
# via redis
boto3==1.34.153
boto3==1.34.155
# via -r requirements/base.in
botocore==1.34.153
botocore==1.34.155
# via
# boto3
# s3transfer
Expand Down Expand Up @@ -76,7 +76,7 @@ six==1.16.0
# opensearch-dsl
# opensearch-py
# python-dateutil
sqlalchemy==2.0.31
sqlalchemy==2.0.32
# via -r requirements/base.in
sqlparse==0.5.1
# via -r requirements/base.in
Expand Down
16 changes: 8 additions & 8 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ async-timeout==4.0.3
# via redis
black==24.8.0
# via -r requirements/dev.in
boto3==1.34.153
boto3==1.34.155
# via -r requirements/base.in
botocore==1.34.153
botocore==1.34.155
# via
# boto3
# s3transfer
Expand All @@ -27,7 +27,7 @@ click==8.1.7
# via
# -r requirements/base.in
# black
coverage[toml]==7.6.0
coverage[toml]==7.6.1
# via
# -r requirements/dev.in
# pytest-cov
Expand All @@ -47,11 +47,11 @@ events==0.5
# via opensearch-py
exceptiongroup==1.2.2
# via pytest
faker==26.1.0
faker==26.2.0
# via -r requirements/dev.in
filelock==3.15.4
# via virtualenv
flake8==7.1.0
flake8==7.1.1
# via -r requirements/dev.in
freezegun==1.5.1
# via -r requirements/dev.in
Expand Down Expand Up @@ -100,7 +100,7 @@ pre-commit==3.5.0
# via -r requirements/dev.in
psycopg2-binary==2.9.9
# via -r requirements/base.in
pycodestyle==2.12.0
pycodestyle==2.12.1
# via flake8
pyflakes==3.2.0
# via flake8
Expand All @@ -125,7 +125,7 @@ python-dotenv==1.0.1
# via
# -r requirements/base.in
# environs
pyyaml==6.0.1
pyyaml==6.0.2
# via pre-commit
redis==5.0.8
# via -r requirements/base.in
Expand All @@ -142,7 +142,7 @@ six==1.16.0
# opensearch-dsl
# opensearch-py
# python-dateutil
sqlalchemy==2.0.31
sqlalchemy==2.0.32
# via -r requirements/base.in
sqlparse==0.5.1
# via -r requirements/base.in
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_version() -> str:
"pgsync",
"postgres",
]
LICENSE = "MIT"
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand Down Expand Up @@ -64,7 +65,7 @@ def get_version() -> str:
setup(
name=NAME,
author=AUTHOR,
license="MIT",
license=LICENSE,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
author_email=AUTHOR_EMAIL,
Expand Down

0 comments on commit 4057e7f

Please sign in to comment.