diff --git a/.editorconfig b/.editorconfig index 3b0653a..941e639 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,7 @@ root = true [*] -indent_style = space +indent_style = tab indent_size = 4 end_of_line = lf charset = utf-8 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3a2bae0 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +install-development: + python3 -m venv venv + ./venv/bin/pip install -e .[dev] + +clean: + rm -rf venv + rm -rf build + rm -rf dist + rm -rf *.egg-info + +test: + ./venv/bin/python -m unittest discover tests + +build-docs: + mkdocs build + +deploy: + python setup.py sdist bdist_wheel + git tag $(cat .version) + git push -u origin $(cat .version) + twine upload dist/* \ No newline at end of file diff --git a/bin/build_doc.sh b/bin/build_doc.sh deleted file mode 100755 index b31a79b..0000000 --- a/bin/build_doc.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# Get working dir (this will make sure that the script will work the same anywhere you run it) -WK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $WK_DIR -cd .. - -mkdocs build \ No newline at end of file diff --git a/bin/clean.sh b/bin/clean.sh deleted file mode 100755 index 56a2f94..0000000 --- a/bin/clean.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Get working dir (this will make sure that the script will work the same anywhere you run it) -WK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $WK_DIR -cd .. - -rm build -rf -rm dist -rf -rm pdfmajor.egg-info -rf \ No newline at end of file diff --git a/bin/deploy_pip.sh b/bin/deploy_pip.sh deleted file mode 100755 index f35a461..0000000 --- a/bin/deploy_pip.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Get working dir (this will make sure that the script will work the same anywhere you run it) -WK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $WK_DIR -cd .. - -./bin/clean.sh - - -if ./bin/run_tests.sh; then - python setup.py sdist bdist_wheel - - git add . - git commit - git push - - git tag $(cat .version) - git push -u origin $(cat .version) - - twine upload dist/* -else - echo ">>> Stopped due to test failure!" -fi diff --git a/bin/run_tests.sh b/bin/run_tests.sh deleted file mode 100755 index cf27132..0000000 --- a/bin/run_tests.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# Get working dir (this will make sure that the script will work the same anywhere you run it) -WK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $WK_DIR -cd .. - -# for filename in ./tests/test*.py; do -# if python $filename ; then -# echo woohoo -# else -# exit 1 -# fi -# done - -if python ./test.py ; then - echo "PASSED TESTS" -else - exit 1 -fi \ No newline at end of file diff --git a/setup.py b/setup.py index ea5a4b0..35115e3 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ with open('README.md') as readme_file: "version": "1.3.13", "packages": find_packages(include=['pdfmajor*']), "install_requires": [ - 'pycryptodome==3.8.2', + 'pycryptodome==3.8.2', 'chardet==3.0.4', 'Pillow>=6.2.0' ], diff --git a/test.py b/test.py deleted file mode 100644 index 195ca73..0000000 --- a/test.py +++ /dev/null @@ -1,4 +0,0 @@ -from unittest import TestLoader, TextTestRunner - -tests = TestLoader().discover('./tests') -result = TextTestRunner(verbosity=20).run(tests) \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29