From 8b562be3342402dc4680658a6c640a1f6fb59728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Thu, 2 May 2024 22:40:38 -0600 Subject: [PATCH] chore: Use Poetry support for PEP 621 --- .github/workflows/constraints.txt | 2 +- .pre-commit-config.yaml | 8 +- poetry.lock | 8 +- pyproject.toml | 181 ++++++++++++++---------------- 4 files changed, 92 insertions(+), 107 deletions(-) diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt index 71d2ad7fc8..30b0887680 100644 --- a/.github/workflows/constraints.txt +++ b/.github/workflows/constraints.txt @@ -1,5 +1,5 @@ pip==24.0 -poetry==1.8.2 +poetry @ git+https://github.com/radoering/poetry.git@pep621-support poetry-plugin-export==1.7.1 poetry-dynamic-versioning==1.3.0 pre-commit==3.7.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75a69c98f6..dd566b3446 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -75,7 +75,7 @@ repos: samples/.* )$ -- repo: https://github.com/python-poetry/poetry - rev: 1.8.0 - hooks: - - id: poetry-check +# - repo: https://github.com/python-poetry/poetry +# rev: 1.8.0 +# hooks: +# - id: poetry-check diff --git a/poetry.lock b/poetry.lock index eb048f6b0d..81ce7026a3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.9.0.dev0 and should not be changed by hand. [[package]] name = "alabaster" @@ -2634,14 +2634,14 @@ docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.link testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [extras] -docs = ["furo", "myst-parser", "pytest", "sphinx", "sphinx-autobuild", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-notfound-page", "sphinx-reredirects"] +docs = ["furo", "myst-parser", "sphinx", "sphinx-autobuild", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-notfound-page", "sphinx-reredirects"] faker = ["faker"] +fs-s3fs = ["fs-s3fs"] jwt = [] parquet = ["numpy", "numpy", "pyarrow"] -s3 = ["fs-s3fs"] testing = ["pytest", "pytest-durations"] [metadata] lock-version = "2.0" python-versions = ">=3.8" -content-hash = "fb53e23587b43db9d5dcf2150b7d6d8c4c21cb0104afba8f0fc8da803e08e730" +content-hash = "3864cb495076a9e4d89517b43e3d9612b210234d25d5d1a90bfc96c3fdd0b5b4" diff --git a/pyproject.toml b/pyproject.toml index 2ece8c6196..7b7e35fdd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,19 @@ -[tool.poetry] +[project] name = "singer-sdk" -version = "0.0.0" +dynamic = [ + "version", +] description = "A framework for building Singer taps" -authors = ["Meltano Team and Contributors "] -maintainers = ["Meltano Team and Contributors "] -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" }] +urls.Homepage = "https://sdk.meltano.com/en/latest/" +urls.Repository = "https://github.com/meltano/sdk" +urls.Documentation = "https://sdk.meltano.com/en/latest/" +urls."Issue Tracker" = "https://github.com/meltano/sdk/issues" +urls."Twitter" = "https://twitter.com/meltanodata/" +urls."Changelog" = "https://github.com/meltano/sdk/blob/main/CHANGELOG.md" +urls."Slack" = "https://meltano.com/slack" +urls."Youtube" = "https://www.youtube.com/meltano" keywords = [ "Meltano", "Singer", @@ -28,93 +34,76 @@ 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.8" -backoff = { version = ">=2.0.0", python = "<4" } -backports-datetime-fromisoformat = { version = ">=2.0.1", python = "<3.11" } -click = "~=8.0" -cryptography = ">=3.4.6" -fs = ">=2.4.16" -importlib-metadata = {version = "<8.0.0", python = "<3.12"} -importlib-resources = {version = ">=5.12.0,!=6.2.0,!=6.3.0,!=6.3.1", python = "<3.9"} -inflection = ">=0.5.1" -joblib = ">=1.3.0" -jsonpath-ng = ">=1.5.3" -jsonschema = ">=4.16.0" -packaging = ">=23.1" -pendulum = ">=2.1.0,<4" -PyJWT = "~=2.4" -python-dateutil = ">=2.8.2" -python-dotenv = ">=0.20" -PyYAML = ">=6.0" -referencing = ">=0.30.0" -requests = ">=2.25.1" -simpleeval = ">=0.9.13" -simplejson = ">=3.17.6" -sqlalchemy = ">=1.4,<3.0" -typing-extensions = ">=4.5.0" -# urllib3 2.0 is not compatible with botocore -urllib3 = ">=1.26,<2" - -# Sphinx dependencies installed as optional 'docs' extras -# https://github.com/readthedocs/readthedocs.org/issues/4912#issuecomment-664002569 -sphinx = {version = ">=4.5", optional = true} -furo = {version = ">=2022.12.7", optional = true} -sphinx-copybutton = {version = ">=0.3.1", optional = true} -myst-parser = {version = ">=1", optional = true} -sphinx-autobuild = {version = ">=2021.3.14", 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.1", optional = true} - -# File storage dependencies installed as optional 'filesystem' extras -fs-s3fs = {version = ">=1.1.1", optional = true} - -# Parquet file dependencies installed as optional 'parquet' extras -numpy = [ - { version = ">=1.22,<1.25", python = ">=3.8,<3.9", optional = true }, - { version = ">=1.22", python = ">=3.9", optional = true }, +readme = "README.md" +license.file = "LICENSE" +requires-python = ">=3.8" +dependencies = [ + "backoff>=2.0.0,<4; python_version<'4'", + "backports-datetime-fromisoformat>=2.0.1,<3.11; python_version<'3.11'", + "click~=8.0", + "cryptography>=3.4.6", + "fs>=2.4.16", + "importlib-metadata<8.0.0; python_version<'3.12'", + "importlib-resources>=5.12.0,!=6.2.0,!=6.3.0,!=6.3.1; python_version<'3.9'", + "inflection>=0.5.1", + "joblib>=1.3.0", + "jsonpath-ng>=1.5.3", + "jsonschema>=4.16.0", + "packaging>=23.1", + "pendulum>=2.1.0,<4", + "PyJWT~=2.4", + "python-dateutil>=2.8.2", + "python-dotenv>=0.20", + "PyYAML>=6.0", + "referencing>=0.30.0", + "requests>=2.25.1", + "simpleeval>=0.9.13", + "simplejson>=3.17.6", + "sqlalchemy>=1.4,<3.0", + "typing-extensions>=4.5.0", + # urllib3 2.0 is not compatible with botocore + "urllib3>=1.26,<2", +] +optional-dependencies.docs = [ + "furo>=2022.12.7", + "myst-parser>=1", + "pytest>=7.2.1", + "sphinx>=4.5", + "sphinx-autobuild>=2021.3.14", + "sphinx-copybutton>=0.3.1", + "sphinx-inline-tabs>=2023.4.21", + "sphinx-notfound-page>=1.0.0", + "sphinx-reredirects>=0.1.1", +] +optional-dependencies.s3 = [ + "fs-s3fs>=1.1.1", ] -pyarrow = { version = ">=13", optional = true } - -# Testing dependencies installed as optional 'testing' extras -pytest = {version=">=7.2.1", optional = true} -pytest-durations = {version = ">=1.2.0", optional = true} - -# installed as optional 'faker' extra -faker = {version = ">=22.5,<26.0", optional = true} - -[tool.poetry.extras] # TODO: Add 'cryptography' and 'PyJWT' to the 'jwt' when we want to remove them # from the main dependencies -jwt = [] -docs = [ - "furo", - "myst-parser", - "pytest", - "sphinx", - "sphinx-copybutton", - "sphinx-autobuild", - "sphinx-inline-tabs", - "sphinx-notfound-page", - "sphinx-reredirects", +optional-dependencies.jwt = [] +optional-dependencies.parquet = [ + "numpy>=1.22,<1.25; python_version<'3.9'", + "numpy>=1.22; python_version>='3.9'", + "pyarrow>=13", +] +optional-dependencies.testing = [ + "pytest>=7.2.1", + "pytest-durations>=1.2.0", ] -s3 = ["fs-s3fs"] -testing = [ - "pytest", - "pytest-durations" +optional-dependencies.faker = [ + "faker>=22.5,<26.0", ] -parquet = ["numpy", "pyarrow"] -faker = ["faker"] + +[project.entry-points."pytest11"] +singer_testing = "singer_sdk.testing.pytest_plugin" + +[project.entry-points."singer_sdk.batch_encoders"] +jsonl = "singer_sdk.contrib.batch_encoder_jsonl:JSONLinesBatcher" +parquet = "singer_sdk.contrib.batch_encoder_parquet:ParquetBatcher" + +[tool.poetry] +name = "singer-sdk" +version = "0.0.0" [tool.poetry.group.dev.dependencies] coverage = {extras = ["toml"], version = ">=7.4"} @@ -242,16 +231,12 @@ enable = true style = "pep440" [build-system] -requires = ["poetry-core==1.9.0", "poetry-dynamic-versioning==1.2.0"] +requires = [ + "poetry-core@ git+https://github.com/radoering/poetry-core.git@pep621-support", + "poetry-dynamic-versioning==1.2.0", +] build-backend = "poetry_dynamic_versioning.backend" -[tool.poetry.plugins."pytest11"] -singer_testing = "singer_sdk.testing.pytest_plugin" - -[tool.poetry.plugins."singer_sdk.batch_encoders"] -jsonl = "singer_sdk.contrib.batch_encoder_jsonl:JSONLinesBatcher" -parquet = "singer_sdk.contrib.batch_encoder_parquet:ParquetBatcher" - [tool.ruff] extend-exclude = [ "cookiecutter/*",