Skip to content

Commit

Permalink
Merge branch 'main' into edgarrmondragon/refactor/msgspec-impl-naive
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 13, 2025
2 parents 8c748a1 + a8e6bf0 commit 815f056
Show file tree
Hide file tree
Showing 10 changed files with 603 additions and 379 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
griffe~=1.5
pip==24.3.1
poetry==1.8.5
poetry==2.0.1
pre-commit==4.0.1
nox==2024.10.9
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.8.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand All @@ -59,6 +59,6 @@ repos:
)$
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
rev: 2.0.0
hooks:
- id: poetry-check
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Built with the [Meltano Mapper SDK](https://sdk.meltano.com) for Singer Mappers.

<!--
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPI repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
## Installation
Install from PyPi:
Install from PyPI:
```bash
pipx install {{ cookiecutter.mapper_id }}
Expand Down
4 changes: 2 additions & 2 deletions cookiecutter/tap-template/{{cookiecutter.tap_id}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.

<!--
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPI repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
## Installation
Install from PyPi:
Install from PyPI:
```bash
pipx install {{ cookiecutter.tap_id }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Build with the [Meltano Target SDK](https://sdk.meltano.com).

<!--
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPI repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
## Installation
Install from PyPi:
Install from PyPI:
```bash
pipx install {{ cookiecutter.target_id }}
Expand Down
2 changes: 1 addition & 1 deletion docs/python_tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ creating and managing virtual environments, these two tools automate the process
`poetry add -D <pippable-dev-only-ref>`.
- If version conflicts occur, relax the version constraints in `pyproject.toml` for the
libraries where the conflict is reported, then try again.
- Poetry can also publish your libraries to PyPi.
- Poetry can also publish your libraries to PyPI.
- **pipx**: Install pipx once, and then use pipx _instead of_ pip.
- If you are using poetry for development, then all other pip-installables should be
executable tools and programs, which is what pipx is designed for.
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def benches(session: nox.Session) -> None:
@nox.session(name="deps", python=main_python_version)
def dependencies(session: nox.Session) -> None:
"""Check issues with dependencies."""
session.install(".[msgspec,s3,testing]")
session.install(".[docs,faker,jwt,msgspec,parquet,s3,ssh,testing]")
session.install("deptry")
session.run("deptry", "singer_sdk", *session.posargs)

Expand Down
754 changes: 490 additions & 264 deletions poetry.lock

Large diffs are not rendered by default.

202 changes: 100 additions & 102 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[tool.poetry]
[project]
name = "singer-sdk"
version = "0.0.0"
dynamic = [
"version"
]
description = "A framework for building Singer taps"
authors = ["Meltano Team and Contributors <hello@meltano.com>"]
maintainers = ["Meltano Team and Contributors <hello@meltano.com>"]
readme = "README.md"
homepage = "https://sdk.meltano.com/en/latest/"
repository = "https://github.com/meltano/sdk"
documentation = "https://sdk.meltano.com/en/latest/"
authors = [{ name = "Meltano Team and Contributors", email = "hello@meltano.com" }]
maintainers = [{ name = "Meltano Team and Contributors", email = "hello@meltano.com" }]
keywords = [
"Meltano",
"Singer",
Expand All @@ -28,103 +26,111 @@ classifiers = [
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Typing :: Typed",
]
license = "Apache-2.0"

[tool.poetry.urls]
"Issue Tracker" = "https://github.com/meltano/sdk/issues"
"Twitter" = "https://twitter.com/meltanodata/"
"Changelog" = "https://github.com/meltano/sdk/blob/main/CHANGELOG.md"
"Slack" = "https://meltano.com/slack"
"Youtube" = "https://www.youtube.com/meltano"

[tool.poetry.dependencies]
python = ">=3.9"
backoff = { version = ">=2.0.0", python = "<4" }
backports-datetime-fromisoformat = { version = ">=2.0.1", python = "<3.11" }
click = "~=8.0"
fs = ">=2.4.16"
fsspec = ">=2024.9.0"
importlib-metadata = { version = "<9.0.0", python = "<3.12" }
importlib-resources = { version = ">=5.12.0,!=6.2.0,!=6.3.0,!=6.3.1", python = "<3.10" }
inflection = ">=0.5.1"
joblib = ">=1.3.0"
jsonpath-ng = ">=1.5.3"
jsonschema = ">=4.16.0"
msgspec = { version = ">=0.19.0", optional = true }
packaging = ">=23.1"
python-dotenv = ">=0.20"
PyYAML = ">=6.0"
referencing = ">=0.30.0"
requests = ">=2.25.1"
# TODO: remove this constraint once we get rid of the `fs` dependency
# newer setuptools versions are incompatible with some dependencies (fs)
setuptools = "<=70.3.0"
simpleeval = ">=0.9.13,!=1.0.1"
simplejson = ">=3.17.6"
sqlalchemy = ">=1.4,<3.0"
typing-extensions = ">=4.5.0"
readme = "README.md"
license.file = "LICENSE"
requires-python = ">=3.9"

dependencies = [
'backoff>=2.0.0; python_version<"4"',
'backports-datetime-fromisoformat>=2.0.1; python_version<"3.11"',
"click~=8.0",
"fs>=2.4.16",
"fsspec>=2024.9.0",
'importlib-metadata<9.0.0; python_version<"3.12"',
'importlib-resources>=5.12.0,!=6.2.0,!=6.3.0,!=6.3.1; python_version<"3.10"',
"inflection>=0.5.1",
"joblib>=1.3.0",
"jsonpath-ng>=1.5.3",
"jsonschema>=4.16.0",
"packaging>=23.1",
"python-dotenv>=0.20",
"PyYAML>=6.0",
"referencing>=0.30.0",
"requests>=2.25.1",
# TODO: remove this constraint once we get rid of the `fs` dependency
# newer setuptools versions are incompatible with some dependencies (fs)
"setuptools<=70.3.0",
"simpleeval>=0.9.13,!=1.0.1",
"simplejson>=3.17.6",
"sqlalchemy>=1.4,<3.0",
"typing-extensions>=4.5.0",
'urllib3<2; python_version<"3.10"',
'urllib3; python_version>="3.10"',
]

[project.optional-dependencies]
# Sphinx dependencies installed as optional 'docs' extras
# https://github.com/readthedocs/readthedocs.org/issues/4912#issuecomment-664002569
furo = {version = ">=2024.5.6", optional = true}
myst-parser = {version = ">=3", optional = true}
sphinx = {version = ">=7", optional = true}
sphinx-copybutton = {version = ">=0.5.2", optional = true}
sphinx-inline-tabs = {version = ">=2023.4.21", optional = true}
sphinx-notfound-page = {version = ">=1.0.0", optional = true}
sphinx-reredirects = {version = ">=0.1.5", optional = true}
docs = [
"furo>=2024.5.6",
"myst-parser>=3",
"pytest>=7.2.1",
"sphinx>=7",
"sphinx-copybutton>=0.5.2",
"sphinx-inline-tabs>=2023.4.21",
"sphinx-notfound-page>=1.0.0",
"sphinx-reredirects>=0.1.5",
]

# File storage dependencies installed as optional 'filesystem' extras
fs-s3fs = {version = ">=1.1.1", optional = true}
s3fs = { version = ">=2024.9.0", optional = true }
s3 = [
"fs-s3fs>=1.1.1",
"s3fs>=2024.9.0",
]

# Parquet file dependencies installed as optional 'parquet' extras
# We add Python constraints to force Poetry to add the latest supported Numpy version
# for all Python versions to 'poetry.lock'. If we don't do this, Poetry will add only
# the version of Numpy that is compatible with the earliest Python version supported
# by this project, but that may not be compatible with the latest Python version.
numpy = [
{ version = ">=1.22,<2.1", python = "==3.9", optional = true },
{ version = ">=1.22", python = ">=3.10", optional = true },
parquet = [
"numpy>=1.22,<2.1; python_version=='3.9'",
"numpy>=1.22; python_version>='3.10'",
"pyarrow>=13",
]
pyarrow = { version = ">=13", optional = true }

# Testing dependencies installed as optional 'testing' extras
pytest = {version=">=7.2.1", optional = true}
testing = [
"pytest>=7.2.1",
]

# installed as optional 'faker' extra
faker = {version = ">=22.5", optional = true}
faker = [
"faker>=22.5",
]

# Crypto extras
cryptography = { version = ">=3.4.6", optional = true }
PyJWT = { version = "~=2.4", optional = true }

# SSH extras
paramiko = ">=3.3.0"

[tool.poetry.extras]
jwt = [
"cryptography",
"PyJWT",
"cryptography>=3.4.6",
"PyJWT~=2.4",
]
docs = [
"furo",
"myst-parser",
"pytest",
"sphinx",
"sphinx-copybutton",
"sphinx-inline-tabs",
"sphinx-notfound-page",
"sphinx-reredirects",

# SSH extras
ssh = [
"paramiko>=3.3.0",
]
msgspec = ["msgspec"]
s3 = ["fs-s3fs", "s3fs"]
ssh = ["paramiko"]
testing = [
"pytest",

# msgspec extras
msgspec = [
"msgspec>=0.19.0",
]
parquet = ["numpy", "pyarrow"]
faker = ["faker"]

[project.urls]
Homepage = "https://sdk.meltano.com/en/latest/"
Repository = "https://github.com/meltano/sdk"
Documentation = "https://sdk.meltano.com/en/latest/"
"Issue Tracker" = "https://github.com/meltano/sdk/issues"
"Twitter" = "https://twitter.com/meltanodata/"
"Changelog" = "https://github.com/meltano/sdk/blob/main/CHANGELOG.md"
"Slack" = "https://meltano.com/slack"
"Youtube" = "https://www.youtube.com/meltano"

[tool.poetry]
requires-poetry = ">=2.0"
version = "0.0.0"

[tool.poetry.requires-plugins]
poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] }

[tool.poetry.group.dev.dependencies]
coverage = {extras = ["toml"], version = ">=7.4"}
Expand Down Expand Up @@ -237,39 +243,29 @@ show_missing = true

[tool.deptry]
known_first_party = ["singer_sdk"]
pep621_dev_dependency_groups = ["testing"]
pep621_dev_dependency_groups = ["docs", "testing"]

[tool.deptry.package_module_name_map]
backports-datetime-fromisoformat = "backports"
importlib-metadata = "importlib_metadata"
importlib-resources = "importlib_resources"
PyJWT = "jwt"
types-jsonschema = "jsonschema"
types-pytz = "pytz"
types-PyYAML = "yaml"
types-requests = "requests"

[tool.deptry.per_rule_ignores]
DEP002 = [
# Transitive constraints
"numpy",
"setuptools",
"urllib3",
# Python version-specific dependencies
"backports-datetime-fromisoformat",
# Docs extras
"furo",
"myst-parser",
"sphinx",
"sphinx-copybutton",
"sphinx-inline-tabs",
"sphinx-notfound-page",
"sphinx-reredirects",
# Plugins
"paramiko",
"fs-s3fs",
"s3fs",
]
DEP004 = [
# TODO: Make pytest a runtime dependency?
"pytest",
]

[tool.mypy]
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
Expand Down Expand Up @@ -298,13 +294,16 @@ enable = true
style = "pep440"

[build-system]
requires = ["poetry-core==1.9.0", "poetry-dynamic-versioning==1.4.0"]
requires = [
"poetry-core>=2,<3",
"poetry-dynamic-versioning",
]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry.plugins."pytest11"]
[project.entry-points."pytest11"]
singer_testing = "singer_sdk.testing.pytest_plugin"

[tool.poetry.plugins."singer_sdk.batch_encoders"]
[project.entry-points."singer_sdk.batch_encoders"]
jsonl = "singer_sdk.contrib.batch_encoder_jsonl:JSONLinesBatcher"
parquet = "singer_sdk.contrib.batch_encoder_parquet:ParquetBatcher"

Expand All @@ -313,7 +312,6 @@ extend-exclude = [
"cookiecutter/*",
]
line-length = 88
target-version = "py39"

[tool.ruff.format]
docstring-code-format = true
Expand Down
4 changes: 2 additions & 2 deletions samples/sample_tap_dummy_json/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.

<!--
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
Developer TODO: Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPI repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
## Installation
Install from PyPi:
Install from PyPI:
```bash
pipx install tap-dummyjson
Expand Down

0 comments on commit 815f056

Please sign in to comment.