Skip to content

Commit

Permalink
Fixes keg metric pouring unit (#9)
Browse files Browse the repository at this point in the history
* Trigger upload of package on released pusblished

* Fixes keg metric pouring unit

* Updates workflow actions

* Bump aiohttp
  • Loading branch information
JohNan authored Nov 13, 2024
1 parent d60d5f3 commit c7212b8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand All @@ -43,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
4 changes: 2 additions & 2 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
unti_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion pyplaato/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
UNIT_TEMP_FAHRENHEIT = "°F"
UNIT_PERCENTAGE = "%"
UNIT_OZ = "oz"
UNIT_ML = "ml"
UNIT_LITRE = "l"
UNIT_BUBBLES_PER_MINUTE = "bpm"

METRIC = "1"
Expand Down
4 changes: 2 additions & 2 deletions pyplaato/models/keg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .device import PlaatoDevice, PlaatoDeviceType
from .pins import PinsBase
from ..const import UNIT_TEMP_CELSIUS, UNIT_TEMP_FAHRENHEIT, UNIT_PERCENTAGE, \
METRIC, UNIT_OZ, UNIT_ML
METRIC, UNIT_OZ, UNIT_LITRE


class PlaatoKeg(PlaatoDevice):
Expand Down Expand Up @@ -76,7 +76,7 @@ def last_pour(self):
@property
def last_pour_unit(self):
if self.__unit_type == METRIC:
return UNIT_ML
return UNIT_LITRE
return UNIT_OZ

@property
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
aiohttp==3.8.1
aiohttp~=3.9.5
python-dateutil==2.8.1

0 comments on commit c7212b8

Please sign in to comment.