From e5ea7b3855017b8303e643558270f1904a9809ab Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 31 Aug 2021 22:15:05 +0200 Subject: [PATCH 1/2] Make pyupgrade a mandatory test Signed-off-by: Christian Clauss --- .github/workflows/lint_python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index 4358ded..4a8e606 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -22,5 +22,5 @@ jobs: - run: mypy --ignore-missing-imports --install-types --non-interactive . - run: pytest . || true - run: pytest --doctest-modules . || true - - run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true + - run: shopt -s globstar && pyupgrade --py36-plus **/*.py - run: safety check From 5be8a7007b806804fe43443f81ef64d56ce8afe5 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 31 Aug 2021 22:34:35 +0200 Subject: [PATCH 2/2] Add a doctest to engage pytest Signed-off-by: Christian Clauss --- .github/workflows/lint_python.yml | 3 +-- dalton.py | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index 4a8e606..7050d23 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -20,7 +20,6 @@ jobs: - run: pip install -r requirements.txt || pip install --editable . || true - run: mkdir --parents --verbose .mypy_cache - run: mypy --ignore-missing-imports --install-types --non-interactive . - - run: pytest . || true - - run: pytest --doctest-modules . || true + - run: pytest --doctest-modules . - run: shopt -s globstar && pyupgrade --py36-plus **/*.py - run: safety check diff --git a/dalton.py b/dalton.py index 1ae4eab..8325698 100644 --- a/dalton.py +++ b/dalton.py @@ -30,6 +30,15 @@ def getOptions(): + """ + >>> opts = getOptions() + >>> "userOptions" in opts + True + >>> "inputMoleculeFormat" in opts + True + >>> len(opts["userOptions"]) + 6 + """ userOptions = {} userOptions['Title'] = {}