Skip to content

Commit

Permalink
Merge pull request #5 from rheinwerk-verlag/feature/publish_action
Browse files Browse the repository at this point in the history
Added a publish action
  • Loading branch information
W1ldPo1nter authored Sep 15, 2021
2 parents c80a813 + d77d196 commit 23a4f4d
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 29 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ Changelog

Development
-----------

1.0.0 (2021-09-15)
------------------
Initial Release
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion planning_poker_jira/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*

__version__ = '0.1.0' # pragma: no cover
__version__ = '1.0.0' # pragma: no cover
34 changes: 18 additions & 16 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -43,7 +43,7 @@ coverage==5.5
# via
# -r tox.in
# pytest-cov
cryptography==3.4.7
cryptography==3.4.8
# via
# autobahn
# pyopenssl
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions requirements/tox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -40,21 +40,21 @@ 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
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
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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',
Expand Down
8 changes: 7 additions & 1 deletion tests/test_forms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from contextlib import nullcontext as does_not_raise
from unittest.mock import Mock, patch

import pytest
Expand All @@ -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):
Expand Down
8 changes: 7 additions & 1 deletion tests/test_models.py
Original file line number Diff line number Diff line change
@@ -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')
Expand Down

0 comments on commit 23a4f4d

Please sign in to comment.