Skip to content

Commit

Permalink
Seperate workflows and run isort
Browse files Browse the repository at this point in the history
  • Loading branch information
Moosems committed May 11, 2024
1 parent d2365d6 commit d4d33cf
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11.1

- name: Code Formatting (App)
run: |
pip install ruff black isort pytest
pip install black
pip install -r requirements.txt
black --diff .
isort --diff .
ruff check . # Should all be different files so we get different errors
black -check .
18 changes: 18 additions & 0 deletions .github/workflows/isort.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Code Formatting

on: push

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11.1

- name: Code Formatting (App)
run: |
pip install isort
pip install -r requirements.txt
isort --check .
18 changes: 18 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Code Formatting

on: push

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11.1

- name: Code Formatting (App)
run: |
pip install ruff
pip install -r requirements.txt
ruff check .
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Code Formatting

on: push

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11.1

- name: Code Formatting (App)
run: |
pip install pytest
pip install -r requirements.txt
pytest .
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
from tkinter.ttk import Button, Combobox, Entry, Frame, Label
from webbrowser import open as openwebpage

from dialogs import Messagebox
from platformdirs import user_data_dir
from pyowm import OWM
from pyowm.commons.exceptions import APIRequestError, InvalidSSLCertificateError
from pyowm.commons.exceptions import (APIRequestError,
InvalidSSLCertificateError)
from pyowm.commons.exceptions import NotFoundError as OWMNotFoundError
from pyowm.commons.exceptions import TimeoutError
from requests import Response
from requests import get as requests_get
from sv_ttk import set_theme

from dialogs import Messagebox

VERSION = "0.1"

# Create constant
Expand Down

0 comments on commit d4d33cf

Please sign in to comment.