Skip to content

Commit

Permalink
Merge branch 'master' into marcos/test-pr-10655
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmarxm committed Mar 1, 2022
2 parents 5fddcd6 + a4e8417 commit bab6b13
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 52 deletions.
4 changes: 2 additions & 2 deletions airbyte-api/src/main/openapi/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2910,9 +2910,9 @@ components:
OperationIdRequestBody:
type: object
required:
- OperationId
- operationId
properties:
OperationId:
operationId:
$ref: "#/components/schemas/OperationId"
OperationCreate:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"additionalProperties": true,
"properties": {
"host": {
"description": "The host domain of the snowflake instance (must include the account, region, cloud environment, and end with snowflakecomputing.com).",
"examples": ["accountname.us-east-2.aws.snowflakecomputing.com"],
"description": "The host domain of the snowflake instance (must include the account, region, cloud environment, and end with snowflakecomputing.com). The account identifier differs depending on your cloud region, be sure to verify with Snowflake's documentation.",
"examples": ["accountname.us-east-2.aws.snowflakecomputing.com", "accountname.snowflakecomputing.com"],
"type": "string",
"title": "Host",
"order": 0
Expand Down
21 changes: 18 additions & 3 deletions airbyte-webapp/src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ import {

import { Card } from "components";

type PaddingProps = {
left?: number;
right?: number;
};

type IHeaderProps = {
headerHighlighted?: boolean;
collapse?: boolean;
customWidth?: number;
customPadding?: PaddingProps;
} & ColumnInstance;

type ICellProps = {
Expand All @@ -25,6 +31,7 @@ type IThProps = {
highlighted?: boolean;
collapse?: boolean;
customWidth?: number;
customPadding?: PaddingProps;
light?: boolean;
} & React.ThHTMLAttributes<HTMLTableHeaderCellElement>;

Expand All @@ -47,8 +54,13 @@ const Tr = styled.tr<{
cursor: ${({ hasClick }) => (hasClick ? "pointer" : "auto")};
`;

const Td = styled.td<{ collapse?: boolean; customWidth?: number }>`
padding: 16px 13px;
const Td = styled.td<{
collapse?: boolean;
customWidth?: number;
customPadding?: PaddingProps;
}>`
padding: ${({ customPadding }) =>
`16px ${customPadding?.right ?? 13}px 16px ${customPadding?.left ?? 13}px`};
font-size: 12px;
line-height: 15px;
font-weight: normal;
Expand All @@ -75,7 +87,8 @@ const Td = styled.td<{ collapse?: boolean; customWidth?: number }>`

const Th = styled.th<IThProps>`
background: ${({ theme, light }) => (light ? "none" : theme.textColor)};
padding: 9px 13px 10px;
padding: ${({ customPadding }) =>
`9px ${customPadding?.right ?? 13}px 10px ${customPadding?.left ?? 13}px`};
text-align: left;
font-size: ${({ light }) => (light ? 11 : 10)}px;
line-height: 12px;
Expand Down Expand Up @@ -157,6 +170,7 @@ const Table: React.FC<IProps> = ({
{...column.getHeaderProps()}
highlighted={column.headerHighlighted}
collapse={column.collapse}
customPadding={column.customPadding}
customWidth={column.customWidth}
key={`table-column-${key}-${columnKey}`}
light={light}
Expand Down Expand Up @@ -185,6 +199,7 @@ const Table: React.FC<IProps> = ({
<Td
{...cell.getCellProps()}
collapse={cell.column.collapse}
customPadding={cell.column.customPadding}
customWidth={cell.column.customWidth}
key={`table-cell-${row.id}-${key}`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ export type IProps = {
data?: IDataItem;
} & SingleValueProps<OptionTypeBase>;

const ItemView = styled.div`
export const ItemView = styled.div`
display: flex;
flex-direction: row;
justify-content: left;
align-items: center;
`;

const Icon = styled.div`
export const Icon = styled.div`
margin-right: 6px;
display: inline-block;
`;
Expand Down
2 changes: 1 addition & 1 deletion airbyte-webapp/src/packages/cloud/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"login.loginTitle": "Sign in to Airbyte",
"login.lastStep": "One last step",
"login.confirmEmail": "Confirm your email address!",
"login.confirmEmail.text": "We sent you a confirmation link to {email}. <br/>Please click on the link to access your new Airbyte account.",
"login.confirmEmail.text": "We sent you a confirmation link to {email}. Please click on the link to access your new Airbyte account.",
"login.resendEmail": "Didn’t receive the email? Send it again",
"confirmEmail.signOut": "Entered the wrong email address? Start over",
"login.yourEmail": "Your work email*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,13 @@ import React from "react";
import styled from "styled-components";

type ConnectionCellProps = {
value: number;
percent: number;
};

const Content = styled.div`
display: flex;
flex-direction: row;
align-items: center;
`;

const Value = styled.div`
padding-right: 10px;
font-weight: 500;
font-size: 14px;
line-height: 17px;
flex: 1 0 0;
min-width: 50px;
`;

const Bar = styled.div`
height: 10px;
width: 100%;
min-width: 150px;
background: ${({ theme }) => theme.greyColor20};
flex: 10 0 0;
overflow: hidden;
Expand All @@ -37,15 +22,10 @@ const Full = styled.div<{ percent: number }>`
opacity: 0.5;
`;

const UsageCell: React.FC<ConnectionCellProps> = ({ value, percent }) => {
return (
<Content>
<Value>{value}</Value>
<Bar>
<Full percent={percent} />
</Bar>
</Content>
);
};
const UsageCell: React.FC<ConnectionCellProps> = ({ percent }) => (
<Bar>
<Full percent={percent} />
</Bar>
);

export default UsageCell;
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ const Content = styled.div`
padding: 0 60px 0 15px;
`;

const UsageValue = styled.div`
font-weight: 500;
font-size: 14px;
line-height: 17px;
padding-right: 10px;
min-width: 53px;
`;

type UsagePerConnectionTableProps = {
creditConsumption: CreditConsumptionByConnector[];
};
Expand Down Expand Up @@ -144,11 +152,18 @@ const UsagePerConnectionTable: React.FC<UsagePerConnectionTableProps> = ({
</>
),
accessor: "creditsConsumed",
Cell: ({ cell, row }: CellProps<FullTableProps>) => (
<UsageCell
value={cell.value}
percent={row.original.creditsConsumedPercent}
/>
collapse: true,
customPadding: { right: 0 },
Cell: ({ cell }: CellProps<FullTableProps>) => (
<UsageValue>{cell.value}</UsageValue>
),
},
{
Header: "",
accessor: "creditsConsumedPercent",
customPadding: { left: 0 },
Cell: ({ cell }: CellProps<FullTableProps>) => (
<UsageCell percent={cell.value} />
),
},
// TODO: Replace to Grow column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ import {
IProps as OptionProps,
OptionView,
} from "components/base/DropDown/components/Option";
import {
IProps as SingleValueProps,
Icon as SingleValueIcon,
ItemView as SingleValueView,
} from "components/base/DropDown/components/SingleValue";

const BottomElement = styled.div`
background: ${(props) => props.theme.greyColro0};
Expand Down Expand Up @@ -70,6 +75,15 @@ const Stage = styled.div`
color: ${({ theme }) => theme.textColor};
`;

const SingleValueContent = styled(components.SingleValue)`
width: 100%;
padding-right: 38px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
`;

type MenuWithRequestButtonProps = MenuListComponentProps<IDataItem, false>;

const ConnectorList: React.FC<MenuWithRequestButtonProps> = ({
Expand All @@ -88,6 +102,18 @@ const ConnectorList: React.FC<MenuWithRequestButtonProps> = ({
</>
);

const StageLabel: React.FC<{ releaseStage?: ReleaseStage }> = ({
releaseStage,
}) =>
releaseStage && releaseStage !== ReleaseStage.GENERALLY_AVAILABLE ? (
<Stage>
<FormattedMessage
id={`connector.releaseStage.${releaseStage}`}
defaultMessage={releaseStage}
/>
</Stage>
) : null;

const Option: React.FC<OptionProps> = (props) => {
return (
<components.Option {...props}>
Expand All @@ -100,20 +126,26 @@ const Option: React.FC<OptionProps> = (props) => {
{props.data.img || null}
<Label>{props.label}</Label>
</Text>
{props.data.releaseStage &&
props.data.releaseStage !== ReleaseStage.GENERALLY_AVAILABLE ? (
<Stage>
<FormattedMessage
id={`connector.releaseStage.${props.data.releaseStage}`}
defaultMessage={props.data.releaseStage}
/>
</Stage>
) : null}
<StageLabel releaseStage={props.data.releaseStage} />
</OptionView>
</components.Option>
);
};

const SingleValue: React.FC<SingleValueProps> = (props) => {
return (
<SingleValueView>
{props.data.img && <SingleValueIcon>{props.data.img}</SingleValueIcon>}
<div>
<SingleValueContent {...props}>
{props.data.label}
<StageLabel releaseStage={props.data.releaseStage} />
</SingleValueContent>
</div>
</SingleValueView>
);
};

const ConnectorServiceTypeControl: React.FC<{
property: FormBaseItem;
formType: "source" | "destination";
Expand Down Expand Up @@ -198,6 +230,7 @@ const ConnectorServiceTypeControl: React.FC<{
components={{
MenuList: ConnectorList,
Option,
SingleValue,
}}
selectProps={{ onOpenRequestConnectorModal }}
error={!!fieldMeta.error && fieldMeta.touched}
Expand Down
4 changes: 3 additions & 1 deletion docs/integrations/destinations/snowflake.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ commit;

You should now have all the requirements needed to configure Snowflake as a destination in the UI. You'll need the following information to configure the Snowflake destination:

* **[Host](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html)** : The host domain of the snowflake instance (must include the account, region, cloud environment, and end with snowflakecomputing.com). Example - `accountname.us-east-2.aws.snowflakecomputing.com`
* **[Host](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html)** : The host domain of the snowflake instance (must include the account, region, cloud environment, and end with snowflakecomputing.com). Be sure to use the correct [account identifier format](https://docs.snowflake.com/en/user-guide/admin-account-identifier.html#account-identifier-formats-by-cloud-platform-and-region) based on the region you are in:
* Example - us-west-1: `xy12345.snowflakecomputing.com`
* Example - us-east-2: `xy12345.us-east-2.aws.snowflakecomputing.com`
* **[Role](https://docs.snowflake.com/en/user-guide/security-access-control-overview.html#roles)** : The role you created for Airbyte to access Snowflake. Example - `AIRBYTE_ROLE`
* **[Warehouse](https://docs.snowflake.com/en/user-guide/warehouses-overview.html#overview-of-warehouses)** : The warehouse you created for Airbyte to sync data into. Example - `AIRBYTE_WAREHOUSE`
* **[Database](https://docs.snowflake.com/en/sql-reference/ddl-database.html#database-schema-share-ddl)** : The database you created for Airbyte to sync data into. Example - `AIRBYTE_DATABASE`
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/api/generated-api-html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9154,7 +9154,7 @@ <h3><a name="OperationCreate"><code>OperationCreate</code> - </a> <a class="up"
<h3><a name="OperationIdRequestBody"><code>OperationIdRequestBody</code> - </a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
<div class="field-items">
<div class="param">OperationId </div><div class="param-desc"><span class="param-type"><a href="#UUID">UUID</a></span> format: uuid</div>
<div class="param">operationId </div><div class="param-desc"><span class="param-type"><a href="#UUID">UUID</a></span> format: uuid</div>
</div> <!-- field-items -->
</div>
<div class="model">
Expand Down

1 comment on commit bab6b13

@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 Facebook Marketing(#10767)

Measures

Name Value Name Value Name Value
Quality Gate Status OK Security Rating A Duplicated Blocks 0
Reliability Rating A Code Smells 93 Coverage 89.4
Duplicated Lines (%) 0.0 Lines of Code 1120 Bugs 0
Vulnerabilities 0 Lines to Cover 832 Blocker Issues 0
Critical Issues 0 Major Issues 3 Minor Issues 90

Detected Issues

Rule File Description Message
python:mypy_override (MINOR) streams/streams.py:105 Check that method override is compatible with base class Signature of "list_objects" incompatible with supertype "FBMarketingStream" . Code line: def list_objects(self, fields: List[str], params: Mapping[str, Any...
python:mypy_no_any_return (MINOR) streams/streams.py:106 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_activities(fields=fields, params=...
python:mypy_arg_type (MINOR) streams/streams.py:116 Check argument types in calls Argument "stream_state" to "request_params" of "FBMarketingIncrementalStream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ...ds=self.fields, params=self.request_params(stream_state=stream_state))
python:mypy_attr_defined (MINOR) streams/streams.py:127 Check that attribute exists Module has no attribute "parse" . Code line: ...since = self.start_date if not state_value else pendulum.parse(state...
python:mypy_no_redef (MINOR) streams/base_streams.py:76 Check that each name is defined once Name "api_batch" already defined on line 69 . Code line: api_batch: FacebookAdsApiBatch = self._api.api.new_bat...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:80 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Activities(api=api, start_date=config.start_date, end_date...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:80 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:80 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_assignment (MINOR) streams/streams.py:101 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "activity"
python:mypy_assignment (MINOR) streams/streams.py:103 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "None", base class "FBMarketingStream" defined the type as "str") . Code line: primary_key = None
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:44 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: if pendulum.instance(config.end_date) < pendulum.instance(conf...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:44 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: ...ulum.instance(config.end_date) < pendulum.instance(config.start_date):
python:mypy_no_redef (MINOR) source_facebook_marketing/source.py:57 Check that each name is defined once Name "config" already defined on line 51 . Code line: config: ConnectorConfig = ConnectorConfig.parse_obj(config)
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Campaigns(api=api, start_date=config.start_date, end_date=...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:77 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Videos(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:79 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_misc (MINOR) source_facebook_marketing/spec.py:18 Miscellaneous other checks Enum() expects a string, tuple, list or dict literal as the second argument . Code line: ValidFields = Enum("ValidEnums", AdsInsights.Field.dict)
python:mypy_misc (MINOR) source_facebook_marketing/spec.py:19 Miscellaneous other checks Enum() expects a string, tuple, list or dict literal as the second argument . Code line: ValidBreakdowns = Enum("ValidBreakdowns", AdsInsights.Breakdowns.__dic...
python:mypy_name_defined (MINOR) source_facebook_marketing/spec.py:20 Check that name is defined Enum() expects a string, tuple, list or dict literal as the second argument [misc] ValidActionBreakdowns = Enum("ValidActionBreakdowns", AdsInsights.Acti...
python:mypy_attr_defined (MINOR) streams/init.py:5 Check that attribute exists Module "source_facebook_marketing.streams.streams" does not explicitly export attribute "AdsInsights"; implicit reexport disabled . Code line: from .streams import (
python:mypy_arg_type (MINOR) streams/async_job.py:149 Check argument types in calls Argument "jobs" to "update_in_batch" has incompatible type "List[InsightAsyncJob]"; expected "List[AsyncJob]" . Code line: update_in_batch(api=self._api, jobs=self._jobs)
python:mypy_return_value (MINOR) streams/async_job.py:236 Check that return value is compatible with signature Incompatible return value type (got "List[InsightAsyncJob]", expected "List[AsyncJob]") . Code line: return jobs
python:mypy_unreachable (MINOR) streams/async_job.py:266 Warn about unreachable statements or expressions Statement is unreachable . Code line: end_time = self._finish_time or pendulum.now()
python:mypy_index (MINOR) streams/async_job.py:315 Check indexing operations Value of type "Optional[Any]" is not indexable . Code line: job_status = self._job["async_status"]
python:mypy_index (MINOR) streams/async_job.py:316 Check indexing operations Value of type "Optional[Any]" is not indexable . Code line: percent = self._job["async_percent_completion"]
python:mypy_operator (MINOR) streams/async_job.py:319 Check that operator is valid for operands Unsupported operand types for < ("Duration" and "None") . Code line: if self.elapsed_time > self.job_timeout:
python:mypy_assignment (MINOR) streams/async_job.py:321 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now()
python:mypy_assignment (MINOR) streams/async_job.py:325 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now() # TODO: is not actual ...
python:mypy_assignment (MINOR) streams/async_job.py:328 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "DateTime", variable has type "None") . Code line: self._finish_time = pendulum.now()
python:mypy_attr_defined (MINOR) streams/async_job.py:330 Check that attribute exists "None" has no attribute "in_seconds" . Code line: ...er.info(f"{self}: has status {job_status} after {self.elapsed_time.in_...
python:mypy_var_annotated (MINOR) streams/async_job_manager.py:43 Require variable annotation if type can't be inferred Need type annotation for "_running_jobs" (hint: "_running_jobs: List[] = ...") . Code line: self._running_jobs = []
python:mypy_no_any_return (MINOR) streams/async_job_manager.py:136 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "float" . Code line: return min(throttle.per_account, throttle.per_application)
python:mypy_name_defined (MINOR) streams/base_insight_streams.py:58 Check that name is defined Need type annotation for "breakdowns" (hint: "breakdowns: List[] = ...") [var-annotated] breakdowns = []
python:mypy_var_annotated (MINOR) streams/base_insight_streams.py:79 Require variable annotation if type can't be inferred Need type annotation for "_completed_slices" (hint: "_completed_slices: Set[] = ...") . Code line: self._completed_slices = set()
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:85 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "str" . Code line: return casing.camel_to_snake(name)
python:mypy_override (MINOR) streams/base_insight_streams.py:88 Check that method override is compatible with base class Signature of "primary_key" incompatible with supertype "FBMarketingStream" . Code line: def primary_key(self) -> Optional[Union[str, List[str], List[List[...
python:mypy_index (MINOR) streams/base_insight_streams.py:103 Check indexing operations Value of type "Optional[Mapping[str, Any]]" is not indexable . Code line: job = stream_slice["insight_job"]
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:130 Check that attribute exists Module has no attribute "parse" . Code line: self._cursor_value = pendulum.parse(value[self.cursor_field])....
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:131 Check that attribute exists Module has no attribute "parse" . Code line: self._completed_slices = set(pendulum.parse(v).date() for v in...
python:S5886 (MAJOR) streams/base_insight_streams.py:144 Function return types should be consistent with their type hint Return a value of type "Iterator" instead of "list" or update function "_date_intervals" type hint.
python:mypy_return_value (MINOR) streams/base_insight_streams.py:144 Check that return value is compatible with signature Incompatible return value type (got "List[]", expected "Iterator[Any]") . Code line: return []
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:146 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterator[Any]" . Code line: return date_range.range("days", self.time_increment)
python:mypy_attr_defined (MINOR) streams/base_insight_streams.py:168 Check that attribute exists Module has no attribute "Period"; maybe "period"? . Code line: interval = pendulum.Period(ts_start, ts_end)
python:mypy_name_defined (MINOR) streams/base_insight_streams.py:188 Check that name is defined Incompatible types in assignment (expression has type "Mapping[str, Any]", variable has type "MutableMapping[str, Any]") [assignment] self.state = stream_state
python:S1134 (MAJOR) streams/base_insight_streams.py:216 Track uses of "FIXME" tags Take the required action to fix the issue indicated by this "FIXME" comment.
python:mypy_override (MINOR) streams/base_insight_streams.py:229 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "FBMarketingIncrementalStream" . Code line: def request_params(self, **kwargs) -> MutableMapping[str, Any]:
python:mypy_no_any_return (MINOR) streams/base_insight_streams.py:254 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Mapping[str, Any]" . Code line: return schema
python:mypy_assignment (MINOR) streams/base_streams.py:92 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "Iterable[MutableMapping[str, Any]]", variable has type "Generator[Any, None, None]") . Code line: loaded_records_iter = self.execute_in_batch(loaded_records...
python:mypy_attr_defined (MINOR) streams/base_streams.py:161 Check that attribute exists Module has no attribute "parse" . Code line: max_cursor = max(pendulum.parse(state_value), pendulum.parse(r...
python:mypy_override (MINOR) streams/base_streams.py:170 Check that method override is compatible with base class Signature of "request_params" incompatible with supertype "FBMarketingStream" . Code line: def request_params(self, stream_state: Mapping[str, Any], **kwargs...
python:mypy_attr_defined (MINOR) streams/base_streams.py:179 Check that attribute exists Module has no attribute "parse" . Code line: ...value = self.start_date if not state_value else pendulum.parse(state...
python:mypy_attr_defined (MINOR) streams/base_streams.py:225 Check that attribute exists Module has no attribute "parse" . Code line: self._cursor_value = pendulum.parse(value[self.cursor_field])
python:mypy_attr_defined (MINOR) streams/base_streams.py:238 Check that attribute exists Module has no attribute "parse" . Code line: record_cursor_value = pendulum.parse(latest_record[self.cursor...
python:mypy_arg_type (MINOR) streams/base_streams.py:261 Check argument types in calls Argument "stream_state" to "request_params" of "FBMarketingIncrementalStream" has incompatible type "Optional[Mapping[str, Any]]"; expected "Mapping[str, Any]" . Code line: ...lf.list_objects(params=self.request_params(stream_state=stream_state))
python:mypy_attr_defined (MINOR) streams/base_streams.py:263 Check that attribute exists Module has no attribute "parse" . Code line: if self._cursor_value and pendulum.parse(record[self.curso...
python:mypy_import (MINOR) streams/streams.py:10 Require that imported module can be found or has stubs Library stubs not installed for "requests" (or incompatible with Python 3.7) . Code line: import requests
python:mypy_assignment (MINOR) streams/streams.py:42 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "adcreative"
python:mypy_index (MINOR) streams/streams.py:64 Check indexing operations Unsupported target for indexed assignment ("Mapping[str, Any]") . Code line: record["thumbnail_data_url"] = fetch_thumbnail_data_ur...
python:mypy_arg_type (MINOR) streams/streams.py:64 Check argument types in calls Argument 1 to "fetch_thumbnail_data_url" has incompatible type "Optional[Any]"; expected "str" . Code line: ..."thumbnail_data_url"] = fetch_thumbnail_data_url(record.get("thumbnail...
python:mypy_no_any_return (MINOR) streams/streams.py:68 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_creatives(params=params)
python:mypy_assignment (MINOR) streams/streams.py:74 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "ad"
python:mypy_no_any_return (MINOR) streams/streams.py:77 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ads(params=params)
python:mypy_assignment (MINOR) streams/streams.py:83 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "adset"
python:mypy_no_any_return (MINOR) streams/streams.py:86 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_sets(params=params)
python:mypy_assignment (MINOR) streams/streams.py:92 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "campaign"
python:mypy_no_any_return (MINOR) streams/streams.py:95 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_campaigns(params=params)
python:mypy_assignment (MINOR) streams/streams.py:140 Check that assigned value is compatible with target Incompatible types in assignment (expression has type "str", base class "FBMarketingStream" defined the type as "None") . Code line: entity_prefix = "video"
python:mypy_no_any_return (MINOR) streams/streams.py:143 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_videos(params=params)
python:mypy_no_any_return (MINOR) streams/streams.py:161 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "Iterable[Any]" . Code line: return self._api.account.get_ad_images(params=params, fields=s...
python:mypy_var_annotated (MINOR) streams/streams.py:188 Require variable annotation if type can't be inferred Need type annotation for "breakdowns" (hint: "breakdowns: List[] = ...") . Code line: breakdowns = []
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Images(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:78 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:69 Check that attribute exists "Mapping[str, Any]" has no attribute "fetch_thumbnail_images" . Code line: ... AdCreatives(api=api, fetch_thumbnail_images=config.fetch_thumbnai...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:83 Check that attribute exists "Mapping[str, Any]" has no attribute "custom_insights" . Code line: ... return self._update_insights_streams(insights=config.custom_insight...
python:mypy_no_any_return (MINOR) source_facebook_marketing/source.py:109 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Type[Any]]" . Code line: return streams
python:mypy_no_any_return (MINOR) source_facebook_marketing/source.py:121 Reject returning value with "Any" type if return type is not "Any" Returning Any from function declared to return "List[Type[Any]]" . Code line: return streams + insights_custom_streams
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:63 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: end_date=config.end_date,
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:67 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: AdSets(api=api, start_date=config.start_date, end_date=con...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: Ads(api=api, start_date=config.start_date, end_date=config...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "end_date" . Code line: ...(api=api, start_date=config.start_date, end_date=config.end_date, incl...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:68 Check that attribute exists "Mapping[str, Any]" has no attribute "include_deleted" . Code line: ..._date, end_date=config.end_date, include_deleted=config.include_delete...
python:S1700 (MAJOR) source_facebook_marketing/api.py:158 A field should not duplicate the name of its containing class Rename field "api"
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:46 Check that attribute exists "Mapping[str, Any]" has no attribute "account_id" . Code line: api = API(account_id=config.account_id, access_token=config.ac...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:46 Check that attribute exists "Mapping[str, Any]" has no attribute "access_token" . Code line: ... = API(account_id=config.account_id, access_token=config.access_token)
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:58 Check that attribute exists "Mapping[str, Any]" has no attribute "account_id" . Code line: api = API(account_id=config.account_id, access_token=config.ac...
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:58 Check that attribute exists "Mapping[str, Any]" has no attribute "access_token" . Code line: ... = API(account_id=config.account_id, access_token=config.access_token)
python:mypy_attr_defined (MINOR) source_facebook_marketing/source.py:62 Check that attribute exists "Mapping[str, Any]" has no attribute "start_date" . Code line: start_date=config.start_date,

Coverage (89.4%)

File Coverage File Coverage
source_facebook_marketing/init.py 100.0 source_facebook_marketing/api.py 83.2
source_facebook_marketing/source.py 100.0 source_facebook_marketing/spec.py 100.0
source_facebook_marketing/streams/init.py 100.0 source_facebook_marketing/streams/async_job.py 100.0
source_facebook_marketing/streams/async_job_manager.py 95.9 source_facebook_marketing/streams/base_insight_streams.py 91.2
source_facebook_marketing/streams/base_streams.py 74.4 source_facebook_marketing/streams/common.py 97.4
source_facebook_marketing/streams/streams.py 76.3

Please sign in to comment.