2024-05-15 15:35:15 +00:00
{
lib ,
buildPythonPackage ,
fetchPypi ,
mock ,
msgpack ,
pandas ,
pynose ,
pytestCheckHook ,
python-dateutil ,
pytz ,
requests ,
requests-mock ,
setuptools ,
six ,
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " i n f l u x d b " ;
2024-05-15 15:35:15 +00:00
version = " 5 . 3 . 2 " ;
pyproject = true ;
2020-04-24 23:36:52 +00:00
2022-02-10 20:34:41 +00:00
src = fetchPypi {
inherit pname version ;
2024-05-15 15:35:15 +00:00
hash = " s h a 2 5 6 - W M Z H 9 g Q 3 E t 2 G 6 a 7 h L r T M + 7 t U F U Z 7 y Z E K S K q M d M E Q i X A = " ;
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
'' ;
2024-05-15 15:35:15 +00:00
build-system = [ setuptools ] ;
dependencies = [
msgpack
2021-07-04 02:40:35 +00:00
python-dateutil
2021-03-23 19:22:30 +00:00
pytz
2024-05-15 15:35:15 +00:00
requests
2021-03-23 19:22:30 +00:00
six
] ;
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
mock
pandas
2024-05-15 15:35:15 +00:00
pynose
pytestCheckHook
requests-mock
2021-03-23 19:22:30 +00:00
] ;
disabledTests = [
2024-05-15 15:35:15 +00:00
" s o c k e t "
2021-03-23 19:22:30 +00:00
# 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 " ;
2024-05-15 15:35:15 +00:00
changelog = " h t t p s : / / g i t h u b . c o m / i n f l u x d a t a / i n f l u x d b - p y t h o n / b l o b / v ${ version } / C H A N G E L O G . m d " ;
2020-04-24 23:36:52 +00:00
license = licenses . mit ;
2021-03-23 19:22:30 +00:00
maintainers = with maintainers ; [ fab ] ;
2020-04-24 23:36:52 +00:00
} ;
}