Skip to content

chore: add configuration for Dependabot #465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 10
ignore:
- dependency-name: "docutils" # pinned version for readthedocs.org - https://github.com/influxdata/influxdb-client-python/pull/361
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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


def setup(app):
Expand All @@ -37,9 +37,9 @@ def setup(app):
autoclass_content = 'both'

# The short X.Y version
version = meta['CLIENT_VERSION']
version = meta['VERSION']
# The full version, including alpha/beta/rc tags
release = meta['CLIENT_VERSION']
release = meta['VERSION']

# -- General configuration ---------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions influxdb_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,6 @@
from influxdb_client.client.logging_handler import InfluxLoggingHandler
from influxdb_client.client.write.point import Point

from influxdb_client.version import CLIENT_VERSION
from influxdb_client.version import VERSION

__version__ = CLIENT_VERSION
__version__ = VERSION
4 changes: 2 additions & 2 deletions influxdb_client/_async/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
from influxdb_client import CLIENT_VERSION
self.user_agent = f'influxdb-client-python/{CLIENT_VERSION}'
from influxdb_client import VERSION
self.user_agent = f'influxdb-client-python/{VERSION}'

async def close(self):
"""Dispose api client."""
Expand Down
4 changes: 2 additions & 2 deletions influxdb_client/_sync/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
from influxdb_client import CLIENT_VERSION
self.user_agent = f'influxdb-client-python/{CLIENT_VERSION}'
from influxdb_client import VERSION
self.user_agent = f'influxdb-client-python/{VERSION}'

def __del__(self):
"""Dispose pools."""
Expand Down
4 changes: 2 additions & 2 deletions influxdb_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ def to_debug_report(self):

:return: The report for debugging.
"""
from influxdb_client import CLIENT_VERSION
from influxdb_client import VERSION
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 2.0.0\n"\
"SDK Package Version: {client_version}".\
format(env=sys.platform, pyversion=sys.version, client_version=CLIENT_VERSION)
format(env=sys.platform, pyversion=sys.version, client_version=VERSION)

def update_request_header_params(self, path: str, params: dict):
"""Update header params based on custom settings.
Expand Down
2 changes: 1 addition & 1 deletion influxdb_client/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of the Client that is used in User-Agent header."""

CLIENT_VERSION = '1.31.0dev0'
VERSION = '1.31.0dev0'
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@

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

setup(
name=NAME,
version=meta['CLIENT_VERSION'],
version=meta['VERSION'],
description="InfluxDB 2.0 Python client library",
long_description=readme,
url="https://github.com/influxdata/influxdb-client-python",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_WriteApiBatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from rx import operators as ops

import influxdb_client
from influxdb_client import WritePrecision, InfluxDBClient, CLIENT_VERSION
from influxdb_client import WritePrecision, InfluxDBClient, VERSION
from influxdb_client.client.exceptions import InfluxDBError
from influxdb_client.client.write.point import Point
from influxdb_client.client.write_api import WriteOptions, WriteApi, PointSettings
Expand Down Expand Up @@ -463,7 +463,7 @@ def test_user_agent_header(self):

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

def test_to_low_flush_interval(self):

Expand Down