Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c59e925
Small clean-up before pull
VladIftime Apr 15, 2025
928a41a
Merge branch 'pairing&auth' of github.com:flexiblepower/s2-python int…
VladIftime Apr 15, 2025
7355d68
Started the abstract class for a client using PR 85 as inspiration
VladIftime Apr 15, 2025
af98f84
Chore: Fixing tests
VladIftime Apr 15, 2025
54b2466
Chore: Fixing tests added extra dependencies
VladIftime Apr 15, 2025
cc3da10
Chore: Fixing tests
VladIftime Apr 15, 2025
53d4cb1
Chore: Fixing tests
VladIftime Apr 15, 2025
c7bce1b
Added a mock server for testing only
VladIftime Apr 18, 2025
5294be3
Pairing is succesful using the token from the mock server
VladIftime Apr 18, 2025
164d467
Connection to the REST server works. Now the server needs to create t…
VladIftime Apr 18, 2025
caa666e
Created a default_client and made the abstract client use functions t…
VladIftime Apr 21, 2025
9840519
Created a default_client and made the abstract client use functions t…
VladIftime Apr 21, 2025
8001f5b
Chore: fixing tests
VladIftime Apr 21, 2025
584e49e
Add .yaml specs and fixed bw compat.
VladIftime May 6, 2025
71d89b5
dropping python 3.8 support (#117)
MauriceHendrix May 6, 2025
8552f9d
Chore: Fix tests
VladIftime May 6, 2025
51ffb3b
moved import backwards compatibility fix to __init__.py in the main s…
MauriceHendrix May 6, 2025
c91c766
Update src/s2python/authorization/client.py
MauriceHendrix May 6, 2025
bbaaeb4
Update src/s2python/authorization/client.py
MauriceHendrix May 6, 2025
4077452
Update src/s2python/authorization/client.py
MauriceHendrix May 6, 2025
d8d2803
Update src/s2python/authorization/client.py
MauriceHendrix May 6, 2025
c08b086
Update src/s2python/authorization/client.py
MauriceHendrix May 6, 2025
5df1960
Update src/s2python/authorization/client.py
MauriceHendrix May 6, 2025
4c21e89
Update src/s2python/authorization/default_client.py
MauriceHendrix May 6, 2025
1639af8
Update src/s2python/authorization/default_client.py
MauriceHendrix May 6, 2025
60f36ae
Update dev-requirements.txt
MauriceHendrix May 6, 2025
460ba2d
Update default_client.py
MauriceHendrix May 6, 2025
575eee7
fixed linting errors (#119)
MauriceHendrix May 12, 2025
71c05b9
Update src/s2python/authorization/default_client.py
VladIftime May 23, 2025
6d05f1b
Small update
VladIftime May 23, 2025
b4d983b
Merge branch 'feat/abstract_client' of github.com:flexiblepower/s2-py…
VladIftime May 23, 2025
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
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12" # newest Python that is stable
- "3.12"
- "3.13" # newest Python that is stable
platform:
- ubuntu-latest
# - macos-latest
Expand All @@ -79,8 +79,7 @@ jobs:
- name: Run tests
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
-- -rFEx --durations 10 --color yes # pytest args
tox --develop
# - name: Generate coverage report
# run: pipx run coverage lcov -o coverage.lcov
# - name: Upload partial coverage report
Expand All @@ -96,11 +95,11 @@ jobs:
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12" # newest Python that is stable
- "3.12"
- "3.13" # newest Python that is stable
platform:
- ubuntu-latest
# - macos-latest
Expand All @@ -118,18 +117,18 @@ jobs:
- name: Run tests
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox -e lint --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
tox -e lint --develop

typecheck:
needs: prepare
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12" # newest Python that is stable
- "3.12"
- "3.13" # newest Python that is stable
platform:
- ubuntu-latest
# - macos-latest
Expand All @@ -147,7 +146,7 @@ jobs:
- name: Run tests
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
tox -e typecheck --installpkg '${{ needs.prepare.outputs.wheel-distribution }}'
tox -e typecheck --develop

finalize:
needs: [test, lint, typecheck]
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ venv
dist/
build/
%LOCALAPPDATA%
s2-python/src/s2python/specification/s2-pairing/s2-over-ip-pairing.yaml
10 changes: 10 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@ wheel==0.45.1
# via pip-tools
zipp==3.20.2
# via importlib-metadata
jwskate==0.11.1
binapy==0.8.0
# via jwskate
cffi==1.17.1
# via jwskate
cryptography==44.0.2
# via jwskate
pycparser==2.22
# via jwskate
types-requests==2.32.0.20250328

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,28 @@ version = "0.5.0"
readme = "README.rst"
license = "Apache-2.0"
license-files = ["LICENSE"]
requires-python = ">=3.8, < 3.13"
requires-python = ">=3.9, < 3.14"
dependencies = [
"pydantic>=2.8.2",
"pytz",
"click",
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
[project.urls]
"Source code" = "https://github.com/flexiblepower/s2-ws-json-python"

[project.optional-dependencies]
ws = [
"websockets~=13.1",
"jwskate~=0.11",
"requests~=2.32.3",
]
fastapi = [
"fastapi",
Expand Down
136 changes: 136 additions & 0 deletions specification/s2-over-ip-pairing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
openapi: 3.0.3
info:
version: "0.1"
title: s2-over-ip pairing and connection initiation
description: "Description of the pairing process over IP for S2"
paths:
/requestPairing:
post:
description: Initiate pairing
requestBody:
description: TODO
content:
application/json:
schema:
$ref: '#/components/schemas/PairingRequest'
responses:
'200':
description: TODO
content:
application/json:
schema:
$ref: '#/components/schemas/PairingResponse'
/requestConnection:
post:
description: TODO
requestBody:
description: TODO
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionRequest'
responses:
'200':
description: TODO
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionDetails'
components:
schemas:
PairingInfo:
type: object
properties:
pairingUri:
type: string
format: uri
token:
$ref: "#/components/schemas/PairingToken"
validUntil:
type: string
format: date-time
PairingRequest:
type: object
properties:
token:
$ref: "#/components/schemas/PairingToken"
publicKey:
type: string
format: byte
s2ClientNodeId:
type: string
format: uuid
s2ClientNodeDescription:
$ref: "#/components/schemas/S2NodeDescription"
supportedProtocols:
type: array
items:
$ref: "#/components/schemas/Protocols"
PairingResponse:
type: object
properties:
s2ServerNodeId:
type: string
format: uuid
serverNodeDescription:
$ref: "#/components/schemas/S2NodeDescription"
requestConnectionUri:
type: string
format: uri
ConnectionRequest:
type: object
properties:
s2ClientNodeId:
type: string
format: uuid
supportedProtocols:
type: array
items:
$ref: "#/components/schemas/Protocols"
ConnectionDetails:
type: object
properties:
selectedProtocol:
$ref: "#/components/schemas/Protocols"
challenge:
type: string
format: byte
connectionUri:
type: string
format: uri
S2NodeDescription:
type: object
description: TODO nog even over nadenken
properties:
brand:
type: string
logoUri:
type: string
format: uri
type:
type: string
modelName:
type: string
userDefinedName:
type: string
role:
$ref: "#/components/schemas/S2Role"
deployment:
$ref: "#/components/schemas/Deployment"
Protocols:
type: string
enum:
- WebSocketSecure
S2Role:
type: string
enum:
- CEM
- RM
Deployment:
type: string
enum:
- WAN
- LAN
PairingToken:
type: string
pattern: "^[0-9a-zA-Z]{32}$"
4 changes: 4 additions & 0 deletions src/s2python/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys # pragma: no cover
from importlib.metadata import PackageNotFoundError, version # pragma: no cover

try:
Expand All @@ -8,3 +9,6 @@
__version__ = "unknown"
finally:
del version, PackageNotFoundError

from s2python.communication.s2_connection import S2Connection, AssetDetails # pragma: no cover
sys.modules['s2python.s2_connection'] = sys.modules['s2python.communication.s2_connection'] # pragma: no cover
Empty file.
Loading