2021-02-05 17:12:51 +00:00
{ lib
2020-04-24 23:36:52 +00:00
, buildPythonPackage
2021-07-04 02:40:35 +00:00
, python-dateutil
2022-02-10 20:34:41 +00:00
, fetchPypi
2021-03-23 19:22:30 +00:00
, mock
, msgpack
2024-04-21 15:54:59 +00:00
, pynose
2021-03-23 19:22:30 +00:00
, pandas
, pytestCheckHook
2020-04-24 23:36:52 +00:00
, pytz
2021-03-23 19:22:30 +00:00
, requests
, requests-mock
2020-04-24 23:36:52 +00:00
, six
} :
buildPythonPackage rec {
pname = " i n f l u x d b " ;
2022-02-10 20:34:41 +00:00
version = " 5 . 3 . 1 " ;
2024-01-02 11:29:13 +00:00
format = " s e t u p t o o l s " ;
2020-04-24 23:36:52 +00:00
2022-02-10 20:34:41 +00:00
src = fetchPypi {
inherit pname version ;
sha256 = " 0 y m j v 3 2 2 m v 6 y 4 2 4 f m p d 7 0 f 8 7 1 5 2 w 5 5 m b w w j 6 i 7 p 3 s j z f 0 i x m x y 2 6 " ;
2020-04-24 23:36:52 +00:00
} ;
2023-08-13 20:18:25 +00:00
postPatch = ''
for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py ; do
substituteInPlace " $ f " \
2024-04-21 15:54:59 +00:00
- - replace-fail " p a n d a s . u t i l . t e s t i n g " " p a n d a s . t e s t i n g "
done
for f in influxdb/tests/influxdb08/client_test.py influxdb/tests/client_test.py ; do
substituteInPlace " $ f " \
- - replace-fail " a s s e r t R a i s e s R e g e x p " " a s s e r t R a i s e s R e g e x "
2023-08-13 20:18:25 +00:00
done
'' ;
2021-03-23 19:22:30 +00:00
propagatedBuildInputs = [
requests
2021-07-04 02:40:35 +00:00
python-dateutil
2021-03-23 19:22:30 +00:00
pytz
six
msgpack
] ;
2023-07-15 17:15:38 +00:00
__darwinAllowLocalNetworking = true ;
2023-02-02 18:25:31 +00:00
nativeCheckInputs = [
2021-03-23 19:22:30 +00:00
pytestCheckHook
requests-mock
mock
2024-04-21 15:54:59 +00:00
pynose
2021-03-23 19:22:30 +00:00
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'
" t e s t _ w r i t e _ p o i n t s _ f r o m _ d a t a f r a m e _ w i t h _ n a n _ j s o n "
" t e s t _ w r i t e _ p o i n t s _ f r o m _ d a t a f r a m e _ w i t h _ t a g s _ a n d _ n a n _ j s o n "
2023-11-16 04:20:00 +00:00
" t e s t _ w r i t e _ p o i n t s _ f r o m _ d a t a f r a m e _ w i t h _ n u m e r i c _ p r e c i s i o n "
2021-12-06 16:07:01 +00:00
# Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that
" t e s t _ q u e r y _ w i t h _ e m p t y _ r e s u l t "
2023-08-13 20:18:25 +00:00
# Pandas API changes cause it to no longer infer datetimes in the expected manner
" t e s t _ m u l t i q u e r y _ i n t o _ d a t a f r a m e "
" t e s t _ m u l t i q u e r y _ i n t o _ d a t a f r a m e _ d r o p n a "
2024-02-29 20:09:43 +00:00
# FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
" t e s t _ w r i t e _ p o i n t s _ f r o m _ d a t a f r a m e _ w i t h _ t a g _ e s c a p e d "
2024-04-21 15:54:59 +00:00
# AssertionError: 2 != 1 : <class 'influxdb.tests.helper_test.TestSeriesHelper.testWarnBulkSizeNoEffect.<locals>.WarnBulkSizeNoEffect'> call should have generated one warning.
" t e s t W a r n B u l k S i z e N o E f f e c t "
2021-03-23 19:22:30 +00:00
] ;
pythonImportsCheck = [ " i n f l u x d b " ] ;
2020-04-24 23:36:52 +00:00
2021-01-15 22:18:51 +00:00
meta = with lib ; {
2020-04-24 23:36:52 +00:00
description = " P y t h o n c l i e n t f o r I n f l u x D B " ;
homepage = " h t t p s : / / g i t h u b . c o m / i n f l u x d b / i n f l u x d b - p y t h o n " ;
license = licenses . mit ;
2021-03-23 19:22:30 +00:00
maintainers = with maintainers ; [ fab ] ;
2020-04-24 23:36:52 +00:00
} ;
}