Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
il-palmi authored Nov 6, 2024
2 parents f9d2e1e + 6c50efe commit bde0d76
Show file tree
Hide file tree
Showing 24 changed files with 988 additions and 937 deletions.
3 changes: 1 addition & 2 deletions INSTALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ fi

sudo chown -R "$USERNAME:$USERNAME" "/opt/$FOLDER_NAME"
source "/opt/$FOLDER_NAME/venv/bin/activate"
pip install -r "/opt/$FOLDER_NAME/requirements_client.txt"
pip install -r "/opt/$FOLDER_NAME/requirements_server.txt"
pip install -r "/opt/$FOLDER_NAME/requirements.txt"
deactivate

echo "Installing system dependencies"
Expand Down
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
all: $(patsubst assets/qt/%.ui, ui/%.py, $(wildcard assets/qt/*.ui))
UI_DIR = assets/qt
PY_DIR = ui

ui/%.py: assets/qt/%.ui
$(PY_DIR)/%.py: $(UI_DIR)/%.ui
pyuic5 -x $< -o $@

# Define targets to convert all .ui files
UI_FILES := $(wildcard $(UI_DIR)/*.ui)
PY_FILES := $(patsubst $(UI_DIR)/%.ui, $(PY_DIR)/%.py, $(UI_FILES))

ui: $(PY_FILES)

# Clean up generated .py files
clean:
rm -f $(PY_FILES)
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,26 @@ You can edit the user interface in two ways:
- Graphics editing: use `pyqt5-tools designer` and open the .ui file that you need to modify
- Functional editing: edit code in `pinolo.py`

To build `.ui` files:
To build UI files:
```
pyuic5 -x assets/qt/<file>.ui -o ui/<file>.py
make ui
```

Compiled UI files must be located inside the `ui` folder.
Compiled UI files are located inside the `ui` folder.

### Generate documentation
To build documentation
```
sphinx-apidox -o docs .
cd docs
make html
```

If `sphinx` is not installed in your system, install it in Pesto venv
```
source ./venv/bin/activate
pip install sphinx sphinx-rtd-theme
```
## Installation

To install pesto in the system:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NetworkSettingsWidget</class>
<widget class="QDialog" name="NetworkSettingsWidget">
<class>NetworkSettingsDialog</class>
<widget class="QDialog" name="NetworkSettingsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>348</height>
<height>355</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -25,7 +25,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>348</height>
<height>355</height>
</size>
</property>
<property name="windowTitle">
Expand All @@ -37,23 +37,30 @@
<item>
<widget class="QGroupBox" name="networkBox">
<property name="title">
<string>Server settings</string>
<string>Connection settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QRadioButton" name="localServerRadioButton">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Local</string>
<string>Server mode</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="remoteServerRadioButton">
<property name="text">
<string>Remote</string>
</property>
<widget class="QComboBox" name="serverModeComboBox">
<item>
<property name="text">
<string>Local</string>
</property>
</item>
<item>
<property name="text">
<string>Remote</string>
</property>
</item>
</widget>
</item>
<item>
Expand Down Expand Up @@ -130,30 +137,54 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Default system path</string>
<string>Disk image settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLineEdit" name="defaultSystemLineEdit"/>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Images directory</string>
</property>
</widget>
</item>
<item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Default image</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="defaultImageLineEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string/>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="findButton">
<property name="text">
<string>Find</string>
<string>Select default image</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<widget class="QLineEdit" name="imagesDirectoryLineEdit">
<property name="placeholderText">
<string>/path/to/folder/of/images/</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="defaultSystemLabel">
<property name="text">
<string>Cannolo Label</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions assets/qt/SelectSystemDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>426</width>
<width>269</width>
<height>262</height>
</rect>
</property>
Expand All @@ -17,7 +17,7 @@
<item>
<widget class="QLabel" name="dialogLabel">
<property name="text">
<string>Select one of the following CANNOLO images to set as default:</string>
<string>Select one of the following images</string>
</property>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions assets/qt/SmartDataWidget.ui → assets/qt/SmartDataDialog.ui
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SmartDataWidget</class>
<widget class="QWidget" name="SmartDataWidget">
<class>SmartDataDialog</class>
<widget class="QWidget" name="SmartDataDialog">
<property name="geometry">
<rect>
<x>0</x>
Expand Down
1 change: 0 additions & 1 deletion basilico.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from collections import deque
from typing import Optional, Callable, Dict, Set, List

from docutils.parsers.rst.directives import encoding
from pytarallo import Tarallo, Errors
from dotenv import load_dotenv
from io import StringIO
Expand Down
Loading

0 comments on commit bde0d76

Please sign in to comment.