From a98d2a25e9ef6d19d8670c1c1cc09847600f7845 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 | 4 +- pyproject.toml | 180 ++++++++++++++---------------- 4 files changed, 89 insertions(+), 105 deletions(-) diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt index eaedc11de..bb4fcb994 100644 --- a/.github/workflows/constraints.txt +++ b/.github/workflows/constraints.txt @@ -1,5 +1,5 @@ pip==24.1.1 -poetry==1.8.3 +poetry @ git+https://github.com/radoering/poetry.git@pep621-support poetry-plugin-export==1.8.0 poetry-dynamic-versioning==1.4.0 pre-commit==3.7.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b91567ce5..36a745bc3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -76,7 +76,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 2f3027da2..31c3ddaaf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 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" @@ -2673,4 +2673,4 @@ testing = ["pytest", "pytest-durations"] [metadata] lock-version = "2.0" python-versions = ">=3.8" -content-hash = "1316397863d23f10b9f8ec4b5647d4b95311ef90e98618dc3833cacf9ba1ef64" +content-hash = "72bc4a2ef598c907e04ac5cd4ff504c04098aabc492105fc1784de2b67d1be5a" diff --git a/pyproject.toml b/pyproject.toml index e3c73d5cd..4f465f170 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,75 @@ 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 = "<9.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<9.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,<27.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,<27.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] +version = "0.0.0" [tool.poetry.group.dev.dependencies] coverage = {extras = ["toml"], version = ">=7.4"} @@ -281,16 +269,12 @@ enable = true style = "pep440" [build-system] -requires = ["poetry-core==1.9.0", "poetry-dynamic-versioning==1.4.0"] +requires = [ + "poetry-core@ git+https://github.com/radoering/poetry-core.git@pep621-support", + "poetry-dynamic-versioning==1.4.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/*",