From 9f7c1fd9a3e6a5ca8feeabd7a4c2b21724d34f27 Mon Sep 17 00:00:00 2001 From: pnadolny13 Date: Wed, 2 Aug 2023 14:42:54 -0400 Subject: [PATCH] fix bugs with mapper cookiecutter --- ...ecutter.include_ci_files == 'GitHub' %}test.yml{%endif%} | 2 +- .../{{cookiecutter.mapper_id}}/.pre-commit-config.yaml | 6 ------ .../{{cookiecutter.mapper_id}}/pyproject.toml | 6 ------ .../{{cookiecutter.mapper_id}}/tests/__init__.py | 2 +- .../{{cookiecutter.library_name}}/mapper.py | 4 ++-- 5 files changed, 4 insertions(+), 16 deletions(-) diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%} b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%} index 0ea2f9ae7..0cfc81005 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%} +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.github/workflows/{% if cookiecutter.include_ci_files == 'GitHub' %}test.yml{%endif%} @@ -1,7 +1,7 @@ ### A CI workflow template that runs linting and python testing ### TODO: Modify as needed or as desired. -name: Test {{cookiecutter.tap_id}} +name: Test {{cookiecutter.mapper_id}} on: [push] diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml index 12c29e27b..6d9bbbfd5 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/.pre-commit-config.yaml @@ -34,9 +34,3 @@ repos: rev: v1.4.1 hooks: - id: mypy - additional_dependencies: - {%- if cookiecutter.stream_type == "SQL" %} - - sqlalchemy-stubs - {%- else %} - - types-requests - {%- endif %} diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml index b44f1327f..9947e314e 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/pyproject.toml @@ -24,12 +24,6 @@ packages = [ python = "<3.12,>=3.7.1" singer-sdk = { version="^0.30.0" } fs-s3fs = { version = "^1.1.1", optional = true } -{%- if cookiecutter.stream_type in ["REST", "GraphQL"] %} -requests = "^2.31.0" -{%- endif %} -{%- if cookiecutter.auth_method in ("OAuth2", "JWT") %} -cached-property = "^1" # Remove after Python 3.7 support is dropped -{%- endif %} [tool.poetry.group.dev.dependencies] pytest = "^7.2.1" diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/__init__.py b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/__init__.py index a16590961..7caba56f7 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/__init__.py +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/tests/__init__.py @@ -1 +1 @@ -"""Test suite for {{ cookiecutter.tap_id }}.""" +"""Test suite for {{ cookiecutter.mapper_id }}.""" diff --git a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/{{cookiecutter.library_name}}/mapper.py b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/{{cookiecutter.library_name}}/mapper.py index 1fc041bcf..6b6e11b50 100644 --- a/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/{{cookiecutter.library_name}}/mapper.py +++ b/cookiecutter/mapper-template/{{cookiecutter.mapper_id}}/{{cookiecutter.library_name}}/mapper.py @@ -1,4 +1,4 @@ -"""{{ cookiecutter.destination_name }} target class.""" +"""{{ cookiecutter.name }} mapper class.""" from __future__ import annotations @@ -17,7 +17,7 @@ class {{ cookiecutter.name }}Mapper(InlineMapper): """Sample mapper for {{ cookiecutter.name }}.""" - name = "{{ cookiecutter.ammper_id }}" + name = "{{ cookiecutter.mapper_id }}" config_jsonschema = th.PropertiesList( # TODO: Replace or remove this example config based on your needs