Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Commit

Permalink
Add github action to automatically check jobs
Browse files Browse the repository at this point in the history
Added black, flake8. and building the python package.
  • Loading branch information
PraxTube committed May 15, 2023
1 parent fcf68df commit 5a18148
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/python-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Python Suite

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Check with black
run: |
black . --check
- name: Lint with flake8
run: |
flake8 . --count --statistics --show-source
- name: Build PyPi Package
run: |
python -m build
35 changes: 35 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,50 @@
black==23.3.0
bleach==6.0.0
blessed==1.20.0
build==0.10.0
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
colorama==0.4.6
commonmark==0.9.1
cryptography==40.0.2
docutils==0.19
flake8==6.0.0
idna==3.4
importlib-metadata==6.6.0
inquirer==3.1.3
jaraco.classes==3.2.3
jeepney==0.8.0
keyring==23.13.1
markdown-it-py==2.2.0
mccabe==0.7.0
mdurl==0.1.2
more-itertools==9.1.0
mypy-extensions==1.0.0
packaging==23.1
pathspec==0.11.1
pkginfo==1.9.6
platformdirs==3.5.1
pycodestyle==2.10.0
pycparser==2.21
pyflakes==3.0.1
Pygments==2.15.1
pyproject_hooks==1.0.0
python-editor==1.0.4
readchar==4.0.5
readme-renderer==37.3
requests==2.28.2
requests-toolbelt==0.10.1
rfc3986==2.0.0
rich==12.6.0
SecretStorage==3.3.3
shellingham==1.5.0.post1
six==1.16.0
tomli==2.0.1
twine==4.0.2
typer==0.7.0
urllib3==1.26.15
wcwidth==0.2.6
webencodings==0.5.1
zipp==3.15.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="assignment-manager",
version="0.1.6",
version="0.1.7",
description=("Manage reoccuring assignments and tasks."),
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion src/assignment_manager/assignments.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def add_assignment():
data = load_data()

if params[0] in data:
raise ValueError("Name already exists!", name, data.keys())
raise ValueError("Name already exists!", params[0], data.keys())

progress = generate_dates(params[1], params[2], params[3], params[4])
data[params[0]] = progress
Expand Down
5 changes: 4 additions & 1 deletion src/assignment_manager/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def get_backup_data_file_path():
def load_data():
if data_file_empty():
raise EOFError(
"The data file is empty. You should first add assignments before accessing them.",
(
"The data file is empty. "
"You should first add assignments before accessing them."
),
get_data_file_path(),
)
with open(get_data_file_path(), "r") as f:
Expand Down
2 changes: 0 additions & 2 deletions src/assignment_manager/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from datetime import datetime, timedelta

import typer

from assignment_manager import assignments
Expand Down

0 comments on commit 5a18148

Please sign in to comment.