-
Notifications
You must be signed in to change notification settings - Fork 16
chore: improve GitHub integration, add CI config #78
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
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d6be382
chore: ignore IDE config
bednar 08a217e
chore: add GitHub issues and PR template
bednar 219cd4a
chore: support only supported Python versions
bednar c286521
chore: enable dependabot
bednar d9cf3ec
chore: remove useless test
bednar 561acf0
chore: enable CircleCI
bednar 7f8fcdc
chore: ignore distibution
bednar a488bd9
chore: add semantic commit check
bednar b656d7c
chore: add code QL
bednar e321f34
chore: disable code-style, docstyle
bednar fd2853c
docs: add link to codecov and codeQL
bednar cf2f079
fix: min python
bednar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Closes # | ||
|
||
## Proposed Changes | ||
|
||
_Briefly describe your proposed changes:_ | ||
|
||
## Checklist | ||
|
||
<!-- Checkboxes below this note can be erased if not applicable to your Pull Request. --> | ||
|
||
- [ ] 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ dist | |
build | ||
pyinflux3*.egg-info | ||
.DS_store | ||
__pycache__ | ||
__pycache__ | ||
.idea | ||
*.egg-info/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.