Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove dependency on pipelinewise-singer-python and move singer library code into singer_sdk._singerlib #979

Merged
merged 9 commits into from
Sep 23, 2022
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ per-file-ignores =
singer_sdk/helpers/_*.py:ANN,DAR,D105
# Don't require docstrings conventions in "meta" code
# singer_sdk/helpers/_classproperty.py:D105
# Ignore unused imports in __init__.py files
singer_sdk/_singerlib/__init__.py:F401
max-complexity = 10
docstring-convention = google
allow-star-arg-any = true
2 changes: 2 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def mypy(session: Session) -> None:
"sqlalchemy2-stubs",
"types-python-dateutil",
"types-requests",
"types-pytz",
"types-simplejson",
)
session.run("mypy", *args)
if not session.posargs:
Expand Down
203 changes: 131 additions & 72 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ license = "Apache 2.0"

[tool.poetry.dependencies]
python = "<3.11,>=3.7.1"
pipelinewise-singer-python = "1.2.0"
backoff = ">=1.8.0,<2.0"
pendulum = "^2.1.0"
click = "~=8.0"
Expand All @@ -52,6 +51,9 @@ inflection = "^0.5.1"
sqlalchemy = "^1.4"
python-dotenv = ">=0.20,<0.22"
typing-extensions = "^4.2.0"
simplejson = "^3.17.6"
jsonschema = "^4.16.0"
pytz = "^2022.2.1"
edgarrmondragon marked this conversation as resolved.
Show resolved Hide resolved

# Sphinx dependencies installed as optional 'docs' extras
# https://github.com/readthedocs/readthedocs.org/issues/4912#issuecomment-664002569
Expand Down Expand Up @@ -84,7 +86,9 @@ viztracer = "^0.15.4"
requests-mock = "^1.10.0"
sqlalchemy2-stubs = {version = "^0.0.2a27", allow-prereleases = true}
types-python-dateutil = "^2.8.19"
types-pytz = "^2022.2.1.0"
types-requests = "^2.28.11"
types-simplejson = "^3.17.7"
coverage = {extras = ["toml"], version = "^6.4"}

# Cookiecutter tests
Expand Down Expand Up @@ -149,7 +153,7 @@ exclude_lines = [
"if __name__ == .__main__.:",
'''class .*\bProtocol\):''',
'''@(abc\.)?abstractmethod''',
"if TYPE_CHECKING:",
'''if (t\.)?TYPE_CHECKING:''',
edgarrmondragon marked this conversation as resolved.
Show resolved Hide resolved
]
fail_under = 82

Expand Down
3 changes: 1 addition & 2 deletions samples/sample_mapper/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
from pathlib import PurePath
from typing import Generator, List, Optional, Union

import singer

import singer_sdk._singerlib as singer
import singer_sdk.typing as th
from singer_sdk.helpers._util import utc_now
from singer_sdk.mapper import PluginMapper
Expand Down
19 changes: 19 additions & 0 deletions singer_sdk/_singerlib/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from singer_sdk._singerlib.catalog import (
Catalog,
CatalogEntry,
Metadata,
MetadataMapping,
SelectionMask,
StreamMetadata,
)
from singer_sdk._singerlib.messages import (
ActivateVersionMessage,
Message,
RecordMessage,
SchemaMessage,
SingerMessageType,
StateMessage,
exclude_null_dict,
write_message,
)
from singer_sdk._singerlib.schema import Schema, resolve_schema_references
Loading