diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..310e581 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Release + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + sudo apt-get install -y -qq gettext + python -m pip install --upgrade pip + pip install setuptools wheel django + - name: Build package + run: | + django-admin compilemessages + python setup.py sdist bdist_wheel + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1.4 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 305e458..017fbe9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,3 +3,7 @@ Changelog Development ----------- + +1.0.0 (2021-09-15) +------------------ +Initial Release diff --git a/MANIFEST.in b/MANIFEST.in index 43786a0..575c2fb 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ include LICENSE include README.rst include CHANGELOG.rst -recursive-include planning_poker_jira *.html *.js *.css *.png *.gif *.jpg *.jpeg *.svg *.po *.mo +recursive-include planning_poker_jira *.html *.po *.mo diff --git a/planning_poker_jira/version.py b/planning_poker_jira/version.py index 77814dc..0f357de 100644 --- a/planning_poker_jira/version.py +++ b/planning_poker_jira/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -* -__version__ = '0.1.0' # pragma: no cover +__version__ = '1.0.0' # pragma: no cover diff --git a/requirements/dev.txt b/requirements/dev.txt index 3a81e8a..b6c6d1c 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -11,7 +11,7 @@ asgiref==3.4.1 # channels # daphne # django -astroid==2.6.6 +astroid==2.7.3 # via pylint attrs==21.2.0 # via @@ -33,7 +33,7 @@ cffi==1.14.6 # via cryptography channels==3.0.4 # via planning-poker -charset-normalizer==2.0.4 +charset-normalizer==2.0.5 # via requests click==8.0.1 # via pip-tools @@ -43,7 +43,7 @@ coverage==5.5 # via # -r tox.in # pytest-cov -cryptography==3.4.7 +cryptography==3.4.8 # via # autobahn # pyopenssl @@ -53,7 +53,7 @@ daphne==3.0.2 # via channels defusedxml==0.7.1 # via jira -django==3.2.6 +django==3.2.7 # via # -r dev.in # channels @@ -63,7 +63,7 @@ django-channels-presence==1.0.0 # via planning-poker django-searchable-encrypted-fields==0.1.9 # via -r dev.in -docutils==0.16 +docutils==0.17.1 # via # sphinx # sphinx-rtd-theme @@ -80,7 +80,7 @@ idna==3.2 # twisted imagesize==1.2.0 # via sphinx -importlib-metadata==4.6.3 +importlib-metadata==4.8.1 # via keyring incremental==21.3.0 # via twisted @@ -100,7 +100,7 @@ jinja2==2.11.3 # sphinx-js jira==3.0.1 # via -r tox.in -keyring==23.0.1 +keyring==23.2.1 # via jira lazy-object-proxy==1.6.0 # via astroid @@ -122,9 +122,11 @@ pep517==0.11.0 # via pip-tools pip-tools==6.2.0 # via -r dev.in -planning-poker==0.3.2 +planning-poker==1.0.1 # via -r dev.in -pluggy==0.13.1 +platformdirs==2.3.0 + # via pylint +pluggy==1.0.0 # via pytest py==1.10.0 # via pytest @@ -144,15 +146,15 @@ pydocstyle==6.1.1 # via -r dev.in pyflakes==2.3.1 # via flake8 -pygments==2.9.0 +pygments==2.10.0 # via sphinx -pylint==2.9.6 +pylint==2.10.2 # via -r dev.in pyopenssl==20.0.1 # via twisted pyparsing==2.4.7 # via packaging -pytest==6.2.4 +pytest==6.2.5 # via # -r tox.in # pytest-cov @@ -192,14 +194,14 @@ snowballstemmer==2.1.0 # via # pydocstyle # sphinx -sphinx==4.1.2 +sphinx==4.2.0 # via # -r dev.in # sphinx-js # sphinx-rtd-theme sphinx-js==3.1.2 # via -r dev.in -sphinx-rtd-theme==0.5.2 +sphinx-rtd-theme==1.0.0 # via -r dev.in sphinxcontrib-applehelp==1.0.2 # via sphinx @@ -213,7 +215,7 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -sqlparse==0.4.1 +sqlparse==0.4.2 # via django toml==0.10.2 # via @@ -226,7 +228,7 @@ twisted[tls]==21.7.0 # via daphne txaio==21.2.1 # via autobahn -typing-extensions==3.10.0.0 +typing-extensions==3.10.0.2 # via twisted urllib3==1.26.6 # via requests diff --git a/requirements/tox.txt b/requirements/tox.txt index 3d55045..d0361d9 100644 --- a/requirements/tox.txt +++ b/requirements/tox.txt @@ -12,13 +12,13 @@ certifi==2021.5.30 # via requests cffi==1.14.6 # via cryptography -charset-normalizer==2.0.4 +charset-normalizer==2.0.5 # via requests coverage==5.5 # via # -r tox.in # pytest-cov -cryptography==3.4.7 +cryptography==3.4.8 # via # autobahn # secretstorage @@ -30,7 +30,7 @@ idna==3.2 # via # hyperlink # requests -importlib-metadata==4.6.3 +importlib-metadata==4.8.1 # via keyring iniconfig==1.1.1 # via pytest @@ -40,13 +40,13 @@ jeepney==0.7.1 # secretstorage jira==3.0.1 # via -r tox.in -keyring==23.0.1 +keyring==23.2.1 # via jira oauthlib==3.1.1 # via requests-oauthlib packaging==21.0 # via pytest -pluggy==0.13.1 +pluggy==1.0.0 # via pytest py==1.10.0 # via pytest @@ -54,7 +54,7 @@ pycparser==2.20 # via cffi pyparsing==2.4.7 # via packaging -pytest==6.2.4 +pytest==6.2.5 # via # -r tox.in # pytest-cov diff --git a/setup.py b/setup.py index 5ea477f..6113bb6 100755 --- a/setup.py +++ b/setup.py @@ -10,8 +10,8 @@ from setuptools import find_packages, setup -def read(*args): - return open(join(dirname(__file__), *args)).read() +def read(*args, **kwargs): + return open(join(dirname(__file__), *args), **kwargs).read() class ToxTestCommand(distutils.cmd.Command): @@ -80,7 +80,7 @@ def run(self): name='planning-poker-jira', version=__version__, # noqa description='A jira extension for the planning poker app', - long_description=read('README.rst'), + long_description=read('README.rst', encoding='utf-8'), author='Rheinwerk Webteam', author_email='webteam@rheinwerk-verlag.de', maintainer='Rheinwerk Verlag GmbH Webteam', diff --git a/tests/test_forms.py b/tests/test_forms.py index f0fa3e7..069965a 100644 --- a/tests/test_forms.py +++ b/tests/test_forms.py @@ -1,4 +1,3 @@ -from contextlib import nullcontext as does_not_raise from unittest.mock import Mock, patch import pytest @@ -8,6 +7,13 @@ from planning_poker_jira.forms import (ExportStoryPointsForm, ImportStoriesForm, JiraAuthenticationForm, JiraConnectionForm) +try: + from contextlib import nullcontext as does_not_raise +except ImportError: + # Since there is no `nullcontext` in the 3.6 `contextlib`, `suppress` can be used with an empty constructor to mimic + # its behaviour. + from contextlib import suppress as does_not_raise + @pytest.fixture(params=['different_testuser', '']) def form_data_username(request): diff --git a/tests/test_models.py b/tests/test_models.py index 975fb2d..23b981a 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,9 +1,15 @@ -from contextlib import nullcontext as does_not_raise from unittest.mock import Mock, patch import pytest from jira import Issue, JIRAError +try: + from contextlib import nullcontext as does_not_raise +except ImportError: + # Since there is no `nullcontext` in the 3.6 `contextlib`, `suppress` can be used with an empty constructor to mimic + # its behaviour. + from contextlib import suppress as does_not_raise + class TestJiraConnection: @patch('planning_poker_jira.models.JIRA')