From 761eb8f386f7736199d2e30be3b4954ef6fa0e9a Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 20 Feb 2022 22:46:54 +0100 Subject: [PATCH 01/16] Using external CI scripts --- .github/workflows/deploy.yml | 1 + .github/workflows/deploy_docs.yml | 1 + .github/workflows/testing.yml | 26 ++++---------------------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 27c3744..0aae9e8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -17,6 +17,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.9 + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 0d59f74..cfe4617 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -22,6 +22,7 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.9 + cache: 'pip' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a3afbe3..57fb9f1 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,26 +1,8 @@ -name: Testing and validation +name: Tests and docs on: [push, pull_request] jobs: - test: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.6, 3.7, 3.8, 3.9] - - steps: - - name: Check-out - 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: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Run all tests - run: python setup.py test -p py${{ matrix.python-version }} + tests: + name: Tests + uses: Bernardo-MG/github-workflow/.github/workflows/python_testing.yml@develop \ No newline at end of file From 69113420572dc58de5c45505d780278b11908a5d Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 20 Feb 2022 23:17:16 +0100 Subject: [PATCH 02/16] Fixed URLs to use HTTPS --- README.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 9c69cb1..63b04fa 100644 --- a/README.rst +++ b/README.rst @@ -19,10 +19,10 @@ operating with it on any Python application. :alt: Dice Notation Tools for Python Pypi package page .. image:: https://img.shields.io/badge/docs-release-blue.svg - :target: http://docs.bernardomg.com/dice-notation-python + :target: https://docs.bernardomg.com/dice-notation-python :alt: Dice Notation Tools for Python latest documentation .. image:: https://img.shields.io/badge/docs-develop-blue.svg - :target: http://docs.bernardomg.com/development/dice-notation-python + :target: https://docs.bernardomg.com/development/dice-notation-python :alt: Dice Notation Tools for Python development documentation Features @@ -146,9 +146,9 @@ License The project has been released under the `MIT License`_. .. _GitHub project page: https://github.com/Bernardo-MG/dice-notation-python -.. _latest docs: http://docs.bernardomg.com/dice-notation-python -.. _development docs: http://docs.bernardomg.com/development/dice-notation-python +.. _latest docs: https://docs.bernardomg.com/dice-notation-python +.. _development docs: https://docs.bernardomg.com/development/dice-notation-python .. _Pypi package: https://pypi.python.org/pypi/dice-notation -.. _MIT License: http://www.opensource.org/licenses/mit-license.php +.. _MIT License: https://opensource.org/licenses/mit-license.php .. _project issues tracker: https://github.com/Bernardo-MG/dice-notation-python/issues -.. _Sphinx: http://sphinx-doc.org/ +.. _Sphinx: https://www.sphinx-doc.org From feea653f3ad6c2ef7948fc0f0c572d5bfc8b3508 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 20 Feb 2022 23:22:48 +0100 Subject: [PATCH 03/16] Updated CI scripts --- .github/workflows/deploy.yml | 30 ++++---------------- .github/workflows/deploy_docs.yml | 46 ------------------------------- .github/workflows/testing.yml | 26 ++++++++++++++++- 3 files changed, 31 insertions(+), 71 deletions(-) delete mode 100644 .github/workflows/deploy_docs.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0aae9e8..726f872 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,27 +6,9 @@ on: - master jobs: - deploy_docs: - - runs-on: ubuntu-latest - - steps: - - name: Check-out - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - cache: 'pip' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Build distribution - run: python setup.py sdist bdist_wheel - - name: Deploy - run: twine upload -r pypi dist/* - env: - TWINE_USERNAME: ${{ secrets.DEPLOY_USER }} - TWINE_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }} + pypi: + name: Pypi + uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_pypi.yml@v1 + secrets: + username: ${{ secrets.DEPLOY_USER }} + password: ${{ secrets.DEPLOY_PASSWORD }} diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml deleted file mode 100644 index cfe4617..0000000 --- a/.github/workflows/deploy_docs.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Doc deployment - -on: - push: - branches: - - develop - - master - -jobs: - deploy_docs: - - runs-on: ubuntu-latest - - steps: - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Check-out - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - cache: 'pip' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 pytest - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Install sshpass - run: sudo apt-get install sshpass - - name: Tests docs - run: python setup.py test -p docs - - name: Build docs - run: python setup.py build_docs - - name: Deploy development docs - if: steps.extract_branch.outputs.branch == 'develop' - run: | - cd ./build/sphinx/html - sshpass -p "${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }}" scp -o 'StrictHostKeyChecking no' -P "${{ secrets.DEPLOY_DOCS_PORT }}" -r ./* "${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}@${{ secrets.DEPLOY_DOCS_HOST }}:${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}"; - - name: Deploy release docs - if: steps.extract_branch.outputs.branch == 'master' - run: | - cd ./build/sphinx/html - sshpass -p "${{ secrets.DEPLOY_DOCS_PASSWORD }}" scp -o 'StrictHostKeyChecking no' -P "${{ secrets.DEPLOY_DOCS_PORT }}" -r ./* "${{ secrets.DEPLOY_DOCS_USER }}@${{ secrets.DEPLOY_DOCS_HOST }}:${{ secrets.DEPLOY_DOCS_PATH }}"; diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 57fb9f1..70428ab 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -5,4 +5,28 @@ on: [push, pull_request] jobs: tests: name: Tests - uses: Bernardo-MG/github-workflow/.github/workflows/python_testing.yml@develop \ No newline at end of file + uses: Bernardo-MG/github-workflow/.github/workflows/python_testing.yml@develop + + deploy_develop_docs: + name: Deploy development docs + needs: tests + uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_site.yml@develop + with: + branch: develop + host: docs.bernardomg.com + secrets: + url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} + username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} + password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} + + deploy_docs: + name: Deploy docs + needs: tests + uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_site.yml@develop + with: + branch: master + host: docs.bernardomg.com + secrets: + url: ${{ secrets.DEPLOY_DOCS_SITE }} + username: ${{ secrets.DEPLOY_DOCS_USER }} + password: ${{ secrets.DEPLOY_DOCS_PASSWORD }} \ No newline at end of file From bc3cc3ccdb35a1e2e60585fdaf4b4b6e3d892d46 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 20 Feb 2022 23:24:02 +0100 Subject: [PATCH 04/16] Added missing secrets --- .github/workflows/testing.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 70428ab..848f6c9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,6 +16,8 @@ jobs: host: docs.bernardomg.com secrets: url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} + port: ${{ secrets.DEPLOY_DOCS_DEVELOP_PORT }} + path: ${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }} username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} @@ -28,5 +30,7 @@ jobs: host: docs.bernardomg.com secrets: url: ${{ secrets.DEPLOY_DOCS_SITE }} + port: ${{ secrets.DEPLOY_DOCS_PORT }} + path: ${{ secrets.DEPLOY_DOCS_PATH }} username: ${{ secrets.DEPLOY_DOCS_USER }} password: ${{ secrets.DEPLOY_DOCS_PASSWORD }} \ No newline at end of file From 1c9c8ef3b2e12baacac8298332e78780b4af8615 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Sun, 20 Feb 2022 23:25:07 +0100 Subject: [PATCH 05/16] Removed unused secret --- .github/workflows/testing.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 848f6c9..4dda875 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,7 +15,6 @@ jobs: branch: develop host: docs.bernardomg.com secrets: - url: ${{ secrets.DEPLOY_DOCS_DEVELOP_SITE }} port: ${{ secrets.DEPLOY_DOCS_DEVELOP_PORT }} path: ${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }} username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} @@ -29,7 +28,6 @@ jobs: branch: master host: docs.bernardomg.com secrets: - url: ${{ secrets.DEPLOY_DOCS_SITE }} port: ${{ secrets.DEPLOY_DOCS_PORT }} path: ${{ secrets.DEPLOY_DOCS_PATH }} username: ${{ secrets.DEPLOY_DOCS_USER }} From 29a86b99e96797125506bf340da0bbe40ccad24e Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:10:54 +0100 Subject: [PATCH 06/16] No longer using action to deploy site --- .github/workflows/testing.yml | 90 ++++++++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 22 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4dda875..e70b9cb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -7,28 +7,74 @@ jobs: name: Tests uses: Bernardo-MG/github-workflow/.github/workflows/python_testing.yml@develop - deploy_develop_docs: - name: Deploy development docs + setup_docs: + name: Doc deployment preparation needs: tests - uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_site.yml@develop - with: - branch: develop - host: docs.bernardomg.com - secrets: - port: ${{ secrets.DEPLOY_DOCS_DEVELOP_PORT }} - path: ${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }} - username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }} - password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} + outputs: + branchName: ${{ steps.extract_branch.outputs.branchName }} + runs-on: ubuntu-latest + + steps: + - name: Install sshpass + run: sudo apt-get install sshpass + - name: Extract branch name + uses: bernardo-mg/extract-branch-name-action@v1 + id: extract_branch deploy_docs: - name: Deploy docs - needs: tests - uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_site.yml@develop - with: - branch: master - host: docs.bernardomg.com - secrets: - port: ${{ secrets.DEPLOY_DOCS_PORT }} - path: ${{ secrets.DEPLOY_DOCS_PATH }} - username: ${{ secrets.DEPLOY_DOCS_USER }} - password: ${{ secrets.DEPLOY_DOCS_PASSWORD }} \ No newline at end of file + name: Deploy development docs + environment: deployment_site + needs: setup_docs + runs-on: ubuntu-latest + if: ${{ needs.setup_docs.outputs.branchName == 'master' }} + steps: + - name: Check-out + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + cache: 'pip' + - name: Update pip + run: python -m pip install --upgrade pip + - name: Install dependencies + run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install sshpass + run: sudo apt-get install sshpass + - name: Tests docs + run: python setup.py test -p docs + - name: Build docs + run: python setup.py build_docs + - name: Move to deployment folder + run: cd ./build/sphinx/html + - name: Deploy docs + run: sshpass -p ${{ secrets.DEPLOY_DOCS_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./src ${{ secrets.DEPLOY_DOCS_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_PATH }}; + + deploy_develop_docs: + name: Deploy development docs + environment: deployment_site + needs: setup_docs + runs-on: ubuntu-latest + if: ${{ needs.setup_docs.outputs.branchName == 'master' }} + steps: + - name: Check-out + uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + cache: 'pip' + - name: Update pip + run: python -m pip install --upgrade pip + - name: Install dependencies + run: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Install sshpass + run: sudo apt-get install sshpass + - name: Tests docs + run: python setup.py test -p docs + - name: Build docs + run: python setup.py build_docs + - name: Move to deployment folder + run: cd ./build/sphinx/html + - name: Deploy docs + run: sshpass -p ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./src ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}; From 762a4e5115aa0a8caf724682c85d425811aacf14 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:21:55 +0100 Subject: [PATCH 07/16] Parsing the grammar generates a rollable dice --- dice_notation/parser/DiceNotationListener.py | 4 +-- .../parser/dice/test_dice_parser_dice_roll.py | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 tests/parser/dice/test_dice_parser_dice_roll.py diff --git a/dice_notation/parser/DiceNotationListener.py b/dice_notation/parser/DiceNotationListener.py index d065ad4..d55f7c5 100644 --- a/dice_notation/parser/DiceNotationListener.py +++ b/dice_notation/parser/DiceNotationListener.py @@ -2,7 +2,7 @@ from antlr4 import * import logging -from dice_notation.dice import Dice +from dice_notation.dice import RollableDice from dice_notation.algebra import BinaryOperation, Number # This class defines a complete listener for a parse tree produced by DiceNotationParser. @@ -125,7 +125,7 @@ def exitDice(self, ctx): sides = int(next(digits).getText()) - dice = Dice(quantity, sides) + dice = RollableDice(quantity, sides) self._nodes.append(dice) diff --git a/tests/parser/dice/test_dice_parser_dice_roll.py b/tests/parser/dice/test_dice_parser_dice_roll.py new file mode 100644 index 0000000..b6bf5f8 --- /dev/null +++ b/tests/parser/dice/test_dice_parser_dice_roll.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- + +import sys +import unittest + +from dice_notation.parser import DiceParser + +""" +Dice parser tests for expressions only containing dice. +""" + +__author__ = 'Bernardo Martínez Garrido' +__license__ = 'MIT' + + +class TestSimpleDice(unittest.TestCase): + """ + Tests that simple dice expressions can be parsed. + """ + + def setUp(self): + """ + Initializes parser. + """ + self.parser = DiceParser() + + def test_minimalDice(self): + """ + Tests that the minimal dice can be rolled. + """ + result = self.parser.parse("1d1").roll() + + self.assertEqual(1, result) From 7c9f8b64a1d4fc2139f6a8d0a9d7bc46de5a869e Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:31:11 +0100 Subject: [PATCH 08/16] Updated dependencies --- requirements.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/requirements.txt b/requirements.txt index 05e3c8b..4b68a6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,17 +1,17 @@ # Installation and deployment -setuptools==54.2.0 -wheel==0.36.2 -twine==3.4.1 -bernardomg.tox-test-command==1.1.6 -bernardomg.version-extractor==1.0.3 +setuptools==60.9.3 +wheel==0.37.1 +twine==3.8.0 +bernardomg.tox-test-command==1.2.0 +bernardomg.version-extractor==1.1.0 # Testing -tox==3.23.0 +tox==3.24.5 # Documentation -Sphinx==3.5.3 +Sphinx==4.4.0 sphinx-docs-theme==1.0.7 -Pygments==2.8.1 +Pygments==2.11.2 # Parsing -antlr4-python3-runtime==4.7.2 +antlr4-python3-runtime==4.9.3 From 12fa24bab64ab29226f69d072980bc5ea328fe2c Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:32:38 +0100 Subject: [PATCH 09/16] Lowered dependency --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4b68a6a..6b4aabf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Installation and deployment -setuptools==60.9.3 +setuptools==59.6.0 wheel==0.37.1 twine==3.8.0 bernardomg.tox-test-command==1.2.0 From 6577f7b15f3cf3629ee4e5208a42e063ecd71aae Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:37:43 +0100 Subject: [PATCH 10/16] Fixed check --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e70b9cb..9642d28 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -55,7 +55,7 @@ jobs: environment: deployment_site needs: setup_docs runs-on: ubuntu-latest - if: ${{ needs.setup_docs.outputs.branchName == 'master' }} + if: ${{ needs.setup_docs.outputs.branchName == 'develop' }} steps: - name: Check-out uses: actions/checkout@v2 From f9d33cd317f11779b5b95604e4b3103b9e271aa0 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:42:12 +0100 Subject: [PATCH 11/16] Fixed site setup --- docs/source/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index bf6115f..d2a4f8f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -93,7 +93,8 @@ html_theme_path = sphinx_docs_theme.get_html_theme_path() # Removes permalink markers -html_add_permalinks = '' +html_permalinks = False +html_permalinks_icon = '' # Theme options. html_theme_options = { From 8c4c6de1425d05965e5b6289f1f4b3cd7b614728 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:47:13 +0100 Subject: [PATCH 12/16] Fixed deployed path --- .github/workflows/testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 9642d28..4df7afe 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -48,7 +48,7 @@ jobs: - name: Move to deployment folder run: cd ./build/sphinx/html - name: Deploy docs - run: sshpass -p ${{ secrets.DEPLOY_DOCS_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./src ${{ secrets.DEPLOY_DOCS_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_PATH }}; + run: sshpass -p ${{ secrets.DEPLOY_DOCS_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./ ${{ secrets.DEPLOY_DOCS_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_PATH }}; deploy_develop_docs: name: Deploy development docs @@ -77,4 +77,4 @@ jobs: - name: Move to deployment folder run: cd ./build/sphinx/html - name: Deploy docs - run: sshpass -p ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./src ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}; + run: sshpass -p ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./ ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}; From 65066a5b42932fb22b450f5c3c5c0b3969fae899 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 20:55:25 +0100 Subject: [PATCH 13/16] Registered new python version for tests --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1214a75..f73ad48 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{3.6,3.7,3.8,3.9}, + py{3.6,3.7,3.8,3.9,3.10}, check, docs skip_missing_interpreters = From e1690f006d96fdd4056269b760fe8715b47b9210 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 21:04:26 +0100 Subject: [PATCH 14/16] Changed test library --- .coveragerc | 1 - .gitignore | 1 - tox.ini | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.coveragerc b/.coveragerc index b2ddda4..4fa2401 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,5 +1,4 @@ [report] omit = */python?.?/* - */site-packages/nose/* *__init__* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 18ffc25..1cef179 100644 --- a/.gitignore +++ b/.gitignore @@ -42,7 +42,6 @@ htmlcov/ .tox/ .coverage .cache -nosetests.xml coverage.xml # Translations diff --git a/tox.ini b/tox.ini index f73ad48..cc7eb26 100644 --- a/tox.ini +++ b/tox.ini @@ -10,9 +10,9 @@ skip_missing_interpreters = # Default environment deps = -r{toxinidir}/requirements.txt - nose + pytest commands = - nosetests + pytest [testenv:check] # Checks code rules From 68a058c923e871326dd6a384cf3b9aa2bec74398 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 21:08:03 +0100 Subject: [PATCH 15/16] Raised version --- dice_notation/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dice_notation/__init__.py b/dice_notation/__init__.py index 5c539a2..64ff6e4 100644 --- a/dice_notation/__init__.py +++ b/dice_notation/__init__.py @@ -7,5 +7,5 @@ :license: MIT, see LICENSE for more details. """ -__version__ = '1.2.0' +__version__ = '1.2.1' __license__ = 'MIT' From 6cd3cc371eac8d931ef25a0e29963f3f08ecc9d7 Mon Sep 17 00:00:00 2001 From: Bernardo Date: Mon, 28 Feb 2022 21:26:36 +0100 Subject: [PATCH 16/16] Changed deployment script --- .github/workflows/testing.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 4df7afe..95578ec 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -45,10 +45,10 @@ jobs: run: python setup.py test -p docs - name: Build docs run: python setup.py build_docs - - name: Move to deployment folder - run: cd ./build/sphinx/html - name: Deploy docs - run: sshpass -p ${{ secrets.DEPLOY_DOCS_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./ ${{ secrets.DEPLOY_DOCS_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_PATH }}; + run: | + cd ./build/sphinx/html + sshpass -p ${{ secrets.DEPLOY_DOCS_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./* ${{ secrets.DEPLOY_DOCS_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_PATH }}; deploy_develop_docs: name: Deploy development docs @@ -74,7 +74,7 @@ jobs: run: python setup.py test -p docs - name: Build docs run: python setup.py build_docs - - name: Move to deployment folder - run: cd ./build/sphinx/html - name: Deploy docs - run: sshpass -p ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./ ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}; + run: | + cd ./build/sphinx/html + sshpass -p ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }} scp -o StrictHostKeyChecking=no -P ${{ secrets.DEPLOY_DOCS_PORT }} -r ./* ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}'@'${{ secrets.DEPLOY_DOCS_HOST }}':'${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }};