Skip to content

Commit

Permalink
Merge branch 'main' into edgarrmondragon/feat/test-valid-schema
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Aug 13, 2024
2 parents bf080d9 + be349ac commit 39b28ea
Show file tree
Hide file tree
Showing 12 changed files with 230 additions and 110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ singer-sdk = { version="~=0.39.1", extras = ["testing"] }
[tool.poetry.extras]
s3 = ["fs-s3fs"]

[tool.pytest.ini_options]
addopts = '--durations=10'

[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ singer-sdk = { version="~=0.39.1", extras = ["testing"] }
[tool.poetry.extras]
s3 = ["fs-s3fs"]

[tool.pytest.ini_options]
addopts = '--durations=10'

[tool.mypy]
python_version = "3.12"
warn_unused_configs = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ class Tap{{ cookiecutter.source_name }}({{ 'SQL' if cookiecutter.stream_type ==
default="https://api.mysample.com",
description="The url for the API service",
),
{%- if cookiecutter.stream_type in ("GraphQL", "REST") %}
th.Property(
"user_agent",
th.StringType,
description=(
"A custom User-Agent header to send with each request. Default is "
"'<tap_name>/<tap_version>'"
),
),
{%- endif %}
).to_dict()
{%- if cookiecutter.stream_type in ("GraphQL", "REST", "Other") %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ singer-sdk = { version="~=0.39.1", extras = ["testing"] }
[tool.poetry.extras]
s3 = ["fs-s3fs"]

[tool.pytest.ini_options]
addopts = '--durations=10'

[tool.mypy]
python_version = "3.12"
warn_unused_configs = true

[tool.ruff]
src = ["{{cookiecutter.library_name}}"]
target-version = "py38"
Expand Down
75 changes: 31 additions & 44 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ 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}
Expand All @@ -110,7 +109,6 @@ docs = [
s3 = ["fs-s3fs"]
testing = [
"pytest",
"pytest-durations"
]
parquet = ["numpy", "pyarrow"]
faker = ["faker"]
Expand Down Expand Up @@ -143,7 +141,7 @@ types-PyYAML = ">=6.0.12"
pytest-codspeed = ">=2.2.0"

[tool.pytest.ini_options]
addopts = '--ignore=singer_sdk/helpers/_simpleeval.py -m "not external"'
addopts = '--durations=10 --ignore=singer_sdk/helpers/_simpleeval.py -m "not external"'
filterwarnings = [
"error",
"ignore:Could not configure external gitlab tests:UserWarning",
Expand Down Expand Up @@ -251,7 +249,6 @@ DEP002 = [
"sphinx-reredirects",
# Plugins
"fs-s3fs",
"pytest-durations",
]

[tool.mypy]
Expand Down
4 changes: 0 additions & 4 deletions samples/sample_tap_dummy_json/tap_dummyjson/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ def authenticator(self):
password=self.config["password"],
)

@property
def http_headers(self):
return {"User-Agent": "tap-dummyjson"}

def get_new_paginator(self):
return BaseOffsetPaginator(start_value=0, page_size=PAGE_SIZE)

Expand Down
Loading

0 comments on commit 39b28ea

Please sign in to comment.