Skip to content

Commit 828a82d

Browse files
authored
Cleanup Python code for host server (#32)
* Clean up server and service code * Add Python style and typing checks to Actions runner
1 parent fe0691b commit 828a82d

File tree

6 files changed

+387
-150
lines changed

6 files changed

+387
-150
lines changed

.github/workflows/build_test.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ on:
1313
- main
1414

1515
jobs:
16+
python-test:
17+
name: Python tests
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Git checkout
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: 'true'
24+
25+
- name: Get Python modules
26+
run: |
27+
python3 -m pip install --upgrade pip
28+
python3 -m pip install pycodestyle mypy
29+
30+
- name: Check code style
31+
run: |
32+
python3 -m pycodestyle ./lglpy
33+
34+
- name: Check typing
35+
run: |
36+
python3 -m mypy ./lglpy
37+
1638
build-ubuntu-x64-clang:
1739
name: Ubuntu x64 Clang
1840
runs-on: ubuntu-22.04

lgl_host_server.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ def main():
4242

4343
# Register all the services with it
4444
print(f'Registering host services:')
45-
service = lglpy.service_test.TestService()
46-
endpoint_id = server.register_endpoint(service)
47-
print(f' - [{endpoint_id}] = {service.get_service_name()}')
45+
46+
if 0:
47+
service = lglpy.service_test.TestService()
48+
endpoint_id = server.register_endpoint(service)
49+
print(f' - [{endpoint_id}] = {service.get_service_name()}')
4850

4951
service = lglpy.service_log.LogService()
5052
endpoint_id = server.register_endpoint(service)

0 commit comments

Comments
 (0)