Skip to content

Commit

Permalink
Merge branch 'master' into grubberr/11417-source-amazon-ads
Browse files Browse the repository at this point in the history
  • Loading branch information
grubberr committed Apr 15, 2022
2 parents 9022d2e + 67dd934 commit ff4b28f
Show file tree
Hide file tree
Showing 392 changed files with 7,574 additions and 5,420 deletions.
6 changes: 5 additions & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.35.67-alpha
current_version = 0.36.0-alpha
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-[a-z]+)?
Expand Down Expand Up @@ -47,3 +47,7 @@ serialize =
[bumpversion:file:octavia-cli/README.md]

[bumpversion:file:octavia-cli/Dockerfile]

[bumpversion:file:octavia-cli/setup.py]
serialize =
{major}.{minor}.{patch}
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


### SHARED ###
VERSION=0.35.67-alpha
VERSION=0.36.0-alpha

# When using the airbyte-db via default docker image
CONFIG_ROOT=/data
Expand Down
136 changes: 59 additions & 77 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,6 @@ jobs:
- name: Run integration tests
run: ./tools/bin/integration_tests_octavia.sh

- name: Slack Notification - Failure
if: failure() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildozer
SLACK_ICON: https://avatars.slack-edge.com/temp/2020-09-01/1342729352468_209b10acd6ff13a649a1.jpg
SLACK_COLOR: DC143C
SLACK_TITLE: "Build failure"
SLACK_FOOTER: ""

- name: Slack Notification - Success
if: success() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildbot
SLACK_TITLE: "Build Success"
SLACK_FOOTER: ""

# Connectors Base
# In case of self-hosted EC2 errors, remove this block.
start-connectors-base-build-runner:
Expand Down Expand Up @@ -248,25 +228,6 @@ jobs:
- name: Ensure no file change
run: git --no-pager diff && test -z "$(git --no-pager diff)"

- name: Slack Notification - Failure
if: failure() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildozer
SLACK_ICON: https://avatars.slack-edge.com/temp/2020-09-01/1342729352468_209b10acd6ff13a649a1.jpg
SLACK_COLOR: DC143C
SLACK_TITLE: "Build failure"
SLACK_FOOTER: ""

- name: Slack Notification - Success
if: success() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildbot
SLACK_TITLE: "Build Success"
SLACK_FOOTER: ""
# In case of self-hosted EC2 errors, remove this block.
stop-connectors-base-build-runner:
name: "Connectors Base: Stop Build EC2 Runner"
Expand Down Expand Up @@ -528,25 +489,6 @@ jobs:
- name: Automatic Migration Acceptance Test
run: SUB_BUILD=PLATFORM ./gradlew :airbyte-tests:automaticMigrationAcceptanceTest --scan -i

- name: Slack Notification - Failure
if: failure() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildozer
SLACK_ICON: https://avatars.slack-edge.com/temp/2020-09-01/1342729352468_209b10acd6ff13a649a1.jpg
SLACK_COLOR: DC143C
SLACK_TITLE: "Build failure"
SLACK_FOOTER: ""

- name: Slack Notification - Success
if: success() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildbot
SLACK_TITLE: "Build Success"
SLACK_FOOTER: ""
# In case of self-hosted EC2 errors, remove this block.
stop-platform-build-runner:
name: "Platform: Stop Build EC2 Runner"
Expand Down Expand Up @@ -655,25 +597,6 @@ jobs:
- name: Run End-to-End Acceptance Tests with the new scheduler
run: ./tools/bin/acceptance_test_with_new_scheduler.sh

- name: Slack Notification - Failure
if: failure() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildozer
SLACK_ICON: https://avatars.slack-edge.com/temp/2020-09-01/1342729352468_209b10acd6ff13a649a1.jpg
SLACK_COLOR: DC143C
SLACK_TITLE: "Build failure"
SLACK_FOOTER: ""

- name: Slack Notification - Success
if: success() && github.ref == 'refs/heads/master'
uses: rtCamp/action-slack-notify@master
env:
SLACK_WEBHOOK: ${{ secrets.BUILD_SLACK_WEBHOOK }}
SLACK_USERNAME: Buildbot
SLACK_TITLE: "Build Success"
SLACK_FOOTER: ""
# In case of self-hosted EC2 errors, remove this block.
stop-platform-new-scheduler-acceptance-runner:
name: "Platform: Stop Docker w/ Scheduler v2 Test Runner"
Expand Down Expand Up @@ -1005,3 +928,62 @@ jobs:
github-token: ${{ needs.find_valid_pat.outputs.pat }}
label: ${{ needs.start-kube-acceptance-test-runner-v2.outputs.label }}
ec2-instance-id: ${{ needs.start-kube-acceptance-test-runner-v2.outputs.ec2-instance-id }}

