Skip to content

Commit

Permalink
More type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 30, 2024
1 parent 209ab6f commit 2048cf5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 54 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ addopts = '--ignore=singer_sdk/helpers/_simpleeval.py -m "not external"'
filterwarnings = [
"error",
"ignore:Could not configure external gitlab tests:UserWarning",
"ignore:No records were available to test:UserWarning:singer_sdk.testing.templates",
"ignore:No records were available to test:UserWarning",
# https://github.com/meltano/sdk/issues/1354
"ignore:The function singer_sdk.testing.get_standard_tap_tests is deprecated:DeprecationWarning",
# https://docs.python.org/3.12/whatsnew/3.12.html#deprecated
Expand Down
7 changes: 0 additions & 7 deletions samples/sample_tap_gitlab/gitlab_rest_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ class ProjectsStream(ProjectBasedStream):
is_sorted = True
schema_filepath = SCHEMAS_DIR / "projects.json"

def get_url_params(
self, context: dict | None, next_page_token: str | None
) -> dict[str, t.Any]:
params = super().get_url_params(context, next_page_token)
params["statistics"] = True
return params


class ReleasesStream(ProjectBasedStream):
"""Gitlab Releases stream."""
Expand Down
43 changes: 32 additions & 11 deletions samples/sample_tap_gitlab/schemas/issues.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"null",
"string"
],
"format": "date-time"
"format": "date"
},
"iid": {
"type": "integer"
Expand Down Expand Up @@ -173,11 +173,37 @@
}
}
},
"closed_by_id": {
"closed_by": {
"type": [
"null",
"integer"
]
"object"
],
"properties": {
"state": {
"type": "string"
},
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"web_url": {
"type": [
"null",
"string"
]
},
"avatar_url": {
"type": [
"null",
"string"
]
},
"username": {
"type": "string"
}
}
},
"title": {
"type": [
Expand Down Expand Up @@ -236,12 +262,6 @@
}
]
},
"subscribed": {
"type": [
"null",
"boolean"
]
},
"upvotes": {
"type": [
"null",
Expand Down Expand Up @@ -270,7 +290,8 @@
"type": [
"null",
"string"
]
],
"format": "date"
},
"weight": {
"type": [
Expand Down
35 changes: 0 additions & 35 deletions samples/sample_tap_gitlab/schemas/projects.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,6 @@
"open_issues_count": {
"type": ["null", "integer"]
},
"owner": {
"type": ["null", "object"],
"properties": {
"id": {
"type": ["null", "integer"]
},
"name": {
"type": ["null", "string"]
},
"created_at": {
"type": ["null", "string"],
"format": "date-time"
}
}
},
"path": {
"type": ["null", "string"]
},
Expand Down Expand Up @@ -176,26 +161,6 @@
"star_count": {
"type": ["null", "integer"]
},
"statistics": {
"type": ["object", "null"],
"properties": {
"commit_count": {
"type": ["null", "integer"]
},
"storage_size": {
"type": ["null", "integer"]
},
"repository_size": {
"type": ["null", "integer"]
},
"lfs_objects_size": {
"type": ["null", "integer"]
},
"job_artifacts_size": {
"type": ["null", "integer"]
}
}
},
"tag_list": {
"type": ["array", "null"],
"items": {
Expand Down

0 comments on commit 2048cf5

Please sign in to comment.