Skip to content

Commit 7f6d42e

Browse files
committed
v1.10 readz
1 parent 2c2150c commit 7f6d42e

File tree

7 files changed

+16
-57
lines changed

7 files changed

+16
-57
lines changed

TODOS

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,3 @@
1-
General:
2-
3-
Documentation:
4-
5-
Terms:
6-
Configuration Data: Parameters passed over the GUI by the user
7-
Input Data: Data which is forwarded from other elements
8-
9-
General behaviour:
10-
When an element returns None, subsequent
11-
elements are still triggered
12-
13-
Logging:
14-
15-
#1 INFO:
16-
Ordinary debug trace messages
17-
Can be switched on or off by the user (checkbox in element configuration)
18-
Implementation in own code is optional
19-
20-
21-
#2 WARNING:
22-
Signalize a failed execution
23-
Can be switched on or off by the user (checkbox in element configuration)
24-
A log entry of this type is created when the element returns data of type PythonicError
25-
Implementation in own code is optional
26-
27-
#3 Critical (Unhandled exception):
28-
Is signalized in the GUI an (,,Exception occured, open log for details)
29-
Log entry (type ERROR) is made
30-
Is always active (implementation not optional)
31-
32-
33-
Error handling:
34-
35-
#1
36-
Elements should throw an exception when configuration
37-
data is missing or cannot be processed
38-
39-
#2
40-
Elements should try to handle all possible exceptions internally
41-
and only throw critical exceptions.
42-
43-
#3
44-
The result of a operation (if successfull or not (see #2)) should always
45-
be forwarded to subsequent elements in order to react to a possible failed call.
46-
If the result of a failed call could be processed by an subsequent element,
47-
it should be wrapped inside the PythonicError type.
48-
49-
#4
50-
In case of a failed call, a meaningful message or the exception text should returned
51-
(PythonicError as data parameter in returned Record type)
52-
53-
#4
54-
Dont to use logging.error or logging.warning as it has no effect if used in combination with multiprocessing.
55-
56-
571
CCXT Method: Try to optimize large if-else areas for parsing config
582

593
Python: Add type hints
@@ -67,4 +11,6 @@ Elementeditor:
6711
Add the possibility to pass arbitrary number of keyword arguments or
6812
to build a dictionary from within the editor
6913

70-
14+
Testing:
15+
Create Unit test for every element
16+
Create test project

dist/Pythonic-1.10.tar.gz

5.14 MB
Binary file not shown.

dist/PythonicRPI-1.10.tar.gz

5.14 MB
Binary file not shown.

setup_rpi.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ install_requires =
77
debugpy==1.3.0
88
python-telegram-bot==13.4.1
99
ccxt>=1.37.59
10+
openpyxl>=3.0.9
1011
gpiozero>=1.6.2

setup_x86.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ install_requires =
77
eventlet>=0.27.0
88
debugpy==1.3.0
99
python-telegram-bot==13.4.1
10+
openpyxl>=3.0.9
1011
ccxt>=1.37.59

src/Pythonic/element_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from pathlib import Path
33
from typing import Optional
44

5+
6+
57
class Function():
68

79
def __init__(self, id, config, inputData, return_queue, cmd_queue):
@@ -60,6 +62,7 @@ def __init__(self, msg : str) -> None:
6062
def __str__(self) -> str:
6163
return 'Error: {}'.format(self.msg)
6264

65+
6366
class GuiCMD:
6467

6568
def __init__(self, text):
@@ -71,11 +74,13 @@ def __setstate__(self, state):
7174
def __getstate__(self):
7275
return(self.text)
7376

77+
7478
class GuiException:
7579

7680
def __init__(self, e : Exception) -> None:
7781
self.e = e
7882

83+
7984
class ProcCMD:
8085

8186
def __init__(self, data, bStop=False):

src/commands.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ lsblk -p
7878
# copy image from SD card to HDD
7979
dd if=/dev/sdc of=~/Pythonic-1.9.img bs=32M
8080

81+
sudo pishrink.sh ~/Pythonic-1.9.img
82+
8183
dd if=/home/stephan/Pythonic-1.6.img of=/dev/sdc conv=fsync bs=32M
8284

8385
scp Pythonic-1.6.zip hansic99@frs.sourceforge.net:/home/frs/project/pythonicrpi/
@@ -91,6 +93,10 @@ scp Pythonic-1.6.zip hansic99@frs.sourceforge.net:/home/frs/project/pythonicrpi/
9193
#clean all log files
9294
find /var/log -type f -delete
9395

96+
# User directory
97+
~/.cache (content)
98+
~/.bash_history (file)
99+
94100
# remove everytring in
95101
/var/tmp
96102
/tmp

0 commit comments

Comments
 (0)