Skip to content
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

Update github workflows and project #405

Merged
merged 2 commits into from
Jun 10, 2023
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
12 changes: 6 additions & 6 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
klaasnicolaas marked this conversation as resolved.
Show resolved Hide resolved
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -70,7 +70,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -93,7 +93,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand All @@ -165,7 +165,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache: 'poetry'
cache: "poetry"
- name: 🏗 Install workflow dependencies
run: |
poetry config virtualenvs.create true
Expand Down
84 changes: 39 additions & 45 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ repository = "https://github.com/klaasnicolaas/python-omnikinverter"
documentation = "https://github.com/klaasnicolaas/python-omnikinverter"
keywords = ["omnik", "inverter", "power", "energy", "async", "client"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Development Status :: 5 - Production/Stable",
"Framework :: AsyncIO",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
]
packages = [
{ include = "omnikinverter", from = "src" },
{ include = "omnikinverter", from = "src" },
]

[tool.poetry.dependencies]
Expand Down Expand Up @@ -52,23 +52,24 @@ pytest-cov = "^4.0.0"
yamllint = "^1.30.0"
covdefaults = "^2.3.0"

[tool.black]
target-version = ['py39']

[tool.coverage.paths]
source = ["omnikinverter"]

[tool.coverage.run]
plugins = ["covdefaults"]
source = ["omnikinverter"]

[tool.coverage.report]
fail_under = 90
show_missing = true

[tool.mypy]
# Specify the target platform details in config, so your developers are
# free to run mypy on Windows, Linux, or macOS and get consistent
# results.
platform = "linux"
python_version = "3.9"

# flake8-mypy expects the two following for sensible formatting
show_column_numbers = true

# show error messages from unrelated files
follow_imports = "normal"

Expand All @@ -81,8 +82,8 @@ disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_optional = true
no_implicit_reexport = true
strict_optional = true
Expand All @@ -93,44 +94,37 @@ warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true

[tool.pylint.MASTER]
extension-pkg-whitelist = [
"pydantic"
]
ignore= [
"tests"
]

[tool.pylint.BASIC]
good-names = [
"_",
"ex",
"fp",
"i",
"id",
"j",
"k",
"on",
"Run",
"T",
"_",
"ex",
"fp",
"i",
"id",
"j",
"k",
"on",
"Run",
"T",
"vw",
]

[tool.pylint.DESIGN]
max-attributes=20

[tool.pylint."MESSAGES CONTROL"]
disable= [
"too-few-public-methods",
"duplicate-code",
"format",
"unsubscriptable-object",
"too-few-public-methods",
"duplicate-code",
"format",
"unsubscriptable-object",
]

[tool.pylint.SIMILARITIES]
ignore-imports = true

[tool.pylint.FORMAT]
max-line-length=88
max-line-length = 88

[tool.pylint.DESIGN]
max-attributes = 20

[tool.pytest.ini_options]
addopts = "--cov"
Expand Down Expand Up @@ -160,5 +154,5 @@ known-first-party = ["omnikinverter"]
max-complexity = 25

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0"]