Skip to content

Commit

Permalink
Merge branch '2.0-EXP' of https://github.com/Rexeh/joystick-diagrams
Browse files Browse the repository at this point in the history
…into 2.0-EXP
  • Loading branch information
Rexeh committed Nov 17, 2023
2 parents f1f100b + 64f7199 commit c9baa3d
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ debug.txt
tests/__pycache__
tests/*/__pycache__/

# Folders
*__pycache__/

# Folders
*__pycache__/
/build/
Expand All @@ -29,3 +32,6 @@ temp/
play*.py
venv/
0.12.0.dev0

venv/
0.12.0.dev0
5 changes: 5 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/joystick_diagrams/libraries/dill.dll
Binary file not shown.
30 changes: 30 additions & 0 deletions src/joystick_diagrams/update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
""" Update service for Joystick Diagrams
Author: Robert Cox
"""
import requests

SERVER_URL = "http://localhost:5000/api/v1/version/"


def get_current_version() -> str:
"""Get current version from file"""
return "1.0.0"


def check_server_version() -> str:
"""Query API with current version, and handle response"""
current_version = get_current_version()
response = requests.get(SERVER_URL + current_version)
if response.status_code == 200:
return response.json()
else:
return "Error"


def check_templates_hash() -> bool:
"""Check the hash of the templates directory against API hash"""


if __name__ == "__main__":
pass

0 comments on commit c9baa3d

Please sign in to comment.