-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify & complete configuration + Docker release (#15)
- Simplify configuration - Add Singer usage data collection - Automate Docker Hub release GH Issues: - #12
- Loading branch information
Showing
13 changed files
with
222 additions
and
106 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
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 @@ | ||
{ | ||
"tests/target_datadotworld/test_target.py::TestTarget::()": true | ||
} |
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,69 @@ | ||
[ | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream[5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream[10]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream[15]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked[5-3]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked[5-5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked[10-3]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked[10-5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked[15-3]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked[15-5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked_error[5-3]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked_error[5-5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked_error[10-3]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked_error[10-5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked_error[15-3]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_chunked_error[15-5]", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_append_stream_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_connection_check", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_connection_check_401", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_connection_check_offline", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_get_current_version", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_get_current_version_missing_column", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_get_current_version_missing_table", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_get_current_version_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_set_stream_schema", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_set_stream_schema_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_sync", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_sync_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_truncate_stream_records", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_truncate_stream_records_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_create_dataset", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_create_dataset_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_get_dataset", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test_get_dataset_error", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test__retry_if_throttled", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test__retry_if_throttled_delayed", | ||
"tests/target_datadotworld/test_api_client.py::TestApiClient::()::test__retry_if_throttled_error", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception[400-ApiError]", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception[401-UnauthorizedError]", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception[403-ForbiddenError]", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception[404-NotFoundError]", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception[422-ApiError]", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception[429-TooManyRequestsError]", | ||
"tests/target_datadotworld/test_exceptions.py::test_convert_requests_exception_offline", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_minimal", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_complete", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_incomplete", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_invalid[invalid_config0]", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_invalid[invalid_config1]", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_invalid[invalid_config2]", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_invalid[invalid_config3]", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_invalid[invalid_config4]", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_config_invalid[invalid_config5]", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_lines", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_lines_new_dataset", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_lines_unparseable", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_lines_missing_schema", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_lines_multiple_streams", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_no_state", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_multi_state", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_same_version", | ||
"tests/target_datadotworld/test_target.py::TestTarget::()::test_process_new_version", | ||
"tests/target_datadotworld/test_utils.py::test_to_jsonline", | ||
"tests/target_datadotworld/test_utils.py::test_to_chunks[5]", | ||
"tests/target_datadotworld/test_utils.py::test_to_chunks[10]", | ||
"tests/target_datadotworld/test_utils.py::test_to_chunks[15]", | ||
"tests/target_datadotworld/test_utils.py::test_to_streamid[aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]", | ||
"tests/target_datadotworld/test_utils.py::test_to_streamid[a1!_b@2_c3-a-1-b-2-c-3]" | ||
] |
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,7 @@ | ||
FROM python:latest | ||
|
||
ADD . /code | ||
WORKDIR /code | ||
|
||
RUN pip install . | ||
CMD ["target-datadotworld"] |
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
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,38 @@ | ||
# target-datadotworld | ||
# Copyright 2017 data.world, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the | ||
# License. | ||
# | ||
# You may obtain a copy of the License at | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. See the License for the specific language governing | ||
# permissions and limitations under the License. | ||
# | ||
# This product includes software developed at | ||
# data.world, Inc.(http://data.world/). | ||
import requests | ||
import target_datadotworld | ||
from target_datadotworld import logger | ||
from requests import HTTPError | ||
|
||
|
||
def send_usage_stats(): | ||
try: | ||
version = target_datadotworld.__version__ | ||
resp = requests.get('http://collector.singer.io/i', | ||
params={ | ||
'e': 'se', | ||
'aid': 'singer', | ||
'se_ca': 'target-datadotworld', | ||
'se_ac': 'open', | ||
'se_la': version, | ||
}, timeout=0.5) | ||
resp.raise_for_status() | ||
except HTTPError: | ||
logger.debug('Collection request failed') |
Oops, something went wrong.