Skip to content

Commit

Permalink
improve project
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamBergamin committed May 29, 2024
1 parent a883804 commit 5b386d0
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 41 deletions.
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ updates:
interval: "monthly"
labels:
- "pip"
- "dependencies"
- "dependencies"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
32 changes: 16 additions & 16 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Formatting validation using black

on:
push:
branches: [ main ]
branches: [main]
pull_request:

jobs:
Expand All @@ -11,19 +11,19 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: ['3.9']
python-version: ["3.12"]

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: |
pip install -U pip
pip install -r requirements.txt
- name: Format with black
run: |
black .
if git status --porcelain | grep .; then git --no-pager diff; exit 1; fi
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip
pip install -r requirements.txt
- name: Format with black
run: |
black .
if git status --porcelain | grep .; then git --no-pager diff; exit 1; fi
30 changes: 15 additions & 15 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Linting validation using flake8

on:
push:
branches: [ main ]
branches: [main]
pull_request:

jobs:
Expand All @@ -11,18 +11,18 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: ['3.9']
python-version: ["3.12"]

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: |
pip install -U pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 *.py
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
flake8 *.py
28 changes: 28 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linting validation using flake8

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest .
1 change: 0 additions & 1 deletion jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class JiraClient:

def __init__(
self,
token: Optional[str] = None,
Expand Down
1 change: 0 additions & 1 deletion oauth/installation_store/installation_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


class InstallationStore:

def save(self, installation: JiraInstallation):
"""Saves an installation data"""
raise NotImplementedError()
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
slack-cli-hooks
slack-bolt==1.19.0rc1
pytest
flake8==7.0.0
black==23.12.1
requests==2.31.0
Flask==3.0.3
pytest==8.2
flake8==7.0
black==24.4
requests==2.32
Flask==3.0
2 changes: 1 addition & 1 deletion tests/functions/test_create_issue.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import datetime
import json
import logging
import os
from datetime import datetime
from unittest.mock import MagicMock, patch

import requests
Expand Down
2 changes: 1 addition & 1 deletion tests/mock_installation_store.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from logging import Logger
import logging
from logging import Logger
from typing import Dict, Optional

from oauth.installation_store.installation_store import InstallationStore
Expand Down

0 comments on commit 5b386d0

Please sign in to comment.