From 29bd5900ac73314c76843d4ee512614fdeb9bb8f Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 1 Sep 2021 14:23:44 +0200 Subject: [PATCH 01/12] Added a publish action which builds and uploads the package to PyPi. --- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ setup.py | 6 +++--- 2 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..3b4a326 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +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: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '12' + - name: Install dependencies + run: | + sudo apt-get install -y -qq gettext + python -m pip install --upgrade pip + npm install + pip install setuptools wheel django + - name: Build package + run: | + python manage.py compilemessages + python setup.py sdist bdist_wheel + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1.4 + with: + username: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/setup.py b/setup.py index 438e111..da797aa 100755 --- a/setup.py +++ b/setup.py @@ -12,8 +12,8 @@ from wheel.bdist_wheel import bdist_wheel -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): @@ -105,7 +105,7 @@ def command_factory(name, base_class): name='planning-poker', version=__version__, # noqa description='A Django app which allows teams to perform a remote planning poker session', - 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', From e94fbdbbd697a87c3165e22e508c9c0e106f3a34 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 8 Sep 2021 15:06:09 +0200 Subject: [PATCH 02/12] Updated the README.rst to use externally hosted links for the images. --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index fad9a61..dcd3e09 100755 --- a/README.rst +++ b/README.rst @@ -25,19 +25,19 @@ Features Screenshots ----------- -.. figure:: docs/static/ui_overview.png +.. figure:: https://raw.githubusercontent.com/rheinwerk-verlag/planning-poker/main/docs/static/ui_overview.png :width: 100% :alt: You can see all the necessary information on a single page You can see all the necessary information on a single page -.. figure:: docs/static/participants_overview.gif +.. figure:: https://raw.githubusercontent.com/rheinwerk-verlag/planning-poker/main/docs/static/participants_overview.gif :width: 100% :alt: Live updated list of participants Live updated list of participants -.. figure:: docs/static/dark_mode.png +.. figure:: https://raw.githubusercontent.com/rheinwerk-verlag/planning-poker/main/docs/static/dark_mode.png :width: 100% :alt: Natively supported dark mode From 288991f1b3d64585385db1d73c804cb706e3857b Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Fri, 10 Sep 2021 15:32:24 +0200 Subject: [PATCH 03/12] The GitHub repo prefix will now be converted to local paths when building the docs. --- docs/conf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 2fbe5f3..679a09c 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -312,12 +312,14 @@ class RepoImagePathTransform(SphinxTransform): to be removed from the paths when building the docs. """ default_priority = 409 + github_repo_prefix = 'https://raw.githubusercontent.com/rheinwerk-verlag/planning-poker/main/docs/' def apply(self, **kwargs): + github_repo_prefix_length = len(self.github_repo_prefix) for node in self.document.traverse(nodes.image): uri = node.attributes['uri'] - if uri.startswith('docs/'): - node.attributes['uri'] = uri[5:] + if uri.startswith(self.github_repo_prefix): + node.attributes['uri'] = uri[github_repo_prefix_length:] def setup(app): From b22b04ff9450ae8605077f6d1c80e9a071c8f39d Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Mon, 13 Sep 2021 08:15:39 +0200 Subject: [PATCH 04/12] Updated the docstring for the `RepoImagePathTransform` class. --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 679a09c..9e873cd 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -306,10 +306,10 @@ class RepoImagePathTransform(SphinxTransform): - """Remove the leading 'docs/' directory where possible from all image URIs. - The relative paths of the images in the 'README.rst' all start with the 'docs' directory in order to show them - on the repository overview page. Since the same readme file should also be used inside the docs, the directory has - to be removed from the paths when building the docs. + """Remove the leading GitHub repo prefix where possible from all image URLs. + The URLs of the images in the 'README.rst' all start with the prefix of the GitHub repo in order to show them on the + repository overview page and on PyPi. Since the same readme file should also be used inside the docs, the prefix + has to be removed from the paths when building the docs. """ default_priority = 409 github_repo_prefix = 'https://raw.githubusercontent.com/rheinwerk-verlag/planning-poker/main/docs/' From 88fe29e255b2b9d6ea9c7983e954f17f6a4e074a Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Mon, 13 Sep 2021 08:35:09 +0200 Subject: [PATCH 05/12] Changed 'URL' -> 'URI'. --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 9e873cd..4dbafb0 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -306,8 +306,8 @@ class RepoImagePathTransform(SphinxTransform): - """Remove the leading GitHub repo prefix where possible from all image URLs. - The URLs of the images in the 'README.rst' all start with the prefix of the GitHub repo in order to show them on the + """Remove the leading GitHub repo prefix where possible from all image URIs. + The URIs of the images in the 'README.rst' all start with the prefix of the GitHub repo in order to show them on the repository overview page and on PyPi. Since the same readme file should also be used inside the docs, the prefix has to be removed from the paths when building the docs. """ From 860a37a928f653fe7de0438675b1a005e72f4604 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Mon, 13 Sep 2021 09:28:38 +0200 Subject: [PATCH 06/12] Changed version to '1.0.0'. --- planning_poker/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planning_poker/version.py b/planning_poker/version.py index 1c297bd..21abbf6 100755 --- a/planning_poker/version.py +++ b/planning_poker/version.py @@ -1 +1 @@ -__version__ = '0.3.1' # pragma: no cover +__version__ = '1.0.0' # pragma: no cover From e1fa74ee1f35ed195088329ce8b333ce05d91399 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 15 Sep 2021 10:27:40 +0200 Subject: [PATCH 07/12] Changed the 'publish' workflow to run on 'push' in order to test it. --- .github/workflows/publish.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3b4a326..54cb7ff 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,6 @@ name: Release -on: - release: - types: [created] +on: push jobs: publish: @@ -25,7 +23,7 @@ jobs: pip install setuptools wheel django - name: Build package run: | - python manage.py compilemessages + django-admin compilemessages python setup.py sdist bdist_wheel - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1.4 From 803930c0da0c6e087ede407d7791bba2e7d74d83 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 15 Sep 2021 10:34:23 +0200 Subject: [PATCH 08/12] The workflow now once again runs whenever a new release is created. --- .github/workflows/publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 54cb7ff..bf17d49 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,8 @@ name: Release -on: push +on: + release: + types: [created] jobs: publish: @@ -28,5 +30,5 @@ jobs: - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1.4 with: - username: __token__ + user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} From 4c5bc8e5195cf585aeaa2cece881235721e8cd9a Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 15 Sep 2021 10:49:39 +0200 Subject: [PATCH 09/12] Updated the MANIFEST.in to exclude any unnecessary files. --- MANIFEST.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 668bd90..44d205b 100755 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include LICENSE include README.rst include CHANGELOG.rst -recursive-include planning_poker *.html *.js *.css *.png *.gif *.jpg *.jpeg *.svg *.po *.mo +recursive-include planning_poker *.html *.po *.mo +graft planning_poker/static From becf52188fa7c2c8cb4eb567ef383cfc675a7fe2 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 15 Sep 2021 13:42:06 +0200 Subject: [PATCH 10/12] Revert "Updated the MANIFEST.in to exclude any unnecessary files." This reverts commit 4c5bc8e5195cf585aeaa2cece881235721e8cd9a. --- MANIFEST.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 44d205b..668bd90 100755 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,4 @@ include LICENSE include README.rst include CHANGELOG.rst -recursive-include planning_poker *.html *.po *.mo -graft planning_poker/static +recursive-include planning_poker *.html *.js *.css *.png *.gif *.jpg *.jpeg *.svg *.po *.mo From f05c6bdf8ec96a029a42e30dec763e7f89401b24 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 15 Sep 2021 13:42:32 +0200 Subject: [PATCH 11/12] Removed 'publish' workflow. --- .github/workflows/publish.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index bf17d49..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,34 +0,0 @@ -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: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '12' - - name: Install dependencies - run: | - sudo apt-get install -y -qq gettext - python -m pip install --upgrade pip - npm install - 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 }} From 4e32eb61e5fc081717331ade758d8951dc30f9f2 Mon Sep 17 00:00:00 2001 From: Thomas Scheller Date: Wed, 15 Sep 2021 15:46:25 +0200 Subject: [PATCH 12/12] Fixed typo 'PyPi' -> 'PyPI'. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4dbafb0..0f79a4e 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -308,7 +308,7 @@ class RepoImagePathTransform(SphinxTransform): """Remove the leading GitHub repo prefix where possible from all image URIs. The URIs of the images in the 'README.rst' all start with the prefix of the GitHub repo in order to show them on the - repository overview page and on PyPi. Since the same readme file should also be used inside the docs, the prefix + repository overview page and on PyPI. Since the same readme file should also be used inside the docs, the prefix has to be removed from the paths when building the docs. """ default_priority = 409