-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prepare release for v1.1.0 (#1)
- Loading branch information
1 parent
96cc622
commit c6c51e0
Showing
48 changed files
with
2,713 additions
and
599 deletions.
There are no files selected for viewing
This file contains 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,3 @@ | ||
.devcontainer/ | ||
build/ | ||
dist/ |
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[flake8] | ||
extend-ignore = E266, E501, E203 | ||
max-line-length = 88 | ||
max-complexity = 16 | ||
max-complexity = 16 |
This file contains 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,40 @@ | ||
name: build wheel for release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write # upload artifacts requires this permission | ||
|
||
jobs: | ||
build_wheel: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup python environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
# use the minimum py ver we support to | ||
# generate the wheel. | ||
python-version: "3.8" | ||
|
||
- name: Build wheel and calculate checksum | ||
run: | | ||
python3 -m pip install -q -U pip | ||
pip install -q -U hatch | ||
hatch build -t wheel | ||
for WHL in dist/*.whl; \ | ||
do \ | ||
sha256sum ${WHL} | sed -E "s@(\w+)\s+.*@sha256:\1@" > \ | ||
${WHL}.checksum; \ | ||
done | ||
- name: Upload built wheel as release asset | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
dist/*.whl | ||
dist/*.checksum |
This file contains 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,121 @@ | ||
name: test CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
# only trigger unit test CI when src or tests changed | ||
paths: | ||
- "src/**" | ||
- "tests/**" | ||
- ".github/workflows/test.yaml" | ||
push: | ||
branches: | ||
- main | ||
# only trigger unit test CI when src or tests changed | ||
paths: | ||
- "src/**" | ||
- "tests/**" | ||
- ".github/workflows/test.yaml" | ||
# allow the test CI to be manually triggerred | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pytest_with_coverage_on_supported_os: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
# currently we only need to ensure it is running on the following OS | ||
# with OS-shipped python interpreter. | ||
os: ["ubuntu-20.04", "ubuntu-22.04"] | ||
include: | ||
- os: ubuntu-22.04 | ||
python_version: "3.10" | ||
- os: ubuntu-20.04 | ||
python_version: "3.8" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout commit | ||
uses: actions/checkout@v4 | ||
with: | ||
# sonarcloud needs main branch's ref | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
cache: "pip" | ||
|
||
- name: Install package | ||
run: | | ||
python -m pip install -q -U pip | ||
pip install -q .[dev] | ||
- name: Execute pytest with coverage | ||
run: | | ||
coverage run -m pytest --junit-xml=test_result/pytest.xml | ||
coverage xml -o test_result/coverage.xml | ||
# export the coverage report to the comment! | ||
- name: Add coverage report to PR comment | ||
continue-on-error: true | ||
uses: MishaKav/[email protected] | ||
with: | ||
pytest-xml-coverage-path: test_result/coverage.xml | ||
junitxml-path: test_result/pytest.xml | ||
|
||
- name: SonarCloud Scan | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
||
pytest_on_supported_python_vers: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- name: Checkout commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: "pip" | ||
|
||
- name: Install package | ||
run: | | ||
python -m pip install -q -U pip | ||
pip install -q .[dev] | ||
- name: Execute pytest | ||
run: pytest | ||
|
||
python_lint_check: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 3 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- name: Checkout commit | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install check dependencies | ||
run: | | ||
python -m pip install -q -U pip | ||
pip install -q .[dev] | ||
- name: Check code linting | ||
run: | | ||
black --check src | ||
flake8 src |
This file contains 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 |
---|---|---|
@@ -1,9 +1,164 @@ | ||
.devcontainer/ | ||
cache | ||
coverage | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
mypy_cache/ | ||
otaclient_iot_logging_server/_version.py | ||
__pycache__/ | ||
venv/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# pdm | ||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | ||
#pdm.lock | ||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | ||
# in version control. | ||
# https://pdm.fming.dev/#use-with-ide | ||
.pdm.toml | ||
|
||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
#.idea/ | ||
|
||
# local vscode settings | ||
.devcontainer | ||
.vscode |
This file contains 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,4 @@ | ||
"MD013": false | ||
"MD041": false | ||
"MD024": | ||
"siblings_only": true |
This file contains 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,46 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-use-type-annotations | ||
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster | ||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.4.2 | ||
hooks: | ||
- id: black | ||
# It is recommended to specify the latest version of Python | ||
# supported by your project here, or alternatively use | ||
# pre-commit's default_language_version, see | ||
# https://pre-commit.com/#top_level-default_language_version | ||
language_version: python3.11 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-bugbear==24.2.6 | ||
- flake8-comprehensions | ||
- flake8-simplify | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: "1.8.0" | ||
hooks: | ||
- id: pyproject-fmt | ||
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version | ||
additional_dependencies: ["tox>=4.9"] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.40.0 | ||
hooks: | ||
- id: markdownlint | ||
args: ["-c", ".markdownlint.yaml", "--fix"] | ||
ci: | ||
autoupdate_schedule: monthly |
Oops, something went wrong.
c6c51e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
c6c51e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report