From b47698d93ca97499c17e5fa5ed55b73047c3cf5f Mon Sep 17 00:00:00 2001 From: mgorsk1 Date: Sun, 11 Apr 2021 19:45:49 +0200 Subject: [PATCH] misc: Official release fixes docs and releases to official PyPI (instead of test PyPI) --- .github/workflows/pypi_publish.yml | 16 ++++++++-------- HISTORY.md | 1 - README.md | 8 ++++---- setup.py | 5 +++++ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pypi_publish.yml b/.github/workflows/pypi_publish.yml index 9296bf2..7ca8f7d 100644 --- a/.github/workflows/pypi_publish.yml +++ b/.github/workflows/pypi_publish.yml @@ -17,13 +17,13 @@ jobs: fetch-depth: 0 - name: Build package run: make build - - name: Publish dist to Test PyPI - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ -# - name: Publish dist to PyPI -# if: startsWith(github.ref, 'refs/tags') +# - name: Publish dist to Test PyPI # uses: pypa/gh-action-pypi-publish@master # with: -# password: ${{ secrets.PYPI_API_TOKEN }} +# password: ${{ secrets.TEST_PYPI_API_TOKEN }} +# repository_url: https://test.pypi.org/legacy/ + - name: Publish dist to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/HISTORY.md b/HISTORY.md index 891ee4a..289e323 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,4 +5,3 @@ #### New Features * initial development - diff --git a/README.md b/README.md index bdcf516..52cc5d6 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ ### What is Snooker ? -@todo +Following [Wikipedia's definition](https://en.wikipedia.org/wiki/Snooker): + + > Snooker (pronounced UK: /ˈsnuːkər/, US: /ˈsnʊkər/)[2][3] is a cue sport that was first played by British Army officers stationed in India in the second half of the 19th century. It is played on a rectangular table covered with a green cloth (or "baize"), with six pockets: one at each corner and one in the middle of each long side. Using a cue stick, the players[a] take turns to strike the white "cue ball" to pot the other twenty-one snooker balls in the correct sequence, accumulating points for each pot. An individual frame of snooker is won by the player who has scored the most points by the end of the frame. A snooker match ends with one of the players having won a predetermined number of frames, thus winning the match. ## Getting started @@ -38,9 +40,7 @@ print(player) Following [snooker.org API documentation](http://api.snooker.org/): -```baazar -If you plan to collect data automatically please contact us so we can agree on what you should put in the header. E.g. "X-Requested-By": "PetersAndroidApp". -``` +> If you plan to collect data automatically please contact us so we can agree on what you should put in the header. E.g. "X-Requested-By": "PetersAndroidApp". To achieve this, simply pass appropriate headers when instantiating the client: diff --git a/setup.py b/setup.py index 03ce6a9..050b489 100644 --- a/setup.py +++ b/setup.py @@ -5,14 +5,19 @@ __version__ = '0.1.0' requirements_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'requirements.txt') +readme_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'README.md') with open(requirements_path) as requirements_file: requirements = requirements_file.readlines() +with open(readme_path) as readme_file: + long_description = readme_file.read() + setup( name='snooker', version=__version__, description='Snooker Data API', + long_description=long_description, url='https://www.github.com/mgorsk1/snooker', maintainer='mgorsk1', maintainer_email='gorskimariusz13@gmail.com',