Skip to content

Commit

Permalink
chore: auto-fix lint and format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
octavia-squidington-iii committed Oct 24, 2024
1 parent 4bdb5a0 commit bf6054d
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@ connector_image: airbyte/source-braze:dev
acceptance_tests:
spec:
tests:
- spec_path: "manifest.yaml"
- spec_path: "manifest.yaml"
connection:
tests:
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
- config_path: "secrets/config.json"
status: "succeed"
- config_path: "integration_tests/invalid_config.json"
status: "failed"
discovery:
tests:
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.0"
- config_path: "secrets/config.json"
backward_compatibility_tests_config:
disable_for_version: "0.1.0"
basic_read:
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams:
- name: kpi_daily_new_users
bypass_reason: "no data"
- name: events_analytics
bypass_reason: "no data"
- name: kpi_daily_app_uninstalls
bypass_reason: "no data"
- name: kpi_daily_active_users
bypass_reason: "no data"
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams:
- name: kpi_daily_new_users
bypass_reason: "no data"
- name: events_analytics
bypass_reason: "no data"
- name: kpi_daily_app_uninstalls
bypass_reason: "no data"
- name: kpi_daily_active_users
bypass_reason: "no data"
incremental:
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog_incremental.json"
future_state:
future_state_path: "integration_tests/abnormal_state.json"
full_refresh:
tests:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
17 changes: 5 additions & 12 deletions airbyte-integrations/connectors/source-braze/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,18 @@
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#

from dataclasses import dataclass

import requests
from airbyte_cdk.sources.declarative.extractors.dpath_extractor import DpathExtractor
from airbyte_cdk.sources.declarative.types import Record

import datetime
import operator
from dataclasses import dataclass
from typing import Any, Mapping, Optional

import dpath
import requests
from airbyte_cdk.sources.declarative.extractors.dpath_extractor import DpathExtractor
from airbyte_cdk.sources.declarative.incremental import DatetimeBasedCursor
from airbyte_cdk.sources.declarative.interpolation import InterpolatedString
from airbyte_cdk.sources.declarative.requesters import RequestOption
from airbyte_cdk.sources.declarative.requesters.request_option import RequestOptionType
from airbyte_cdk.sources.declarative.types import StreamSlice

from dataclasses import dataclass
from typing import Optional

import dpath
from airbyte_cdk.sources.declarative.transformations import AddFields
from airbyte_cdk.sources.declarative.types import Config, Record, StreamSlice, StreamState

Expand All @@ -46,6 +37,7 @@ def transform(
dpath.util.new(_record, parsed_field.path, value)
return _record


@dataclass
class DatetimeIncrementalSyncComponent(DatetimeBasedCursor):
"""
Expand Down Expand Up @@ -83,6 +75,7 @@ def _partition_daterange(self, start, end, step: datetime.timedelta):
_slice[self.stream_slice_field_step.eval(self.config)] = (end_time + datetime.timedelta(days=int(bool(i))) - start_time).days
return date_range


@dataclass
class EventsRecordExtractor(DpathExtractor):
def extract_records(self, response: requests.Response) -> list[Record]:
Expand Down
31 changes: 15 additions & 16 deletions airbyte-integrations/connectors/source-braze/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ data:
ql: 200
sl: 100
connectorBuildOptions:
baseImage:
docker.io/airbyte/source-declarative-manifest:5.16.0@sha256:6800f806944ee4fccf24ae01f6b8fbefb12d952c3b3da338f51f732b55de51f2
baseImage: docker.io/airbyte/source-declarative-manifest:5.16.0@sha256:6800f806944ee4fccf24ae01f6b8fbefb12d952c3b3da338f51f732b55de51f2
connectorSubtype: api
connectorType: source
definitionId: 68b9c98e-0747-4c84-b05b-d30b47686725
Expand All @@ -27,19 +26,19 @@ data:
releaseStage: alpha
supportLevel: community
tags:
- language:manifest-only
- cdk:low-code
- language:manifest-only
- cdk:low-code
connectorTestSuitesOptions:
- suite: liveTests
testConnections:
- name: braze_config_dev_null
id: 5df06901-b346-4401-81af-62b20deda255
- suite: unitTests
- suite: acceptanceTests
testSecrets:
- name: SECRET_BRAZE_INTEGRATION_TESTS_CREDS
fileName: config.json
secretStore:
type: GSM
alias: airbyte-connector-testing-secret-store
- suite: liveTests
testConnections:
- name: braze_config_dev_null
id: 5df06901-b346-4401-81af-62b20deda255
- suite: unitTests
- suite: acceptanceTests
testSecrets:
- name: SECRET_BRAZE_INTEGRATION_TESTS_CREDS
fileName: config.json
secretStore:
type: GSM
alias: airbyte-connector-testing-secret-store
metadataSpecVersion: "1.0"

0 comments on commit bf6054d

Please sign in to comment.