Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d45e802

Browse files
author
Benjy Wiener
committed
Migrate to ZyncIO-based implementation to add async support
1 parent 49d2776 commit d45e802

101 files changed

Lines changed: 6471 additions & 4281 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# This workflow will install Python dependencies, run tests and lint with a single version of Python
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: pull request
4+
name: Run tests
55

66
on:
77
pull_request:
8-
branches: [ "master" ]
8+
branches: ["master"]
9+
workflow_dispatch:
910

1011
concurrency:
1112
group: ${{ github.workflow }}-${{ github.ref }}
1213
cancel-in-progress: true
1314

1415
jobs:
1516
python-app:
16-
if: '! github.event.pull_request.draft'
17+
if: "! github.event.pull_request.draft"
1718
runs-on: ubuntu-latest
1819

1920
defaults:
@@ -23,7 +24,7 @@ jobs:
2324
strategy:
2425
matrix:
2526
os: [ubuntu-latest, windows-latest, macos-latest]
26-
python-version: [ 3.9, "3.10", 3.11, 3.12, 3.13 ]
27+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2728

2829
steps:
2930
- uses: actions/checkout@v4
@@ -35,7 +36,7 @@ jobs:
3536
python-version: ${{ matrix.python-version }}
3637
- name: Install dependencies
3738
run: |
38-
python3 -m pip install --upgrade pip
39+
python3 -m pip install --upgrade pip
3940
- name: Build
4041
run: |
4142
python3 -m pip install mypy-protobuf protobuf grpcio-tools
@@ -44,17 +45,19 @@ jobs:
4445
python3 -m build
4546
- name: Install
4647
run: |
47-
python3 -m pip install .
48+
python3 -m pip install .[dev]
4849
- name: pre-commit
4950
run: |
50-
python3 -m pip install pre-commit
51-
pre-commit run --all-files
51+
python3 -m pip install pre-commit
52+
pre-commit run --all-files
53+
- name: type-check
54+
uses: jakebailey/pyright-action@v1
5255
- name: Run help
5356
run: |
5457
python3 -m rpcclient --help
5558
5659
build-linux-server:
57-
if: '! github.event.pull_request.draft'
60+
if: "! github.event.pull_request.draft"
5861
runs-on: ${{ matrix.os }}
5962

6063
defaults:
@@ -86,15 +89,15 @@ jobs:
8689
sudo apt-get update
8790
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev protobuf-c-compiler
8891
make -C ../protos/ c_protos
89-
90-
92+
93+
9194
mkdir build
9295
cd build
9396
cmake .. -DTARGET=LINUX
9497
make
9598
9699
pytest:
97-
if: '! github.event.pull_request.draft'
100+
if: "! github.event.pull_request.draft"
98101
needs: [python-app, build-linux-server]
99102
runs-on: ${{ matrix.os }}
100103

@@ -105,9 +108,6 @@ jobs:
105108
strategy:
106109
matrix:
107110
include:
108-
- os: macos-latest
109-
arch: arm64
110-
python-version: "3.9"
111111
- os: macos-latest
112112
arch: arm64
113113
python-version: "3.10"
@@ -117,10 +117,7 @@ jobs:
117117
- os: macos-latest
118118
arch: arm64
119119
python-version: "3.12"
120-
121-
- os: macos-latest
122-
arch: x86_64
123-
python-version: "3.9"
120+
124121
- os: macos-latest
125122
arch: x86_64
126123
python-version: "3.10"
@@ -155,8 +152,7 @@ jobs:
155152
python3 -m pip install mypy-protobuf protobuf grpcio-tools
156153
make -C ../protos/ python_protos
157154
python -m pip install --upgrade pip
158-
python -m pip install -U pytest
159-
python -m pip install -U .
155+
python -m pip install -U .[test]
160156
- name: pytest
161157
working-directory: ./src/rpcclient
162158
run: |

docs/conf.py

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@
1212
# add these directories to sys.path here. If the directory is relative to the
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
#
15-
import os
16-
import sys
1715
from pathlib import Path
1816

1917
import toml
2018

2119
# -- Project information -----------------------------------------------------
2220

23-
project = 'rpc-project'
24-
copyright = '2023, doronz88'
25-
author = 'doronz88'
21+
project = "rpc-project"
22+
copyright = "2023, doronz88"
23+
author = "doronz88"
2624

2725
# The short X.Y version
2826
# The full version, including alpha/beta/rc tags
2927

30-
release = version = toml.loads(Path('../src/rpcclient/pyproject.toml').read_text())['project']['version']
28+
release = version = toml.loads(
29+
Path("../src/rpcclient/pyproject.toml").read_text(),
30+
)["project"]["version"]
3131

3232

3333
# -- General configuration ---------------------------------------------------
@@ -39,62 +39,58 @@
3939
# Add any Sphinx extension module names here, as strings. They can be
4040
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4141
# ones.
42-
extensions = [
43-
'sphinx.ext.autodoc',
44-
'sphinx.ext.viewcode',
45-
'sphinx.ext.napoleon'
46-
]
42+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.napoleon"]
4743
# Add any paths that contain templates here, relative to this directory.
48-
templates_path = ['_templates']
44+
templates_path = ["_templates"]
4945

