diff --git a/.github/workflows/Create-Release.yml b/.github/workflows/Create-Release.yml new file mode 100644 index 0000000..112e902 --- /dev/null +++ b/.github/workflows/Create-Release.yml @@ -0,0 +1,71 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Create Release + +jobs: + build: + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.7"] + + steps: + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + - name: Checkout Code + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest pyinstaller + pip install -r requirements.txt + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Package to .exe + run: | + mkdir build + cd build + pyinstaller -w -F ../hwa.py + cd ../ + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: HWA-Compiled + path: build/dist/hwa.exe + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset 1 + id: upload-release-asset-1 + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: build/dist/hwa.exe + asset_name: HWA-${{ steps.tag.outputs.tag }}.exe + asset_content_type: application/vnd.microsoft.portable-executable diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..1976272 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,48 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.7"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest pyinstaller + pip install -r requirements.txt + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Package to .exe + run: | + mkdir build + cd build + pyinstaller -w -F ../hwa.py + cd ../ + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: HWA-Compiled + path: build/dist/hwa.exe diff --git a/hwmonitor/ui/dialogs/rollback_changes_dialog.py b/hwmonitor/ui/dialogs/rollback_changes_dialog.py index 96d40e8..a85aa1c 100644 --- a/hwmonitor/ui/dialogs/rollback_changes_dialog.py +++ b/hwmonitor/ui/dialogs/rollback_changes_dialog.py @@ -9,7 +9,7 @@ def __init__(self, timeout=20, parent=None): super().__init__(parent) self.timeout = timeout - self.setWindowTitle("Änderung übernehmen?") + self.setWindowTitle("Keep Change?") self.setWindowFlags(Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint @@ -17,9 +17,9 @@ def __init__(self, timeout=20, parent=None): | Qt.WindowStaysOnTopHint) self.setIcon(QMessageBox.Warning) - self.setText("Ihre Desktop-Konfiguration hat sich geändert.\n" - "Möchten Sie diese Änderung beibehalten?") - self.setInformativeText(f"Rücksetzung in {self.timeout} Sekunden") + self.setText("Your desktop configuration has changed.\n" + "Would you like to keep this change?") + self.setInformativeText(f"Reverting in {self.timeout} Seconds") self.setStandardButtons(QMessageBox.Yes | QMessageBox.No) self.setDefaultButton(QMessageBox.No) @@ -36,4 +36,4 @@ def _update_countdown(self): if self.timeout == 0: self._timer.stop() self.defaultButton().animateClick() - self.setInformativeText(f"Rücksetzung in {self.timeout} Sekunden") + self.setInformativeText(f"Reverting in {self.timeout} Seconds")