-
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.
Signed-off-by: LingKa <[email protected]>
- Loading branch information
Showing
4 changed files
with
90 additions
and
7 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
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,22 @@ | ||
name: Generate API | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install gRPC | ||
run: python3 -m pip install grpcio | ||
shell: bash | ||
- name: Install gRPC tools | ||
run: python3 -m pip install grpcio-tools | ||
shell: bash | ||
|
||
- name: Initialize Git Submodules | ||
run: git submodule init | ||
shell: bash | ||
- name: Update Git Submodules | ||
run: git submodule update | ||
shell: bash | ||
|
||
- name: Generate api | ||
run: make | ||
shell: bash |
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,5 @@ | ||
# Global options: | ||
|
||
[mypy] | ||
ignore_missing_imports = True | ||
disable_error_code = var-annotated |
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ dynamic = ["version"] | |
description = 'py-xline is an official xline client sdk, written in Python.' | ||
readme = "README.md" | ||
requires-python = ">=3.7" | ||
license = "Apache 2.0" | ||
license = "Apache-2.0" | ||
keywords = [] | ||
authors = [ | ||
{ name = "LingKa", email = "[email protected]" }, | ||
|
@@ -24,15 +24,18 @@ classifiers = [ | |
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
dependencies = [] | ||
dependencies = [ | ||
"grpcio", | ||
"grpcio-tools", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/xline-kv/py-xline#readme" | ||
Issues = "https://github.com/xline-kv/py-xline/issues" | ||
Source = "https://github.com/xline-kv/py-xline" | ||
|
||
[tool.hatch.version] | ||
path = "src/py_xline/__about__.py" | ||
path = "client/__about__.py" | ||
|
||
[tool.hatch.envs.default] | ||
dependencies = [ | ||
|
@@ -63,7 +66,7 @@ dependencies = [ | |
"ruff>=0.0.243", | ||
] | ||
[tool.hatch.envs.lint.scripts] | ||
typing = "mypy --install-types --non-interactive {args:src/py_xline tests}" | ||
typing = "mypy --install-types --non-interactive {args:client tests}" | ||
style = [ | ||
"ruff {args:.}", | ||
"black --check --diff {args:.}", | ||
|
@@ -117,11 +120,13 @@ ignore = [ | |
# Allow non-abstract empty methods in abstract base classes | ||
"B027", | ||
# Allow boolean positional values in function calls, like `dict.get(... True)` | ||
"FBT003", | ||
"FBT001", "FBT002", "FBT003", | ||
# Ignore checks for possible passwords | ||
"S105", "S106", "S107", | ||
# Ignore complexity | ||
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915", | ||
# Ignore import sort | ||
"I001" | ||
] | ||
unfixable = [ | ||
# Don't touch unused imports | ||
|
@@ -139,11 +144,11 @@ ban-relative-imports = "all" | |
"tests/**/*" = ["PLR2004", "S101", "TID252"] | ||
|
||
[tool.coverage.run] | ||
source_pkgs = ["py_xline", "tests"] | ||
source_pkgs = ["client", "tests"] | ||
branch = true | ||
parallel = true | ||
omit = [ | ||
"src/py_xline/__about__.py", | ||
"client/__about__.py", | ||
] | ||
|
||
[tool.coverage.paths] | ||
|