diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..5d41fe4
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,128 @@
+version: 2.1
+
+commands:
+ client-test:
+ description: "Run tests"
+ parameters:
+ python-image:
+ type: string
+ steps:
+ - restore_cache:
+ name: Restoring Pip Cache
+ keys:
+ - &cache-key pip-cache-v11-<< parameters.python-image >>-{{ checksum "setup.py" }}
+ - pip-cache-v11-<< parameters.python-image >>-
+ - run:
+ name: "Running tests"
+ command: |
+ python --version
+ mkdir test-reports || true
+ pip install . --user
+ pip install .\[dataframe\] --user
+ pip install pytest pytest-cov --user
+ pytest tests --junitxml=test-reports/junit.xml --cov=./ --cov-report xml:coverage.xml
+ - save_cache:
+ name: Saving Pip Cache
+ key: *cache-key
+ paths:
+ - ".venv"
+ - "~/.cache/pip"
+ - "/usr/local/lib/site-python"
+ when: always
+jobs:
+ tests-python:
+ parameters:
+ python-image:
+ type: string
+ default: &default-python "cimg/python:3.7"
+ docker:
+ - image: << parameters.python-image >>
+ environment:
+ PIPENV_VENV_IN_PROJECT: true
+ steps:
+ - checkout
+ - client-test:
+ python-image: << parameters.python-image >>
+ - store_test_results:
+ path: test-reports
+ - run:
+ name: Collecting coverage reports
+ command: |
+ curl -Os https://uploader.codecov.io/latest/linux/codecov
+ curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
+ curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
+ curl -s https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
+ gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
+ shasum -a 256 -c codecov.SHA256SUM
+ chmod +x ./codecov
+ ./codecov
+ check-code-style:
+ docker:
+ - image: *default-python
+ environment:
+ PIPENV_VENV_IN_PROJECT: true
+ steps:
+ - checkout
+ - run:
+ name: Checks style consistency across sources.
+ command: |
+ pip install flake8 --user
+ flake8 influxdb_client_3/
+ check-twine:
+ docker:
+ - image: *default-python
+ environment:
+ PIPENV_VENV_IN_PROJECT: true
+ steps:
+ - checkout
+ - run:
+ name: Checks that the description will render correctly on PyPI.
+ command: |
+ pip install --upgrade pip
+ pip install twine --user
+ python setup.py sdist bdist_wheel
+ twine check dist/*
+ check-docstyle:
+ docker:
+ - image: *default-python
+ environment:
+ PIPENV_VENV_IN_PROJECT: true
+ steps:
+ - checkout
+ - run:
+ name: Checks compliance with Python docstring convention.
+ command: |
+ pip install pydocstyle --user
+ pydocstyle --count influxdb_client_3
+
+workflows:
+ version: 2
+ build:
+ when:
+ not:
+ equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
+ jobs:
+# - check-code-style
+# - check-docstyle
+ - check-twine
+ - tests-python:
+ name: test-3.8
+ python-image: "cimg/python:3.8"
+ - tests-python:
+ name: test-3.9
+ python-image: "cimg/python:3.9"
+ - tests-python:
+ name: test-3.10
+ python-image: "cimg/python:3.10"
+ - tests-python:
+ name: test-3.11
+ python-image: "cimg/python:3.11"
+ - tests-python:
+ name: test-3.12
+ python-image: "cimg/python:3.12"
+
+ nightly:
+ when:
+ equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
+ jobs:
+ - tests-python
diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
new file mode 100644
index 0000000..7898f40
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml
@@ -0,0 +1,54 @@
+name: Bug Report
+description: Create a bug report to help us improve
+labels: ["bug"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for taking time to fill out this bug report! We reserve this repository issues for bugs with reproducible problems.
+ Please redirect any questions about the client usage to our [Community Slack](https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA) or [Community Page](https://community.influxdata.com/) we have a lot of talented community members there who could help answer your question more quickly.
+
+ * Please add a :+1: or comment on a similar existing bug report instead of opening a new one.
+ * Please check whether the bug can be reproduced with the latest release.
+ - type: textarea
+ id: specifications
+ attributes:
+ label: Specifications
+ description: Describe the steps to reproduce the bug.
+ value: |
+ * Client Version:
+ * InfluxDB Version:
+ * Platform:
+ validations:
+ required: true
+ - type: textarea
+ id: reproduce
+ attributes:
+ label: Code sample to reproduce problem
+ description: Provide a code sample that reproduces the problem
+ value: |
+ ```python
+ ```
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: Expected behavior
+ description: Describe what you expected to happen when you performed the above steps.
+ validations:
+ required: true
+ - type: textarea
+ id: actual-behavior
+ attributes:
+ label: Actual behavior
+ description: Describe what actually happened when you performed the above steps.
+ validations:
+ required: true
+ - type: textarea
+ id: additional-info
+ attributes:
+ label: Additional info
+ description: Include gist of relevant config, logs, etc.
+ validations:
+ required: false
diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
new file mode 100644
index 0000000..415f541
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
@@ -0,0 +1,37 @@
+name: Feature request
+description: Create a feature request to make client more awesome
+labels: ["feature request"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thanks for taking time to share with us this feature request! Please describe why you would like this feature to be added to the client, how you plan to use it to make your life better.
+ - type: textarea
+ id: use-case
+ attributes:
+ label: Use Case
+ description: Describe how you plan to use this feature.
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: Expected behavior
+ description: Describe what you expected to happen when you performed the above steps.
+ validations:
+ required: true
+ - type: textarea
+ id: actual-behavior
+ attributes:
+ label: Actual behavior
+ description: Describe what actually happened when you performed the above steps.
+ validations:
+ required: true
+ - type: textarea
+ id: additional-info
+ attributes:
+ label: Additional info
+ description: Include gist of relevant config, logs, etc.
+ validations:
+ required: false
+
diff --git a/.github/ISSUE_TEMPLATE/SUPPORT.yml b/.github/ISSUE_TEMPLATE/SUPPORT.yml
new file mode 100644
index 0000000..b37d9fe
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/SUPPORT.yml
@@ -0,0 +1,17 @@
+name: Support request
+description: Open a support request
+labels: ["support"]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ WOAHH, hold up. This isn't the best place for support questions.
+ You can get a faster response on slack or forums:
+
+ Please redirect any QUESTIONS about Client usage to
+ - InfluxData Slack Channel: https://app.slack.com/huddle/TH8RGQX5Z/C02UDUPLQKA
+ - InfluxData Community Site: https://community.influxdata.com
+
+ - type: textarea
+ attributes:
+ label: "Please direct all support questions to slack or the forums. Thank you."
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..aafe710
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,16 @@
+Closes #
+
+## Proposed Changes
+
+_Briefly describe your proposed changes:_
+
+## Checklist
+
+
+
+- [ ] CHANGELOG.md updated
+- [ ] Rebased/mergeable
+- [ ] A test has been added if appropriate
+- [ ] Tests pass
+- [ ] Commit messages are [conventional](https://www.conventionalcommits.org/en/v1.0.0/)
+- [ ] Sign [CLA](https://www.influxdata.com/legal/cla/) (if not already signed)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..95b538f
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,7 @@
+version: 2
+updates:
+ - package-ecosystem: "pip"
+ directory: "/"
+ schedule:
+ interval: "daily"
+ open-pull-requests-limit: 10
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..040fbd0
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,31 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ CodeQL-Build:
+ runs-on: ubuntu-latest
+
+ permissions:
+ security-events: write
+ actions: read
+ contents: read
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: python
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/semantic.yml b/.github/workflows/semantic.yml
new file mode 100644
index 0000000..0f9ed27
--- /dev/null
+++ b/.github/workflows/semantic.yml
@@ -0,0 +1,14 @@
+---
+name: "Semantic PR and Commit Messages"
+
+on:
+ pull_request:
+ types: [opened, reopened, synchronize, edited]
+ branches:
+ - main
+
+jobs:
+ semantic:
+ uses: influxdata/validate-semantic-github-messages/.github/workflows/semantic.yml@main
+ with:
+ CHECK_PR_TITLE_OR_ONE_COMMIT: true
diff --git a/.gitignore b/.gitignore
index 775883d..85224cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,4 +6,6 @@ dist
build
pyinflux3*.egg-info
.DS_store
-__pycache__
\ No newline at end of file
+__pycache__
+.idea
+*.egg-info/
diff --git a/README.md b/README.md
index cfcf013..2e57595 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,14 @@
-
-
+
+
-
-
+
+
+
+
+
diff --git a/setup.py b/setup.py
index 046246f..39cd813 100644
--- a/setup.py
+++ b/setup.py
@@ -47,14 +47,15 @@ def get_version():
packages=find_packages(exclude=['tests', 'tests.*', 'examples', 'examples.*']),
extras_require={'pandas': ['pandas'], 'polars': ['polars'], 'dataframe': ['pandas', 'polars']},
install_requires=requires,
- python_requires='>=3.7',
+ python_requires='>=3.8',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
- 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
+ 'Programming Language :: Python :: 3.11',
+ 'Programming Language :: Python :: 3.12',
]
-)
\ No newline at end of file
+)
diff --git a/tests/test_influxdb_client_3.py b/tests/test_influxdb_client_3.py
index 39e10cd..a9df7d1 100644
--- a/tests/test_influxdb_client_3.py
+++ b/tests/test_influxdb_client_3.py
@@ -25,14 +25,5 @@ def test_init(self):
self.assertEqual(self.client._write_api, self.mock_write_api.return_value)
self.assertEqual(self.client._flight_client, self.mock_flight_client.return_value)
- @patch('influxdb_client_3._WriteApi.write')
- def test_write(self, mock_write):
- record = "test_record"
- self.client.write(record=record)
- mock_write.assert_called_once_with(bucket=self.client._database, record=record)
-
- # Add more tests for other methods
-
-
if __name__ == '__main__':
- unittest.main()
\ No newline at end of file
+ unittest.main()