notify-failure-slack-channel:
name: "Notify Slack Channel on Build Failures"
runs-on: ubuntu-latest
needs:
- build-connectors-base
- frontend-build
- octavia-cli-build
- platform-build
- platform-new-scheduler-acceptance
- kube-acceptance-test
- kube-acceptance-test-v2
if: ${{ failure() && github.ref == 'refs/heads/master' }}
steps:
- name: Publish to OSS Build Failure Slack Channel
uses: abinoda/slack-action@master
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
with:
args: >-
{\"channel\":\"C03BEADRPNY\", \"blocks\":[
{\"type\":\"divider\"},
{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\" Merge to OSS Master failed! :bangbang: \n\n\"}},
{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"_merged by_: *${{ github.actor }}* \n\"}},
{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\" :octavia-shocked: <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|View Action Run> :octavia-shocked: \n\"}},
{\"type\":\"divider\"}]}
notify-failure-slack-channel-fixed-broken-build:
name: "Notify Slack Channel on Build Fixes"
runs-on: ubuntu-latest
needs:
- build-connectors-base
- frontend-build
- octavia-cli-build
- platform-build
- platform-new-scheduler-acceptance
- kube-acceptance-test
- kube-acceptance-test-v2
if: success()
steps:
- name: Get Previous Workflow Status
uses: Mercymeilya/[email protected]
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# To avoid clogging up the channel, only publish build success if the previous build was a failure since this means the build was fixed.
- name: Publish Build Fixed Message to OSS Build Failure Slack Channel
if: ${{ steps.last_status.outputs.last_status == 'failure' }}
uses: abinoda/slack-action@master
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN_AIRBYTE_TEAM }}
with:
args: >-
{\"channel\":\"C03AXC61YBZ\", \"blocks\":[
{\"type\":\"divider\"},
{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\" OSS Master Fixed! :white_check_mark: \n\n\"}},
{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"_merged by_: *${{ github.actor }}* \n\"}},
{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\" :octavia-rocket: <https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}|View Action Run> :octavia-rocket: \n\"}},
{\"type\":\"divider\"}]}
3 changes: 1 addition & 2 deletions .github/workflows/publish-cdk-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# 3.7.1 - is a minimal of 3.7.X version supported by github actions
python-version: [3.7.1, 3.7, 3.8, 3.9]
python-version: ["3.9"]
steps:
- uses: actions/setup-python@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-bootloader/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG JDK_VERSION=17.0.1
FROM openjdk:${JDK_VERSION}-slim

ARG VERSION=0.35.67-alpha
ARG VERSION=0.36.0-alpha

ENV APPLICATION airbyte-bootloader
ENV VERSION ${VERSION}
Expand Down
4 changes: 4 additions & 0 deletions airbyte-cdk/python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.54
- Add ability to import `IncrementalMixin` from `airbyte_cdk.sources.streams`.
- Bumped minimum supported Python version to 3.9.

## 0.1.53
Remove a false positive error logging during the send process.

Expand Down
4 changes: 2 additions & 2 deletions airbyte-cdk/python/airbyte_cdk/sources/streams/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#

# Initialize Streams Package
from .core import Stream
from .core import IncrementalMixin, Stream

__all__ = ["Stream"]
__all__ = ["IncrementalMixin", "Stream"]
4 changes: 1 addition & 3 deletions airbyte-cdk/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="airbyte-cdk",
version="0.1.53",
version="0.1.54",
description="A framework for writing Airbyte Connectors.",
long_description=README,
long_description_content_type="text/markdown",
Expand All @@ -33,8 +33,6 @@
"Topic :: Software Development :: Libraries :: Python Modules",
"License :: OSI Approved :: MIT License",
# Python Version Support
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
keywords="airbyte connector-development-kit cdk",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
* returning a list for query results. In addition, we provide helper functions that will just
* return a single value (see: {@link JsonPaths#getSingleValue(JsonNode, String)}). These should
* only be used if it is not possible for a query to return more than one value.
*
* Note: Package private as most uses of JsonPaths seems like they can be hidden inside other
* commons libraries (i.e. Jsons and JsonsSchemas). If this assumption proves incorrect, we can open
* it up.
*/
class JsonPaths {
public class JsonPaths {

private static final Logger LOGGER = LoggerFactory.getLogger(JsonPaths.class);

static final String JSON_PATH_START_CHARACTER = "$";
static final String JSON_PATH_LIST_SPLAT = "[*]";
static final String JSON_PATH_FIELD_SEPARATOR = ".";

// set default configurations at start up to match our JSON setup.
static {
Configuration.setDefaults(new Configuration.Defaults() {
Expand Down Expand Up @@ -82,6 +82,18 @@ public Set<Option> options() {
});
}

public static String empty() {
return JSON_PATH_START_CHARACTER;
}

public static String appendField(final String jsonPath, final String field) {
return jsonPath + JSON_PATH_FIELD_SEPARATOR + field;
}

public static String appendAppendListSplat(final String jsonPath) {
return jsonPath + JSON_PATH_LIST_SPLAT;
}

/*
* This version of the JsonPath Configuration object allows queries to return to the path of values
* instead of the values that were found.
Expand Down
Loading

1 comment on commit ff4b28f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SonarQube Report

SonarQube report for Airbyte Connectors Source Amazon Ads(#11430)

Measures

Name Value Name Value Name Value
Security Rating A Coverage 97.1 Quality Gate Status OK
Lines to Cover 35 Bugs 0 Duplicated Blocks 0
Reliability Rating A Lines of Code 1505 Code Smells 7
Duplicated Lines (%) 0.0 Vulnerabilities 0 Blocker Issues 0
Critical Issues 1 Major Issues 13 Minor Issues 56

Detected Issues

Rule File Description Message
python:S112 (MAJOR) streams/common.py:153 "Exception" and "BaseException" should not be raised Replace this generic exception class with a more specific one.
python:mypy_assignment (MINOR) report_streams/products_report.py:248 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "List[str]", base class "ReportStream" defined the type as "None") . Code line: primary_key = ["profileId", "recordType", "reportDate"]
python:mypy_attr_defined (MINOR) report_streams/report_streams.py:22 Check that attribute exists Module "pendulum" does not explicitly export attribute "DateTime"; implicit reexport disabled . Code line: from pendulum import DateTime
python:mypy_assignment (MINOR) report_streams/report_streams.py:380 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "str") . Code line: report_date = pendulum.from_format(report_date, ReportStream.R...
python:mypy_no_any_return (MINOR) report_streams/report_streams.py:383 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return profile_time.format(ReportStream.REPORT_DATE_FORMAT)
python:mypy_arg_type (MINOR) report_streams/report_streams.py:169 Check argument types in calls Argument 1 to "backoff_max_tries" has incompatible type "Callable[[ReportStream, Any], Any]"; expected "ReportStream" . Code line: @backoff_max_tries
python:mypy_arg_type (MINOR) report_streams/report_streams.py:176 Check argument types in calls Argument 1 to "backoff_max_time" has incompatible type "Callable[[ReportStream, Any], Any]"; expected "ReportStream" . Code line: @backoff_max_time
python:S1192 (CRITICAL) source_amazon_ads/spec.py String literals should not be duplicated Define a constant instead of duplicating this literal "oauth2.0" 3 times.
python:mypy_no_any_return (MINOR) report_streams/report_streams.py Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return profile_time.strftime(ReportStream.REPORT_DATE_FORMAT)
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:72 Check argument types in calls Argument 1 to "_choose_profiles" of "SourceAmazonAds" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: ... stream_args["profiles"] = self._choose_profiles(config, profiles_list...
python:S1066 (MAJOR) schemas/common.py:32 Collapsible "if" statements should be merged Merge this if statement with the enclosing one.
python:mypy_call_overload (MINOR) schemas/common.py:45 Check that an overload variant matches arguments No overload variant of "create_model" matches argument types "str", "Dict[str, Tuple[Type[str], None]]", "Type[CatalogModel]" . Code line: metrics_obj_model = create_model("MetricObjModel", **{f: (str,...
python:mypy_return_value (MINOR) schemas/common.py:46 Check that return value is compatible with signature Incompatible return value type (got "Type[MetricsReport]", expected "CatalogModel") . Code line: return create_model("MetricsModel", metric=(metrics_obj_model,...
python:S5890 (MAJOR) schemas/profile.py:14 Values assigned to variables should match their type annotations Assign to "name" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:14 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: name: str = None
python:S5890 (MAJOR) schemas/profile.py:15 Values assigned to variables should match their type annotations Assign to "subType" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:15 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: subType: str = None
python:S5890 (MAJOR) schemas/profile.py:16 Values assigned to variables should match their type annotations Assign to "validPaymentMethod" a value of type "bool" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "bool") . Code line: validPaymentMethod: bool = None
python:S5890 (MAJOR) schemas/profile.py:21 Values assigned to variables should match their type annotations Assign to "countryCode" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:21 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: countryCode: str = None
python:mypy_assignment (MINOR) schemas/profile.py:22 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: currencyCode: str = None
python:S5890 (MAJOR) schemas/profile.py:22 Values assigned to variables should match their type annotations Assign to "currencyCode" a value of type "str" instead of "NoneType" or update its type hint.
python:S5890 (MAJOR) schemas/profile.py:23 Values assigned to variables should match their type annotations Assign to "dailyBudget" a value of type "Decimal" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/profile.py:23 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "Decimal") . Code line: dailyBudget: Decimal = None
python:S5890 (MAJOR) schemas/sponsored_brands.py:23 Values assigned to variables should match their type annotations Assign to "bidOptimization" a value of type "bool" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_brands.py:23 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "bool") . Code line: bidOptimization: bool = None
python:S5890 (MAJOR) schemas/sponsored_brands.py:24 Values assigned to variables should match their type annotations Assign to "bidMultiplier" a value of type "Decimal" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_brands.py:24 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "Decimal") . Code line: bidMultiplier: Decimal = None
python:S5890 (MAJOR) schemas/sponsored_display.py:16 Values assigned to variables should match their type annotations Assign to "endDate" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_display.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: endDate: str = None
python:S5890 (MAJOR) schemas/sponsored_display.py:19 Values assigned to variables should match their type annotations Assign to "portfolioId" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_display.py:19 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: portfolioId: str = None
python:S5890 (MAJOR) schemas/sponsored_products.py:31 Values assigned to variables should match their type annotations Assign to "endDate" a value of type "str" instead of "NoneType" or update its type hint.
python:mypy_assignment (MINOR) schemas/sponsored_products.py:31 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", variable has type "str") . Code line: endDate: str = None
python:mypy_valid_type (MINOR) source_amazon_ads/source.py:42 Check that type (annotation) is valid Function "builtins.any" is not valid as a type . Code line: ...logger: AirbyteLogger, config: Mapping[str, Any]) -> Tuple[bool, any]:
python:mypy_assignment (MINOR) source_amazon_ads/source.py:48 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "AmazonAdsConfig", variable has type "Mapping[str, Any]") . Code line: config = AmazonAdsConfig(**config)
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:54 Check argument types in calls Argument 1 to "Profiles" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: Profiles(config, authenticator=self._make_authenticator(config...
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:54 Check argument types in calls Argument 1 to "_make_authenticator" of "SourceAmazonAds" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: ...s(config, authenticator=self._make_authenticator(config)).get_all_prof...
python:mypy_assignment (MINOR) source_amazon_ads/source.py:62 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "AmazonAdsConfig", variable has type "Mapping[str, Any]") . Code line: config = AmazonAdsConfig(**config)
python:mypy_arg_type (MINOR) source_amazon_ads/source.py:63 Check argument types in calls Argument 1 to "_make_authenticator" of "SourceAmazonAds" has incompatible type "Mapping[str, Any]"; expected "AmazonAdsConfig" . Code line: auth = self._make_authenticator(config)
python:mypy_import (MINOR) streams/common.py:9 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_override (MINOR) streams/common.py:172 Check that method override is compatible with base class Return type "Optional[int]" of "next_page_token" incompatible with return type "Optional[Mapping[str, Any]]" in supertype "AmazonAdsStream" . Code line: def next_page_token(self, response: requests.Response) -> Optional...
python:mypy_no_any_return (MINOR) streams/common.py:183 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Optional[int]" . Code line: return next_offset
python:mypy_import (MINOR) streams/profiles.py:7 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_assignment (MINOR) streams/profiles.py:20 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[Profile]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = Profile
python:mypy_has_type (MINOR) streams/profiles.py:27 Check that type of reference can be determined Cannot determine type of "model" . Code line: profile_id_obj = self.model.parse_obj(record)
python:mypy_has_type (MINOR) streams/profiles.py:48 Check that type of reference can be determined Cannot determine type of "model" . Code line: return [self.model.parse_obj(profile) for profile in self.read...
python:mypy_assignment (MINOR) report_streams/report_streams.py Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", variable has type "datetime") . Code line: next_date = next_date.strftime(ReportStream.REPORT_DATE_FO...
python:mypy_misc (MINOR) report_streams/report_streams.py Miscellaneous other checks Incompatible types in "yield" (actual type "datetime", expected type "str") . Code line: yield next_date
python:mypy_assignment (MINOR) report_streams/report_streams.py Check that assigned value is compatible with target Incompatible types in assignment (expression has type "datetime", variable has type "str") . Code line: report_date = datetime.strptime(report_date, ReportStream.REPO...
python:mypy_import (MINOR) report_streams/report_streams.py:17 Require that imported module can be found or has stubs Library stubs not installed for "pytz" (or incompatible with Python 3.9) . Code line: import pytz
python:mypy_import (MINOR) report_streams/report_streams.py:18 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.9) . Code line: import requests
python:mypy_attr_defined (MINOR) report_streams/report_streams.py:111 Check that attribute exists Module has no attribute "parse" . Code line: self._start_date = pendulum.parse(config.start_date).set(tz="U...
python:mypy_no_any_return (MINOR) report_streams/report_streams.py:116 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "CatalogModel" . Code line: return self._model
python:mypy_attr_defined (MINOR) report_streams/report_streams.py:382 Check that attribute exists "str" has no attribute "astimezone" . Code line: profile_time = report_date.astimezone(profile_tz)
python:mypy_no_any_return (MINOR) report_streams/report_streams.py:397 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Dict[Any, Any]]" . Code line: return json.loads(raw_string)
python:mypy_assignment (MINOR) streams/sponsored_brands.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[BrandsCampaign]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = BrandsCampaign
python:mypy_assignment (MINOR) streams/sponsored_brands.py:29 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[BrandsAdGroup]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = BrandsAdGroup
python:mypy_assignment (MINOR) streams/sponsored_brands.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[BrandsAdGroup]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = BrandsAdGroup
python:mypy_assignment (MINOR) streams/sponsored_display.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayCampaign]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayCampaign
python:mypy_assignment (MINOR) streams/sponsored_display.py:29 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayAdGroup]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayAdGroup
python:mypy_assignment (MINOR) streams/sponsored_display.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayProductAds]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayProductAds
python:mypy_assignment (MINOR) streams/sponsored_display.py:55 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[DisplayTargeting]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = DisplayTargeting
python:mypy_assignment (MINOR) streams/sponsored_products.py:16 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductCampaign]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductCampaign
python:mypy_assignment (MINOR) streams/sponsored_products.py:29 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductAdGroups]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductAdGroups
python:mypy_assignment (MINOR) streams/sponsored_products.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[Keywords]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = Keywords
python:mypy_assignment (MINOR) streams/sponsored_products.py:55 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[NegativeKeywords]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = NegativeKeywords
python:mypy_assignment (MINOR) streams/sponsored_products.py:68 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductAd]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductAd
python:mypy_assignment (MINOR) streams/sponsored_products.py:81 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Type[ProductTargeting]", base class "BasicAmazonAdsStream" defined the type as "CatalogModel") . Code line: model = ProductTargeting

Coverage (97.1%)

File Coverage File Coverage
source_amazon_ads/init.py 100.0 source_amazon_ads/constants.py 100.0
source_amazon_ads/schemas/init.py 100.0 source_amazon_ads/schemas/common.py 100.0
source_amazon_ads/schemas/profile.py 100.0 source_amazon_ads/schemas/sponsored_brands.py 100.0
source_amazon_ads/schemas/sponsored_display.py 100.0 source_amazon_ads/schemas/sponsored_products.py 100.0
source_amazon_ads/source.py 97.1 source_amazon_ads/spec.py 100.0
source_amazon_ads/streams/init.py 100.0 source_amazon_ads/streams/common.py 98.7
source_amazon_ads/streams/profiles.py 100.0 source_amazon_ads/streams/report_streams/init.py 100.0
source_amazon_ads/streams/report_streams/brands_report.py 100.0 source_amazon_ads/streams/report_streams/brands_video_report.py 100.0
source_amazon_ads/streams/report_streams/display_report.py 100.0 source_amazon_ads/streams/report_streams/products_report.py 100.0
source_amazon_ads/streams/report_streams/report_streams.py 97.0 source_amazon_ads/streams/sponsored_brands.py 100.0
source_amazon_ads/streams/sponsored_display.py 100.0 source_amazon_ads/streams/sponsored_products.py 100.0

Please sign in to comment.