-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨Source Strava: Migrate Python CDK to Low-code CDK (#31007)
Co-authored-by: Marcos Marx <[email protected]> Co-authored-by: marcosmarxm <[email protected]>
- Loading branch information
1 parent
ac6f44c
commit c92837c
Showing
22 changed files
with
299 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
* | ||
!Dockerfile | ||
!Dockerfile.test | ||
!main.py | ||
!source_strava | ||
!setup.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
1 change: 1 addition & 0 deletions
1
airbyte-integrations/connectors/source-strava/acceptance-test-docker.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
source "$(git rev-parse --show-toplevel)/airbyte-integrations/bases/connector-acceptance-test/acceptance-test-docker.sh" |
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-strava/integration_tests/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# | ||
# Copyright (c) 2021 Airbyte, Inc., all rights reserved. | ||
# Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
airbyte-integrations/connectors/source-strava/integration_tests/expected_records.jsonl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{"stream": "athlete_stats", "data": {"biggest_ride_distance": 37825.1, "biggest_climb_elevation_gain": 102.30000000000001, "recent_ride_totals": {"count": 0, "distance": 0.0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0.0, "achievement_count": 0}, "all_ride_totals": {"count": 46, "distance": 794446, "moving_time": 178718, "elapsed_time": 267074, "elevation_gain": 8366}, "recent_run_totals": {"count": 0, "distance": 0.0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0.0, "achievement_count": 0}, "all_run_totals": {"count": 124, "distance": 841523, "moving_time": 302192, "elapsed_time": 342187, "elevation_gain": 9425}, "recent_swim_totals": {"count": 0, "distance": 0.0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0.0, "achievement_count": 0}, "all_swim_totals": {"count": 0, "distance": 0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0}, "ytd_ride_totals": {"count": 0, "distance": 0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0}, "ytd_run_totals": {"count": 6, "distance": 29359, "moving_time": 13577, "elapsed_time": 14526, "elevation_gain": 379}, "ytd_swim_totals": {"count": 0, "distance": 0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0}}, "emitted_at": 1681112894112} | ||
{"stream": "activities", "data": {"resource_state": 2, "athlete": {"id": 17831421, "resource_state": 1}, "name": "Afternoon Run", "distance": 5180.3, "moving_time": 1558, "elapsed_time": 1570, "total_elevation_gain": 41.7, "type": "Run", "sport_type": "Run", "workout_type": 0, "id": 732659975, "start_date": "2016-10-03T00:23:29Z", "start_date_local": "2016-10-02T17:23:29Z", "timezone": "(GMT-08:00) America/Los_Angeles", "utc_offset": -25200.0, "location_city": null, "location_state": null, "location_country": null, "achievement_count": 3, "kudos_count": 2, "comment_count": 1, "athlete_count": 1, "photo_count": 0, "map": {"id": "a732659975", "summary_polyline": "ijdfFnfhiVu@uCmaAnEwAlByAkDiLnBvI~EjDyB`BhBjw@oEnBvRpOA|ApWqAfJvAeH}AiZiAyKeCQaAgG", "resource_state": 2}, "trainer": false, "commute": false, "manual": false, "private": false, "visibility": "everyone", "flagged": false, "gear_id": null, "start_latlng": [37.874456, -122.271915], "end_latlng": [37.874412, -122.272033], "average_speed": 3.325, "max_speed": 5.3, "has_heartrate": false, "heartrate_opt_out": false, "display_hide_heartrate_option": false, "elev_high": 81.9, "elev_low": 37.5, "upload_id": 807763220, "upload_id_str": "807763220", "external_id": "51fbc33d23a743089b1e732118e37bc5", "from_accepted_tag": false, "pr_count": 1, "total_photo_count": 0, "has_kudoed": false}, "emitted_at": 1684220833770} | ||
{"stream": "activities", "data": {"resource_state": 2, "athlete": {"id": 17831421, "resource_state": 1}, "name": "New shorts, who dis", "distance": 8374.9, "moving_time": 2605, "elapsed_time": 2659, "total_elevation_gain": 75.0, "type": "Run", "sport_type": "Run", "workout_type": 0, "id": 735803811, "start_date": "2016-10-06T01:24:28Z", "start_date_local": "2016-10-05T18:24:28Z", "timezone": "(GMT-08:00) America/Los_Angeles", "utc_offset": -25200.0, "location_city": null, "location_state": null, "location_country": null, "achievement_count": 3, "kudos_count": 1, "comment_count": 1, "athlete_count": 1, "photo_count": 0, "map": {"id": "a735803811", "summary_polyline": "kjdfFlfhiVc@eD}aAvEsAxByAoDaLlBdIhF`IiGpi@sDeAeZxY_DAuKbIqB@{F~B_F~HaI|Hw@fAnKoJ`AeApCJ`S}SbBXjVbGr{@uA`JtA}G_E_o@wD_B", "resource_state": 2}, "trainer": false, "commute": false, "manual": false, "private": false, "visibility": "everyone", "flagged": false, "gear_id": null, "start_latlng": [37.874465, -122.271906], "end_latlng": [37.874449, -122.271743], "average_speed": 3.215, "max_speed": 5.4, "has_heartrate": false, "heartrate_opt_out": false, "display_hide_heartrate_option": false, "elev_high": 84.3, "elev_low": 37.5, "upload_id": 811413504, "upload_id_str": "811413504", "external_id": "f77a35ec330412183402e6fac2b5be20", "from_accepted_tag": false, "pr_count": 0, "total_photo_count": 0, "has_kudoed": false}, "emitted_at": 1684220833771} | ||
{"stream": "activities", "data": {"resource_state": 2, "athlete": {"id": 17831421, "resource_state": 1}, "name": "Afternoon Run", "distance": 5457.4, "moving_time": 1598, "elapsed_time": 1659, "total_elevation_gain": 12.8, "type": "Run", "sport_type": "Run", "workout_type": 0, "id": 744774691, "start_date": "2016-10-15T00:51:50Z", "start_date_local": "2016-10-14T17:51:50Z", "timezone": "(GMT-08:00) America/Los_Angeles", "utc_offset": -25200.0, "location_city": null, "location_state": null, "location_country": null, "achievement_count": 5, "kudos_count": 0, "comment_count": 0, "athlete_count": 1, "photo_count": 0, "map": {"id": "a744774691", "summary_polyline": "{z_oEngunUx@pJfeCV}}@mBudAPy@q@GwFiG_@tDV", "resource_state": 2}, "trainer": false, "commute": false, "manual": false, "private": false, "visibility": "everyone", "flagged": false, "gear_id": null, "start_latlng": [34.083181, -117.914954], "end_latlng": [34.083389, -117.914936], "average_speed": 3.415, "max_speed": 4.7, "has_heartrate": false, "heartrate_opt_out": false, "display_hide_heartrate_option": false, "elev_high": 140.8, "elev_low": 127.8, "upload_id": 821881164, "upload_id_str": "821881164", "external_id": "4f6161a407a088bc4db49f5959e9673a", "from_accepted_tag": false, "pr_count": 2, "total_photo_count": 0, "has_kudoed": false}, "emitted_at": 1684220833771} | ||
{"stream": "athlete_stats", "data": {"biggest_ride_distance": null, "biggest_climb_elevation_gain": null, "recent_ride_totals": {"count": 1, "distance": 0.0, "moving_time": 2300, "elapsed_time": 2300, "elevation_gain": 0.0, "achievement_count": 0}, "all_ride_totals": {"count": 1, "distance": 0, "moving_time": 2300, "elapsed_time": 2300, "elevation_gain": 0}, "recent_run_totals": {"count": 0, "distance": 0.0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0.0, "achievement_count": 0}, "all_run_totals": {"count": 1, "distance": 0, "moving_time": 3600, "elapsed_time": 3600, "elevation_gain": 0}, "recent_swim_totals": {"count": 0, "distance": 0.0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0.0, "achievement_count": 0}, "all_swim_totals": {"count": 0, "distance": 0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0}, "ytd_ride_totals": {"count": 1, "distance": 0, "moving_time": 2300, "elapsed_time": 2300, "elevation_gain": 0}, "ytd_run_totals": {"count": 1, "distance": 0, "moving_time": 3600, "elapsed_time": 3600, "elevation_gain": 0}, "ytd_swim_totals": {"count": 0, "distance": 0, "moving_time": 0, "elapsed_time": 0, "elevation_gain": 0}}, "emitted_at": 1698179192900} | ||
{"stream": "activities", "data": {"resource_state": 2, "athlete": {"id": 95370757, "resource_state": 1}, "name": "My example activity", "distance": 0.0, "moving_time": 3600, "elapsed_time": 3600, "total_elevation_gain": 0, "type": "Run", "sport_type": "Run", "workout_type": null, "id": 10097971825, "start_date": "2023-01-01T06:00:00Z", "start_date_local": "2023-01-01T00:00:00Z", "timezone": "(GMT-06:00) America/Chicago", "utc_offset": -21600.0, "location_city": null, "location_state": null, "location_country": "United States", "achievement_count": 0, "kudos_count": 0, "comment_count": 0, "athlete_count": 1, "photo_count": 0, "map": {"id": "a10097971825", "summary_polyline": "", "resource_state": 2}, "trainer": false, "commute": false, "manual": true, "private": false, "visibility": "everyone", "flagged": false, "gear_id": null, "start_latlng": [], "end_latlng": [], "average_speed": 0.0, "max_speed": 0, "has_heartrate": false, "heartrate_opt_out": false, "display_hide_heartrate_option": false, "upload_id": null, "external_id": null, "from_accepted_tag": false, "pr_count": 0, "total_photo_count": 0, "has_kudoed": false}, "emitted_at": 1698179195177} | ||
{"stream": "activities", "data": {"resource_state": 2, "athlete": {"id": 95370757, "resource_state": 1}, "name": "Ride example", "distance": 0.0, "moving_time": 2300, "elapsed_time": 2300, "total_elevation_gain": 0, "type": "Ride", "sport_type": "Ride", "workout_type": null, "id": 10097974186, "start_date": "2023-10-01T05:00:00Z", "start_date_local": "2023-10-01T00:00:00Z", "timezone": "(GMT-06:00) America/Chicago", "utc_offset": -18000.0, "location_city": null, "location_state": null, "location_country": "United States", "achievement_count": 0, "kudos_count": 0, "comment_count": 0, "athlete_count": 1, "photo_count": 0, "map": {"id": "a10097974186", "summary_polyline": "", "resource_state": 2}, "trainer": false, "commute": false, "manual": true, "private": false, "visibility": "everyone", "flagged": false, "gear_id": null, "start_latlng": [], "end_latlng": [], "average_speed": 0.0, "max_speed": 0, "has_heartrate": false, "heartrate_opt_out": false, "display_hide_heartrate_option": false, "upload_id": null, "external_id": null, "from_accepted_tag": false, "pr_count": 0, "total_photo_count": 0, "has_kudoed": false}, "emitted_at": 1698179195185} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,11 @@ | |
|
||
from setuptools import find_packages, setup | ||
|
||
MAIN_REQUIREMENTS = [ | ||
"airbyte-cdk", | ||
] | ||
MAIN_REQUIREMENTS = ["airbyte-cdk"] | ||
|
||
TEST_REQUIREMENTS = [ | ||
"requests-mock~=1.9.3", | ||
"pytest~=6.1", | ||
"pytest~=6.2", | ||
"pytest-mock~=3.6.1", | ||
] | ||
|
||
|
@@ -22,7 +20,7 @@ | |
author_email="[email protected]", | ||
packages=find_packages(), | ||
install_requires=MAIN_REQUIREMENTS, | ||
package_data={"": ["*.json", "schemas/*.json", "schemas/shared/*.json"]}, | ||
package_data={"": ["*.json", "*.yaml", "schemas/*.json", "schemas/shared/*.json"]}, | ||
extras_require={ | ||
"tests": TEST_REQUIREMENTS, | ||
}, | ||
|
2 changes: 1 addition & 1 deletion
2
airbyte-integrations/connectors/source-strava/source_strava/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.