ingestr 0.13.76__py3-none-any.whl → 0.13.77__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ingestr might be problematic. Click here for more details.
- ingestr/src/buildinfo.py +1 -1
- ingestr/src/github/__init__.py +6 -6
- ingestr/src/github/helpers.py +0 -1
- ingestr/src/sources.py +1 -1
- {ingestr-0.13.76.dist-info → ingestr-0.13.77.dist-info}/METADATA +1 -1
- {ingestr-0.13.76.dist-info → ingestr-0.13.77.dist-info}/RECORD +9 -9
- {ingestr-0.13.76.dist-info → ingestr-0.13.77.dist-info}/WHEEL +0 -0
- {ingestr-0.13.76.dist-info → ingestr-0.13.77.dist-info}/entry_points.txt +0 -0
- {ingestr-0.13.76.dist-info → ingestr-0.13.77.dist-info}/licenses/LICENSE.md +0 -0
ingestr/src/buildinfo.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
version = "v0.13.
|
|
1
|
+
version = "v0.13.77"
|
ingestr/src/github/__init__.py
CHANGED
|
@@ -72,7 +72,7 @@ def github_repo_events(
|
|
|
72
72
|
name: str,
|
|
73
73
|
access_token: str,
|
|
74
74
|
start_date: pendulum.DateTime,
|
|
75
|
-
end_date: pendulum.DateTime,
|
|
75
|
+
end_date: Optional[pendulum.DateTime] = None,
|
|
76
76
|
) -> DltResource:
|
|
77
77
|
"""Gets events for repository `name` with owner `owner` incrementally.
|
|
78
78
|
|
|
@@ -91,12 +91,12 @@ def github_repo_events(
|
|
|
91
91
|
"""
|
|
92
92
|
|
|
93
93
|
# use naming function in table name to generate separate tables for each event
|
|
94
|
-
@dlt.resource(primary_key="id", table_name=lambda i: i["type"])
|
|
94
|
+
@dlt.resource(primary_key= "id", table_name=lambda i: i["type"], write_disposition="merge")
|
|
95
95
|
def repo_events(
|
|
96
96
|
last_created_at: dlt.sources.incremental[str] = dlt.sources.incremental(
|
|
97
97
|
"created_at",
|
|
98
98
|
initial_value=start_date.isoformat(),
|
|
99
|
-
end_value=end_date.isoformat(),
|
|
99
|
+
end_value=end_date.isoformat() if end_date else None,
|
|
100
100
|
last_value_func=max,
|
|
101
101
|
range_end="closed",
|
|
102
102
|
range_start="closed",
|
|
@@ -105,7 +105,7 @@ def github_repo_events(
|
|
|
105
105
|
repos_path = (
|
|
106
106
|
f"/repos/{urllib.parse.quote(owner)}/{urllib.parse.quote(name)}/events"
|
|
107
107
|
)
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
# Get the date range from the incremental state
|
|
110
110
|
start_filter = pendulum.parse(
|
|
111
111
|
last_created_at.last_value or last_created_at.initial_value
|
|
@@ -113,9 +113,9 @@ def github_repo_events(
|
|
|
113
113
|
end_filter = (
|
|
114
114
|
pendulum.parse(last_created_at.end_value)
|
|
115
115
|
if last_created_at.end_value
|
|
116
|
-
else
|
|
116
|
+
else pendulum.now()
|
|
117
117
|
)
|
|
118
|
-
|
|
118
|
+
|
|
119
119
|
for page in get_rest_pages(access_token, repos_path + "?per_page=100"):
|
|
120
120
|
# Filter events by date range
|
|
121
121
|
filtered_events = []
|
ingestr/src/github/helpers.py
CHANGED
ingestr/src/sources.py
CHANGED
|
@@ -1817,7 +1817,7 @@ class GitHubSource:
|
|
|
1817
1817
|
start_date = kwargs.get("interval_start") or pendulum.now().subtract(
|
|
1818
1818
|
days=30
|
|
1819
1819
|
)
|
|
1820
|
-
end_date = kwargs.get("interval_end") or
|
|
1820
|
+
end_date = kwargs.get("interval_end") or None
|
|
1821
1821
|
|
|
1822
1822
|
if isinstance(start_date, str):
|
|
1823
1823
|
start_date = pendulum.parse(start_date)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ingestr
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.77
|
|
4
4
|
Summary: ingestr is a command-line application that ingests data from various sources and stores them in any database.
|
|
5
5
|
Project-URL: Homepage, https://github.com/bruin-data/ingestr
|
|
6
6
|
Project-URL: Issues, https://github.com/bruin-data/ingestr/issues
|
|
@@ -2,7 +2,7 @@ ingestr/conftest.py,sha256=OE2yxeTCosS9CUFVuqNypm-2ftYvVBeeq7egm3878cI,1981
|
|
|
2
2
|
ingestr/main.py,sha256=QsNVrz5_NgRUkvfExnd-2E02TGmWivPuop5hYinVAjM,26513
|
|
3
3
|
ingestr/src/.gitignore,sha256=8cX1AZTSI0TcdZFGTmS_oyBjpfCzhOEt0DdAo2dFIY8,203
|
|
4
4
|
ingestr/src/blob.py,sha256=UUWMjHUuoR9xP1XZQ6UANQmnMVyDx3d0X4-2FQC271I,2138
|
|
5
|
-
ingestr/src/buildinfo.py,sha256=
|
|
5
|
+
ingestr/src/buildinfo.py,sha256=m-UnHXqIEncSB59iRwe3ErfexmtYKEfrkxW2stcGqlQ,21
|
|
6
6
|
ingestr/src/destinations.py,sha256=ivTPio0zzqLRx22i597pxZHMNClz-XvYSyCaCPuGd8g,22248
|
|
7
7
|
ingestr/src/errors.py,sha256=Ufs4_DfE77_E3vnA1fOQdi6cmuLVNm7_SbFLkL1XPGk,686
|
|
8
8
|
ingestr/src/factory.py,sha256=q_rSi4gYMfxnGvzhytPRAgC08N40nqDISvXwl7i-E_M,6655
|
|
@@ -11,7 +11,7 @@ ingestr/src/http_client.py,sha256=bxqsk6nJNXCo-79gW04B53DQO-yr25vaSsqP0AKtjx4,73
|
|
|
11
11
|
ingestr/src/loader.py,sha256=9NaWAyfkXdqAZSS-N72Iwo36Lbx4PyqIfaaH1dNdkFs,1712
|
|
12
12
|
ingestr/src/partition.py,sha256=BrIP6wFJvyR7Nus_3ElnfxknUXeCipK_E_bB8kZowfc,969
|
|
13
13
|
ingestr/src/resource.py,sha256=ZqmZxFQVGlF8rFPhBiUB08HES0yoTj8sZ--jKfaaVps,1164
|
|
14
|
-
ingestr/src/sources.py,sha256=
|
|
14
|
+
ingestr/src/sources.py,sha256=JQ9TOGhBG9xM0jtKnz0cqwBpqxLxeU-Y-_NxWpMzVeU,107634
|
|
15
15
|
ingestr/src/table_definition.py,sha256=REbAbqdlmUMUuRh8nEQRreWjPVOQ5ZcfqGkScKdCrmk,390
|
|
16
16
|
ingestr/src/time.py,sha256=H_Fk2J4ShXyUM-EMY7MqCLZQhlnZMZvO952bmZPc4yE,254
|
|
17
17
|
ingestr/src/version.py,sha256=J_2xgZ0mKlvuHcjdKCx2nlioneLH0I47JiU_Slr_Nwc,189
|
|
@@ -54,8 +54,8 @@ ingestr/src/frankfurter/helpers.py,sha256=SyrkRTDqvKdQxRHTV5kcSeVG3FEnaK5zxHyNyq
|
|
|
54
54
|
ingestr/src/freshdesk/__init__.py,sha256=uFQW_cJyymxtHQiYb_xjzZAklc487L0n9GkgHgC7yAI,2618
|
|
55
55
|
ingestr/src/freshdesk/freshdesk_client.py,sha256=3z5Yc008ADzRcJWtNc00PwjkLzG-RMI8jVIOOyYA-Rw,4088
|
|
56
56
|
ingestr/src/freshdesk/settings.py,sha256=0Wr_OMnUZcTlry7BmALssLxD2yh686JW4moLNv12Jnw,409
|
|
57
|
-
ingestr/src/github/__init__.py,sha256=
|
|
58
|
-
ingestr/src/github/helpers.py,sha256=
|
|
57
|
+
ingestr/src/github/__init__.py,sha256=R71y33KqzxDTvCLSGj2H2EztfGqsWGR9ZgcaurC1-A4,7220
|
|
58
|
+
ingestr/src/github/helpers.py,sha256=hge8orylwiScRcMftlv4oSZ6ORvVANwHCPAGkg95FtI,6758
|
|
59
59
|
ingestr/src/github/queries.py,sha256=W34C02jUEdjFmOE7f7u9xvYyBNDMfVZAu0JIRZI2mkU,2302
|
|
60
60
|
ingestr/src/github/settings.py,sha256=N5ahWrDIQ_4IWV9i-hTXxyYduqY9Ym2BTwqsWxcDdJ8,258
|
|
61
61
|
ingestr/src/google_ads/__init__.py,sha256=bH0TtnRWcOUESezpvoA7VEUHAq_0ITGQeX4GGVBfl1I,3725
|
|
@@ -151,8 +151,8 @@ ingestr/testdata/merge_expected.csv,sha256=DReHqWGnQMsf2PBv_Q2pfjsgvikYFnf1zYcQZ
|
|
|
151
151
|
ingestr/testdata/merge_part1.csv,sha256=Pw8Z9IDKcNU0qQHx1z6BUf4rF_-SxKGFOvymCt4OY9I,185
|
|
152
152
|
ingestr/testdata/merge_part2.csv,sha256=T_GiWxA81SN63_tMOIuemcvboEFeAmbKc7xRXvL9esw,287
|
|
153
153
|
ingestr/tests/unit/test_smartsheets.py,sha256=eiC2CCO4iNJcuN36ONvqmEDryCA1bA1REpayHpu42lk,5058
|
|
154
|
-
ingestr-0.13.
|
|
155
|
-
ingestr-0.13.
|
|
156
|
-
ingestr-0.13.
|
|
157
|
-
ingestr-0.13.
|
|
158
|
-
ingestr-0.13.
|
|
154
|
+
ingestr-0.13.77.dist-info/METADATA,sha256=b-YQpLectr54strKX2Kdc6P42yALoOhxLeglY3AitgY,15093
|
|
155
|
+
ingestr-0.13.77.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
156
|
+
ingestr-0.13.77.dist-info/entry_points.txt,sha256=oPJy0KBnPWYjDtP1k8qwAihcTLHSZokSQvRAw_wtfJM,46
|
|
157
|
+
ingestr-0.13.77.dist-info/licenses/LICENSE.md,sha256=cW8wIhn8HFE-KLStDF9jHQ1O_ARWP3kTpk_-eOccL24,1075
|
|
158
|
+
ingestr-0.13.77.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|