5046
# The suffix(es) of source filenames.
5147
# You can specify multiple suffix as a list of string:
5248
#
5349
# source_suffix = ['.rst', '.md']
54-
source_suffix = '.rst'
50+
source_suffix = ".rst"
5551

5652
# The master toctree document.
57-
master_doc = 'index'
53+
master_doc = "index"
5854

5955
# The language for content autogenerated by Sphinx. Refer to documentation
6056
# for a list of supported languages.
6157
#
6258
# This is also used if you do content translation via gettext catalogs.
6359
# Usually you set "language" from the command line for these cases.
64-
language = 'en'
60+
language = "en"
6561

6662
# List of patterns, relative to source directory, that match files and
6763
# directories to ignore when looking for source files.
6864
# This pattern also affects html_static_path and html_extra_path.
69-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
65+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7066

7167
# The name of the Pygments (syntax highlighting) style to use.
72-
pygments_style = 'stata-dark'
68+
pygments_style = "stata-dark"
7369

7470

7571
# -- Options for HTML output -------------------------------------------------
7672

7773
# The theme to use for HTML and HTML Help pages. See the documentation for
7874
# a list of builtin themes.
7975
#
80-
html_theme = 'sphinx_rtd_theme'
76+
html_theme = "sphinx_rtd_theme"
8177

8278
# Theme options are theme-specific and customize the look and feel of a theme
8379
# further. For a list of options available for each theme, see the
8480
# documentation.
8581
#
8682
html_theme_options = {
87-
'collapse_navigation': True,
88-
'sticky_navigation': True,
89-
'navigation_depth': 2,
90-
'includehidden': True,
91-
'titles_only': False
83+
"collapse_navigation": True,
84+
"sticky_navigation": True,
85+
"navigation_depth": 2,
86+
"includehidden": True,
87+
"titles_only": False,
9288
}
9389

9490
# Add any paths that contain custom static files (such as style sheets) here,
9591
# relative to this directory. They are copied after the builtin static files,
9692
# so a file named "default.css" will overwrite the builtin "default.css".
97-
html_static_path = ['_static']
93+
html_static_path = ["_static"]
9894

9995
# Custom sidebar templates, must be a dictionary that maps document names
10096
# to template names.
@@ -110,7 +106,7 @@
110106
# -- Options for HTMLHelp output ---------------------------------------------
111107

112108
# Output file base name for HTML help builder.
113-
htmlhelp_basename = 'rpc-projectdoc'
109+
htmlhelp_basename = "rpc-projectdoc"
114110

115111

116112
# -- Options for LaTeX output ------------------------------------------------
@@ -119,15 +115,12 @@
119115
# The paper size ('letterpaper' or 'a4paper').
120116
#
121117
# 'papersize': 'letterpaper',
122-
123118
# The font size ('10pt', '11pt' or '12pt').
124119
#
125120
# 'pointsize': '10pt',
126-
127121
# Additional stuff for the LaTeX preamble.
128122
#
129123
# 'preamble': '',
130-
131124
# Latex figure (float) alignment
132125
#
133126
# 'figure_align': 'htbp',
@@ -137,19 +130,15 @@
137130
# (source start file, target name, title,
138131
# author, documentclass [howto, manual, or own class]).
139132
latex_documents = [
140-
(master_doc, 'rpc-project.tex', 'rpc-project Documentation',
141-
'doronz88', 'manual'),
133+
(master_doc, "rpc-project.tex", "rpc-project Documentation", "doronz88", "manual"),
142134
]
143135

144136

145137
# -- Options for manual page output ------------------------------------------
146138

147139
# One entry per manual page. List of tuples
148140
# (source start file, name, description, authors, manual section).
149-
man_pages = [
150-
(master_doc, 'rpc-project', 'rpc-project Documentation',
151-
[author], 1)
152-
]
141+
man_pages = [(master_doc, "rpc-project", "rpc-project Documentation", [author], 1)]
153142

154143

155144
# -- Options for Texinfo output ----------------------------------------------
@@ -158,9 +147,15 @@
158147
# (source start file, target name, title, author,
159148
# dir menu entry, description, category)
160149
texinfo_documents = [
161-
(master_doc, 'rpc-project', 'rpc-project Documentation',
162-
author, 'rpc-project', 'One line description of project.',
163-
'Miscellaneous'),
150+
(
151+
master_doc,
152+
"rpc-project",
153+
"rpc-project Documentation",
154+
author,
155+
"rpc-project",
156+
"One line description of project.",
157+
"Miscellaneous",
158+
),
164159
]
165160

166161

@@ -179,7 +174,7 @@
179174
# epub_uid = ''
180175

181176
# A list of files that should not be packed into the epub file.
182-
epub_exclude_files = ['search.html']
177+
epub_exclude_files = ["search.html"]
183178

184179

185180
# -- Extension configuration -------------------------------------------------

0 commit comments

Comments
 (0)