Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	pyproject.toml
  • Loading branch information
Stefano Bertelli committed Jun 7, 2024
2 parents 9ad2c2d + 8a9955d commit f32e28d
Show file tree
Hide file tree
Showing 47 changed files with 1,079 additions and 586 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ on:
branches:
- main

permissions: write-all

jobs:
release:
runs-on: ubuntu-latest
concurrency: release

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Python Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}

24 changes: 24 additions & 0 deletions .run/Main.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Main" type="PythonConfigurationType" factoryName="Python">
<module name="rotary-controller-python" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/rotary_controller_python/main.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>
93 changes: 92 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,87 @@



## v0.2.15-rc.5 (2024-05-16)
## v0.3.2 (2024-06-02)

### Fix

* fix: broken network page link ([`2822180`](https://github.com/bartei/rotary-controller-python/commit/2822180598e11985195609a3f1d2012611f1d9d8))


## v0.3.1 (2024-05-27)

### Fix

* fix: set user for rotary-controller service ([`6d7986e`](https://github.com/bartei/rotary-controller-python/commit/6d7986ed3de798cd16dc08c2e480fe4442a1740c))

* fix: add formats setup page with color picker for digits
fix: extend functionality of saving dispatcher ([`7c4f28e`](https://github.com/bartei/rotary-controller-python/commit/7c4f28e6f0acda8a7090a41fc0f99f9c415facfb))


## v0.3.0 (2024-05-24)

### Fix

* fix: update start script ([`8b986a8`](https://github.com/bartei/rotary-controller-python/commit/8b986a8af5c38e69ad6cd881cfb6ac297d2d923d))

* fix: something is wrong with the network status reporting disabled for now ([`f341423`](https://github.com/bartei/rotary-controller-python/commit/f341423896deeff2fbb2cf26d2d0dc4a8eb44a98))

* fix: handle return status value for ifreload ([`2c21599`](https://github.com/bartei/rotary-controller-python/commit/2c215995221026e1090b44390db6ab4fe54d7f42))

* fix: load network settings from interfaces file ([`db031c0`](https://github.com/bartei/rotary-controller-python/commit/db031c0e48521b3bf96d5245def7ef5636dc8166))

* fix: move network settings in the settings page
fix: update network settings screen with shared components
fix: remove logs panel from the settings page as it takes a lot of resources to load long log files
fix: other minor improvements to the new settings page ([`cba3ea0`](https://github.com/bartei/rotary-controller-python/commit/cba3ea0c7d9ca7c25fa706a9eb6c8a002e7e1191))

* fix: new setup popup with screens
fix: better file naming for settings with some logs ([`a16cba6`](https://github.com/bartei/rotary-controller-python/commit/a16cba65047bbb585c5578daef177a7847fc24b2))

* fix: handle id_override for SavingDispatcher to allow more stable file naming ([`042f59e`](https://github.com/bartei/rotary-controller-python/commit/042f59efe8795efdd31ea4ab2be91ccd5890f51b))

* fix: improvements to the plot view ([`bbc58c7`](https://github.com/bartei/rotary-controller-python/commit/bbc58c7cd3ac508878c04be3a43c0f99c13fada5))

* fix: working on graphical view ([`dcc73c6`](https://github.com/bartei/rotary-controller-python/commit/dcc73c65d40561ad187c91c2d2f723426a27632f))

### Unknown

* Merge branch &#39;touch&#39;

# Conflicts:
# rotary_controller_python/network/__init__.py ([`f7e163c`](https://github.com/bartei/rotary-controller-python/commit/f7e163c0571648276bf24341da2783e1f2eb9f3c))


## v0.2.17 (2024-05-19)

### Unknown

* Merge remote-tracking branch &#39;origin/main&#39; ([`bfd589f`](https://github.com/bartei/rotary-controller-python/commit/bfd589f478146a92aa54d9241b5637145ba20654))


## v0.2.16 (2024-05-17)

### Fix

* fix: test push ([`5caca88`](https://github.com/bartei/rotary-controller-python/commit/5caca8856eee03c606ad26cf8669abf6a0bfea9f))

* fix: update start.sh ([`10a9169`](https://github.com/bartei/rotary-controller-python/commit/10a9169a96ef9039979a220e36be7bc450138d08))

### Unknown

* Merge remote-tracking branch &#39;origin/main&#39; ([`92b8da2`](https://github.com/bartei/rotary-controller-python/commit/92b8da2ef61c45885196a437744404122216b4df))


## v0.2.15 (2024-05-16)

### Fix

* fix: add def for main branch release ([`15f4feb`](https://github.com/bartei/rotary-controller-python/commit/15f4feb7e240882f96615889c55db9b4a5a2e82e))

* fix: test main cicd ([`d54e3e8`](https://github.com/bartei/rotary-controller-python/commit/d54e3e886203a571b3497b44d9df6ed92bfc662e))

* fix: add more helper functions and tests for network configuration when running on the raspberry pi ([`a5deac9`](https://github.com/bartei/rotary-controller-python/commit/a5deac9fb29d6d5e69111f7854675c2707b1f4dd))


## v0.2.15-rc.4 (2024-05-14)

Expand Down Expand Up @@ -40,10 +115,20 @@

## v0.2.15-rc.1 (2024-05-12)

### Feature

* feat: add touch support for zooming and selecting items wip ([`289952a`](https://github.com/bartei/rotary-controller-python/commit/289952a093d540e04d64198d5a0cb9d7fafdc1d9))

* feat: add touch support for zooming and selecting items wip ([`8909391`](https://github.com/bartei/rotary-controller-python/commit/89093918623df52cb0f7c1cf880fcde9a4768795))

* feat: add touch support for zooming and selecting items wip ([`dd2d32b`](https://github.com/bartei/rotary-controller-python/commit/dd2d32bdd63462165bcf00999f76efbfb1fbf01c))

### Fix

* fix: add pre-release workflow for dev branch ([`cedb688`](https://github.com/bartei/rotary-controller-python/commit/cedb688b452092d8d6ec242759442ed4911b9ff6))

* fix: better organization of the plot widgets ([`85ba899`](https://github.com/bartei/rotary-controller-python/commit/85ba8999bcdc796fda3934c967ce3fb9a2671317))

* fix: add template service for systemd automated startup ([`7a768ca`](https://github.com/bartei/rotary-controller-python/commit/7a768cab236eefa095a0ac100d0d01a498bf0670))

* fix: update permissions ([`415289b`](https://github.com/bartei/rotary-controller-python/commit/415289bc49adc37db2891cc0691462c57a9f699d))
Expand Down Expand Up @@ -130,6 +215,12 @@ fix: add back refresh for cycles and interval ([`8c5c557`](https://github.com/ba

### Unknown

* Merge remote-tracking branch &#39;origin/touch&#39; into touch

# Conflicts:
# rotary_controller_python/components/plot/grid.py
# rotary_controller_python/components/plot/scene_popup.py ([`02315a8`](https://github.com/bartei/rotary-controller-python/commit/02315a827e612d63869b906646dec950306ecac0))

* wip: update packages and add plot graphical items ([`0f92ec3`](https://github.com/bartei/rotary-controller-python/commit/0f92ec30727976bd2923ab450058e600ae9a01fa))

* Merge remote-tracking branch &#39;origin/dev&#39; into dev
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ operation of the touchscreen, keyboard, etc. etc.

Instructions will eventually be placed here for completeness to assist in the configuration of raspbian.

#TODO: Put here instructions for raspbian
#TODO: Put here instructions for raspbian
20 changes: 10 additions & 10 deletions poetry.lock

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

15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rotary-controller-python"
version = "0.2.15-rc.5"
version = "0.3.2"
description = "Rotary Controller Python"
authors = ["Stefano Bertelli <bartei81@gmail.com>"]
license = "MIT"
Expand All @@ -25,17 +25,20 @@ requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.semantic_release]
version_toml = [
"pyproject.toml:tool.poetry.version"
]
version_toml = ["pyproject.toml:tool.poetry.version"]
patch_without_tag = true
branch = "main"
hvcs = "github"
remove_dist = false
upload_to_pypi = true
build_command = "pip install poetry && poetry build"
preselease = false

[tool.semantic_release.branches.main]
match = "main"
prerelease = false

[tool.semantic_release.branches.dev]
match = "dev"
prerelease_token = "rc"
prerelease = true
prerelease = true
prerelease_token = "rc"
12 changes: 6 additions & 6 deletions rotary_controller_python/components/coordbar.kv
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
font_name: "fonts/iosevka-regular.ttf"
font_size: self.height / 1.5
font_style: "bold"
color: app.display_color
color: app.formats.display_color
text: app.formats.position_format.format(root.position / app.formats.factor) if root.mode == 0 else app.formats.speed_format.format(root.speed / app.formats.factor)
text_size: self.size
halign: 'right'
Expand All @@ -35,7 +35,7 @@
font_name: "fonts/iosevka-regular.ttf"
font_size: self.height / 1.5
font_style: "bold"
color: app.display_color
color: app.formats.display_color
text: app.formats.speed_format.format(root.speed / app.formats.factor)
text_size: self.size
halign: 'right'
Expand All @@ -49,7 +49,7 @@
text: "Num"
font_size: self.height / 1.5
size_hint_y: 0.3
color: app.display_color
color: app.formats.display_color
halign: 'center'
valign: 'top'
Button:
Expand All @@ -58,7 +58,7 @@
font_size: self.height / 2
font_style: "bold"
background_color: [0.3, 0.3, 0.3, 1]
color: app.display_color
color: app.formats.display_color
text: str(int(root.syncRatioNum))
text_size: self.size
halign: 'center'
Expand All @@ -74,7 +74,7 @@
text: "Den"
font_size: self.height / 1.5
size_hint_y: 0.3
color: app.display_color
color: app.formats.display_color
halign: 'center'
valign: 'top'
Button:
Expand All @@ -83,7 +83,7 @@
font_size: self.height / 2
font_style: "bold"
background_color: [0.3, 0.3, 0.3, 1]
color: app.display_color
color: app.formats.display_color
text: str(int(root.syncRatioDen))
text_size: self.size
halign: 'center'
Expand Down
8 changes: 5 additions & 3 deletions rotary_controller_python/components/coordbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ class CoordBar(BoxLayout, SavingDispatcher):

_skip_save = ["position", "new_position", "formatted_axis_speed", "syncEnable"]

def __init__(self, input_index, **kv):
def __init__(self, **kv):
self.app = App.get_running_app()
super().__init__(**kv)
self.inputIndex = input_index

self.speed_history = collections.deque(maxlen=5)
self.previous_axis_time: float = 0
Expand All @@ -50,6 +49,9 @@ def __init__(self, input_index, **kv):
Clock.schedule_interval(self.speed_task, 1.0/25.0)

def upload(self):
if self.device is None:
return

if not self.device.dm.connected:
log.error(f"Unable to upload scale {self.inputIndex} connection is down!")
return
Expand Down Expand Up @@ -114,7 +116,7 @@ def speed_task(self, *args, **kv):
self.speed = float(average * 60 / 25.4 / 12)
else:
# Speed in mt/minute
self.speed = float(average * 60 / 1000)
self.speed = float(average * 60 / 1000 / 1000)

self.previous_axis_time = current_time
self.previous_axis_pos = Decimal(self.position)
21 changes: 21 additions & 0 deletions rotary_controller_python/components/forms/boolean_item.kv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<BooleanItem>:
height: 36
size_hint_y: None
BoxLayout:
orientation: "horizontal"
Button:
size_hint_x: None
width: self.height
font_name: "fonts/Font Awesome 6 Free-Solid-900.otf"
font_size: 21
text: "\uf129"
Label:
size_hint_x: 0.7
text: root.name
ToggleButton:
size_hint_x: None
width: 250
multiline: False
text: 'ON' if root.value else 'OFF'
state: 'down' if root.value else 'normal'
on_release: root.value = True if self.state == 'down' else False
17 changes: 17 additions & 0 deletions rotary_controller_python/components/forms/boolean_item.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os

from kivy.lang import Builder
from kivy.logger import Logger
from kivy.properties import StringProperty, BooleanProperty
from kivy.uix.boxlayout import BoxLayout

log = Logger.getChild(__name__)
kv_file = os.path.join(os.path.dirname(__file__), __file__.replace(".py", ".kv"))
if os.path.exists(kv_file):
log.info(f"Loading KV file: {kv_file}")
Builder.load_file(kv_file)


class BooleanItem(BoxLayout):
name = StringProperty("")
value = BooleanProperty(False)
1 change: 1 addition & 0 deletions rotary_controller_python/components/forms/string_item.kv
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
width: 250
multiline: False
text: root.value
disabled: root.disabled
on_text_validate: root.value = self.text
Loading

0 comments on commit f32e28d

Please sign in to comment.