diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..b13159a --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 120 +exclude = .git,__pycache__,venv \ No newline at end of file diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 547685f..a713615 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -6,15 +6,46 @@ on: - '*' jobs: + lint: + name: Python Linux (flake8) + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + + - name: Run Lint + run: flake8 --verbose --color auto --count --statistics --format=json --output-file=flake8-report.json || echo "::set-output name=flake8_failed::true" + continue-on-error: true + + - name: Upload Report + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: flake8-report + path: flake8-report.json + build_and_test: + name: Build and Test runs-on: windows-latest + needs: lint steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 194129a..30384e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,15 +8,16 @@ on: jobs: release_windows: + name: Release for Windows permissions: write-all runs-on: windows-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' @@ -53,15 +54,16 @@ jobs: Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}" -Method Patch -ContentType "application/json" -Headers $header -Body $json release_ubuntu: + name: Release for Ubuntu permissions: write-all runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' @@ -95,15 +97,16 @@ jobs: "https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}" release_rhel: + name: Release for Linux permissions: write-all runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/src/__init__.py b/src/__init__.py index 0dd0ebe..6f25fae 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -61,7 +61,7 @@ class Constants: """This class holds all the constant values used in the application""" APP_TITLE = 'M3U8 Downloader' # Title of the application - APP_VERSION = '0.1.0' # Version of the application + APP_VERSION = '0.1.1' # Version of the application APP_WINDOW_WIDTH = 450 # Width of the application window APP_WINDOW_HEIGHT = 250 # Height of the application window APP_PALETTE_BACKGROUND = '#FFFFFF' # Background color of the application @@ -475,7 +475,7 @@ def _open_license(self, event) -> None: def main(): root = tk.Tk() - app = M3U8DownloaderUI(root) + M3U8DownloaderUI(root) root.mainloop()