Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
bbc3c0f
Initial commit
wcoenraads Apr 14, 2025
fe25ee0
Shifted over current project code.
AndrewRutherfoord Apr 23, 2025
2c81228
Cleaned up codebase a bit
AndrewRutherfoord Apr 23, 2025
9159304
Implemented way to enable and disable specific control types through …
AndrewRutherfoord Apr 24, 2025
95773c1
Setup Uvicorn for package management
AndrewRutherfoord Apr 24, 2025
58e156a
Created cert framework
AndrewRutherfoord Apr 24, 2025
f46cfa4
Implemented cert on FRBC and PEBC test cases
AndrewRutherfoord Apr 25, 2025
07b897d
Added handshake process to testing
AndrewRutherfoord Apr 29, 2025
b67583c
Broke up into 2 models 2 facilitate creation of server
AndrewRutherfoord Apr 29, 2025
21ceb90
Added the custom version of S2 Python to this repo. (Temporary)
AndrewRutherfoord Apr 30, 2025
8dc5d3d
Started on server side implementation
AndrewRutherfoord Apr 30, 2025
51beca9
Refactored Orchestrator to facilitate creation of server orchestrator
AndrewRutherfoord Apr 30, 2025
404311d
Work in progress. Bit of a mess right now...
AndrewRutherfoord May 1, 2025
3571b61
Restructured files
AndrewRutherfoord May 2, 2025
7598e10
The local one works! A lot has changed
AndrewRutherfoord May 2, 2025
d2174c2
The remote one works but has a asyncio recursion error when stopping
AndrewRutherfoord May 6, 2025
5d065be
Local exits correctly but serer side still errors out
AndrewRutherfoord May 8, 2025
2e77328
Server Teardown working slightly better but still hangs.
AndrewRutherfoord May 8, 2025
972541d
Testing system is working!
AndrewRutherfoord May 8, 2025
0fb4af1
Added the ability for the connecting to a websocket server
AndrewRutherfoord May 8, 2025
02d9196
Added version checks on server side to ensure client and server have …
AndrewRutherfoord May 12, 2025
3d50592
Connection config now takes a URI for client mode so that paths can b…
AndrewRutherfoord May 12, 2025
828e9e1
Fix of message awaiter in controllers
AndrewRutherfoord May 12, 2025
4afe7b7
Added Certificate Renderer genereated by Copilot to make reading the …
AndrewRutherfoord May 12, 2025
a9f6f6c
Split up test cases into better units and made findings a class param
AndrewRutherfoord May 12, 2025
a31d7cd
Added some PEBC unit tests and fied PEBCPowerConstraints validation
AndrewRutherfoord May 12, 2025
d6a6ad9
Removed S2 Python so I can add it as a submodule instead
AndrewRutherfoord May 12, 2025
b65ebfc
Split up FRBC test case into multiple cases
AndrewRutherfoord May 12, 2025
59a4f9d
Added S2-Python as a git submodule
AndrewRutherfoord May 12, 2025
77cde71
Added test logger to get seperate logs from test suite
AndrewRutherfoord May 14, 2025
9f74d1c
Merge Docker configurations
AndrewRutherfoord May 14, 2025
372e558
Finalised test logging setup
AndrewRutherfoord May 14, 2025
cc41b92
Removed config file from tracking so it doesn't change each commit
AndrewRutherfoord May 14, 2025
16aab9b
Refactored to allow testing of CEMs and RMs
AndrewRutherfoord May 15, 2025
e7c1c18
Using unittest again + JUnit XML format output for gitlab CI/CD
AndrewRutherfoord May 16, 2025
618b2e8
Some comments and cleanup
AndrewRutherfoord May 16, 2025
71ba324
Implemented the server side logging & added config switch for includi…
AndrewRutherfoord May 19, 2025
77ca0df
Minor cert fixes.
AndrewRutherfoord May 19, 2025
3750c66
Basic communication with CEM working
AndrewRutherfoord May 19, 2025
20b4b28
Handshake with CEM working. Now need to add the tests
AndrewRutherfoord May 20, 2025
78d8b7f
Split up test cases into CEM and RM ones
AndrewRutherfoord May 21, 2025
d6c31ac
Basic CEM FRBC test implemented
AndrewRutherfoord May 21, 2025
7960e30
CEM EV Test Case Scenario Created
AndrewRutherfoord May 22, 2025
e4eea80
Control type switching works and added NOT_CONTROLLABLE CEM test
AndrewRutherfoord May 22, 2025
258a0e2
More tests and improved organisation of files
AndrewRutherfoord May 26, 2025
37e519b
Created CEM PEBC PV Test Scenario + A bit of work on the RM tests
AndrewRutherfoord May 27, 2025
30bfc07
Built FRBC Battery & PEBC EV CEM Scenario Tests
AndrewRutherfoord May 28, 2025
d93998f
Some minor changes for CEM testing meeting
AndrewRutherfoord Jun 2, 2025
ad36dc9
A bit of cleanup and comments on Executor Classes
AndrewRutherfoord Jun 2, 2025
3386dc1
Some more cleanup and improving consistency across Role Executors
AndrewRutherfoord Jun 2, 2025
8c00e10
Changed how testing works again... Added triggers now
AndrewRutherfoord Jun 3, 2025
e343768
PEBC Test Case now uses new method and it works better than the old
AndrewRutherfoord Jun 3, 2025
3570098
PEBC Test case is done
AndrewRutherfoord Jun 5, 2025
6bb814f
Converted CEM PEBC PV test to the new trigger based tests
AndrewRutherfoord Jun 5, 2025
b7bbdf2
Converted CEM PEBC EV test to the new trigger based tests
AndrewRutherfoord Jun 5, 2025
c4ef4f3
Changes to FRBC Test Case Setup
AndrewRutherfoord Jun 5, 2025
a46a920
Battery Simulation FRBC Works!
AndrewRutherfoord Jun 6, 2025
8c5d1fb
Some cleanup in test cases
AndrewRutherfoord Jun 16, 2025
e6930c7
Abstracted Certification step and fixed certificate serialization.
AndrewRutherfoord Jun 16, 2025
7164f97
Removed the message awaiter since it isn't needed anymore
AndrewRutherfoord Jun 16, 2025
d556479
Started implementing certificate signing
AndrewRutherfoord Jun 16, 2025
8d3a9db
Double Signing Works!!
AndrewRutherfoord Jun 17, 2025
05822b7
Added README content
AndrewRutherfoord Jun 17, 2025
1bbf9b7
Cleanup of project root
AndrewRutherfoord Jun 17, 2025
cd70685
Docs + Cleanup + Better Dockerisation of server
AndrewRutherfoord Jun 18, 2025
1053d8a
Dockerised Client + More Cleanup
AndrewRutherfoord Jun 18, 2025
f44d50c
Reactivated all of the test cases
AndrewRutherfoord Jun 18, 2025
4eabc52
Simplified setup methods and centralised where new test cases and con…
AndrewRutherfoord Jun 19, 2025
9bd0663
Added Power Measurement test to CEM Not Controllable
AndrewRutherfoord Jun 19, 2025
75f5161
Included message validation errors in the Testing
AndrewRutherfoord Jun 19, 2025
7e2919a
Update to example config
AndrewRutherfoord Jun 19, 2025
953d746
Added files to enable GitLab CI testing
AndrewRutherfoord Jun 19, 2025
d219890
Add Certification Explanation
AndrewRutherfoord Jun 19, 2025
90b550a
Added certification sequence diagrams to the README
AndrewRutherfoord Jun 19, 2025
5dcdc9a
Merge remote-tracking branch 'github/main' into dev
AndrewRutherfoord Jun 19, 2025
fa23b22
Update to README
AndrewRutherfoord Jun 19, 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
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.venv/
.vscode
**.log
__pycache__
config*.yaml
!**config.example.yaml
cert*.yaml
**/*.egg-info
report.*
!report.example.*
**.pem
**.pytest_cache**
**.tox**


s2-self-cert-server/data
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "packages/s2-python"]
path = packages/s2-python
url = git@github.com:AndrewRutherfoord/s2-python.git
branch = add_pebc_validation
7 changes: 7 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Main]
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs=1

disable=missing-class-docstring,missing-module-docstring,too-few-public-methods,missing-function-docstring,no-member,unsubscriptable-object,line-too-long
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
39 changes: 39 additions & 0 deletions Dockerfile.client
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim

# Install the project into `/app`
WORKDIR /app

# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1

# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy

COPY s2-self-cert/pyproject.toml .
COPY s2-self-cert/uv.lock .

# Install the project's dependencies using the lockfile and settings
COPY packages /packages
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-install-project


COPY s2-self-cert /app

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"
RUN whoami
ENV PYTHONPATH="/app/src"

# Change ownership and permissions of config.yaml
RUN chown -R root:root /app/
RUN chmod -R 755 /app/

# Reset the entrypoint, don't invoke `uv`
ENTRYPOINT []

CMD ["python3", "/app/src/s2selfcert/main.py"]
38 changes: 38 additions & 0 deletions Dockerfile.server
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Use a Python image with uv pre-installed
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim AS server

# Install the project into `/app`
WORKDIR /app

# Enable bytecode compilation
ENV UV_COMPILE_BYTECODE=1

# Copy from the cache instead of linking since it's a mounted volume
ENV UV_LINK_MODE=copy

COPY s2-self-cert-server/pyproject.toml .
COPY s2-self-cert-server/uv.lock .

# Install the project's dependencies using the lockfile and settings
COPY packages /packages
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-install-project


COPY s2-self-cert-server /app

RUN --mount=type=cache,target=/root/.cache/uv \
uv sync

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"
RUN whoami

# Change ownership and permissions of config.yaml
RUN chown -R root:root /app/
RUN chmod -R 755 /app/

# Reset the entrypoint, don't invoke `uv`
ENTRYPOINT []

CMD ["fastapi", "run", "/app/src/main.py", "--host", "0.0.0.0", "--port", "8001"]
1 change: 1 addition & 0 deletions Logo-S2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading