diff --git a/.github/workflows/python-suite.yml b/.github/workflows/python-suite.yml new file mode 100644 index 0000000..6d2c06e --- /dev/null +++ b/.github/workflows/python-suite.yml @@ -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 diff --git a/requirements.txt b/requirements.txt index 29061ef..b1210c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/setup.py b/setup.py index 3a730fd..90248bc 100644 --- a/setup.py +++ b/setup.py @@ -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", diff --git a/src/assignment_manager/assignments.py b/src/assignment_manager/assignments.py index 0d8e68a..3846ca3 100644 --- a/src/assignment_manager/assignments.py +++ b/src/assignment_manager/assignments.py @@ -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 diff --git a/src/assignment_manager/data.py b/src/assignment_manager/data.py index 89ec25a..ab0bacc 100644 --- a/src/assignment_manager/data.py +++ b/src/assignment_manager/data.py @@ -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: diff --git a/src/assignment_manager/main.py b/src/assignment_manager/main.py index 6b775c2..8d6c58d 100644 --- a/src/assignment_manager/main.py +++ b/src/assignment_manager/main.py @@ -1,5 +1,3 @@ -from datetime import datetime, timedelta - import typer from assignment_manager import assignments