Skip to content

Commit c218556

Browse files
authored
chore: add configuration for Dependabot (influxdata#465)
1 parent 161e202 commit c218556

File tree

9 files changed

+25
-16
lines changed

9 files changed

+25
-16
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
open-pull-requests-limit: 10
8+
ignore:
9+
- dependency-name: "docutils" # pinned version for readthedocs.org - https://github.com/influxdata/influxdb-client-python/pull/361

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
meta = {}
2525
with open(Path(__file__).parent.parent / 'influxdb_client' / 'version.py') as f:
26-
exec('\n'.join(l for l in f if l.startswith('CLIENT_VERSION')), meta)
26+
exec('\n'.join(l for l in f if l.startswith('VERSION')), meta)
2727

2828

2929
def setup(app):
@@ -37,9 +37,9 @@ def setup(app):
3737
autoclass_content = 'both'
3838

3939
# The short X.Y version
40-
version = meta['CLIENT_VERSION']
40+
version = meta['VERSION']
4141
# The full version, including alpha/beta/rc tags
42-
release = meta['CLIENT_VERSION']
42+
release = meta['VERSION']
4343

4444
# -- General configuration ---------------------------------------------------
4545

influxdb_client/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,6 @@
383383
from influxdb_client.client.logging_handler import InfluxLoggingHandler
384384
from influxdb_client.client.write.point import Point
385385

386-
from influxdb_client.version import CLIENT_VERSION
386+
from influxdb_client.version import VERSION
387387

388-
__version__ = CLIENT_VERSION
388+
__version__ = VERSION

influxdb_client/_async/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7676
self.default_headers[header_name] = header_value
7777
self.cookie = cookie
7878
# Set default User-Agent.
79-
from influxdb_client import CLIENT_VERSION
80-
self.user_agent = f'influxdb-client-python/{CLIENT_VERSION}'
79+
from influxdb_client import VERSION
80+
self.user_agent = f'influxdb-client-python/{VERSION}'
8181

8282
async def close(self):
8383
"""Dispose api client."""

influxdb_client/_sync/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7676
self.default_headers[header_name] = header_value
7777
self.cookie = cookie
7878
# Set default User-Agent.
79-
from influxdb_client import CLIENT_VERSION
80-
self.user_agent = f'influxdb-client-python/{CLIENT_VERSION}'
79+
from influxdb_client import VERSION
80+
self.user_agent = f'influxdb-client-python/{VERSION}'
8181

8282
def __del__(self):
8383
"""Dispose pools."""

influxdb_client/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,13 @@ def to_debug_report(self):
249249
250250
:return: The report for debugging.
251251
"""
252-
from influxdb_client import CLIENT_VERSION
252+
from influxdb_client import VERSION
253253
return "Python SDK Debug Report:\n"\
254254
"OS: {env}\n"\
255255
"Python Version: {pyversion}\n"\
256256
"Version of the API: 2.0.0\n"\
257257
"SDK Package Version: {client_version}".\
258-
format(env=sys.platform, pyversion=sys.version, client_version=CLIENT_VERSION)
258+
format(env=sys.platform, pyversion=sys.version, client_version=VERSION)
259259

260260
def update_request_header_params(self, path: str, params: dict):
261261
"""Update header params based on custom settings.

influxdb_client/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version of the Client that is used in User-Agent header."""
22

3-
CLIENT_VERSION = '1.31.0dev0'
3+
VERSION = '1.31.0dev0'

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949

5050
meta = {}
5151
with open(Path(__file__).parent / 'influxdb_client' / 'version.py') as f:
52-
exec('\n'.join(l for l in f if l.startswith('CLIENT_VERSION')), meta)
52+
exec('\n'.join(l for l in f if l.startswith('VERSION')), meta)
5353

5454
setup(
5555
name=NAME,
56-
version=meta['CLIENT_VERSION'],
56+
version=meta['VERSION'],
5757
description="InfluxDB 2.0 Python client library",
5858
long_description=readme,
5959
url="https://github.com/influxdata/influxdb-client-python",

tests/test_WriteApiBatching.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from rx import operators as ops
1414

1515
import influxdb_client
16-
from influxdb_client import WritePrecision, InfluxDBClient, CLIENT_VERSION
16+
from influxdb_client import WritePrecision, InfluxDBClient, VERSION
1717
from influxdb_client.client.exceptions import InfluxDBError
1818
from influxdb_client.client.write.point import Point
1919
from influxdb_client.client.write_api import WriteOptions, WriteApi, PointSettings
@@ -463,7 +463,7 @@ def test_user_agent_header(self):
463463

464464
requests = httpretty.httpretty.latest_requests
465465
self.assertEqual(1, len(requests))
466-
self.assertEqual(f'influxdb-client-python/{CLIENT_VERSION}', requests[0].headers['User-Agent'])
466+
self.assertEqual(f'influxdb-client-python/{VERSION}', requests[0].headers['User-Agent'])
467467

468468
def test_to_low_flush_interval(self):
469469

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy