587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
84 lines
2.5 KiB
Nix
84 lines
2.5 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, python-dateutil
|
|
, fetchPypi
|
|
, mock
|
|
, msgpack
|
|
, pynose
|
|
, pandas
|
|
, pytestCheckHook
|
|
, pytz
|
|
, requests
|
|
, requests-mock
|
|
, six
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "influxdb";
|
|
version = "5.3.1";
|
|
format = "setuptools";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "0ymjv322mv6y424fmpd70f87152w55mbwwj6i7p3sjzf0ixmxy26";
|
|
};
|
|
|
|
postPatch = ''
|
|
for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py; do
|
|
substituteInPlace "$f" \
|
|
--replace-fail "pandas.util.testing" "pandas.testing"
|
|
done
|
|
|
|
for f in influxdb/tests/influxdb08/client_test.py influxdb/tests/client_test.py; do
|
|
substituteInPlace "$f" \
|
|
--replace-fail "assertRaisesRegexp" "assertRaisesRegex"
|
|
done
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
requests
|
|
python-dateutil
|
|
pytz
|
|
six
|
|
msgpack
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
requests-mock
|
|
mock
|
|
pynose
|
|
pandas
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests cause FutureWarning due to use of 'record' instead of 'records' in pandas.
|
|
# https://github.com/influxdata/influxdb-python/pull/845
|
|
# Also type mismatches in assertEqual on DataFrame:
|
|
# b'foo[30 chars]_one=1.0,column_two=1.0 0\nfoo,tag_one=red,tag[47 chars]00\n' !=
|
|
# b'foo[30 chars]_one="1",column_two=1i 0\nfoo,tag_one=red,tag_[46 chars]00\n'
|
|
"test_write_points_from_dataframe_with_nan_json"
|
|
"test_write_points_from_dataframe_with_tags_and_nan_json"
|
|
"test_write_points_from_dataframe_with_numeric_precision"
|
|
# Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that
|
|
"test_query_with_empty_result"
|
|
# Pandas API changes cause it to no longer infer datetimes in the expected manner
|
|
"test_multiquery_into_dataframe"
|
|
"test_multiquery_into_dataframe_dropna"
|
|
# FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
|
|
"test_write_points_from_dataframe_with_tag_escaped"
|
|
# AssertionError: 2 != 1 : <class 'influxdb.tests.helper_test.TestSeriesHelper.testWarnBulkSizeNoEffect.<locals>.WarnBulkSizeNoEffect'> call should have generated one warning.
|
|
"testWarnBulkSizeNoEffect"
|
|
];
|
|
|
|
pythonImportsCheck = [ "influxdb" ];
|
|
|
|
meta = with lib; {
|
|
description = "Python client for InfluxDB";
|
|
homepage = "https://github.com/influxdb/influxdb-python";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|