Repository: FM-17/poglink (language: python)

Issue:
ci docker pushrm
Adds readme publishing to CI scripts.
ci docker pushrm
Adds readme publishing to CI scripts.


Discussion / hints:
@FM-17 if you decide you want the description auto published to docker hub, then you can update the repository secrets to be your username / password, and this CI should work. 
@FM-17 if you change the secrets appropriately here, you only need to re-run the latest github actions run, no need to make any commit changes to this branch.
@FM-17 if you decide you want the description auto published to docker hub, then you can update the repository secrets to be your username / password, and this CI should work. 
@FM-17 if you change the secrets appropriately here, you only need to re-run the latest github actions run, no need to make any commit changes to this branch.

Fix patch:
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index d6bc12a..e91589e 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -33,7 +33,7 @@ jobs:
             requirements.dev.txt
       - run: pip install -r requirements.dev.txt .
       - name: Run Black Linting
-        run: black --check ark_discord_bot tests
+        run: black --check poglink tests
 
   semantic-release-python:
     runs-on: ubuntu-latest
@@ -90,13 +90,13 @@ jobs:
         with:
           user: __token__
           password: ${{ secrets.PYPI_TEST_API_TOKEN }}
-          repository_url: https://test.pypi.org/legacy/
 
   publish-release-docker:
     runs-on: ubuntu-latest
     needs: semantic-release-python
     if: ${{ needs.semantic-release-python.outputs.package_version }}
     steps:
+      - uses: actions/checkout@v2.4.0
       - name: Set up docker engine 
         uses: docker/setup-buildx-action@v1
       - name: Log in to Dockerhub
@@ -111,14 +111,22 @@ jobs:
           build-args: |
             PYTHON_PACKAGE_VERSION=${{ needs.semantic-release-python.outputs.package_version}}
           tags: |
-            ${{ secrets.DOCKERHUB_USERNAME }}/ark-discord-bot:latest
-            ${{ secrets.DOCKERHUB_USERNAME }}/ark-discord-bot:${{ needs.semantic-release-python.outputs.package_version}}
+            ${{ secrets.DOCKERHUB_USERNAME }}/poglink:latest
+            ${{ secrets.DOCKERHUB_USERNAME }}/poglink:${{ needs.semantic-release-python.outputs.package_version}}
+      - name: Push Readme 
+        uses: peter-evans/dockerhub-description@v2
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+          repository: ${{ secrets.DOCKERHUB_USERNAME }}/poglink
+          short-description: ${{ github.event.repository.description }}
 
   publish-non-release-docker:
     runs-on: ubuntu-latest
     if: github.event_name == 'pull_request'
     needs: publish-non-release-python
     steps:
+      - uses: actions/checkout@v2.4.0
       - name: Set up docker engine 
         uses: docker/setup-buildx-action@v1
       - name: Log in to Dockerhub
@@ -131,7 +139,14 @@ jobs:
         with: 
           push: true
           tags: |
-            ${{ secrets.DOCKERHUB_USERNAME }}/ark-discord-bot:dev
-            ${{ secrets.DOCKERHUB_USERNAME }}/ark-discord-bot:${{ github.sha }}
-            ${{ secrets.DOCKERHUB_USERNAME }}/ark-discord-bot:${{ needs.publish-non-release-python.outputs.package_version || 'dev' }}
+            ${{ secrets.DOCKERHUB_USERNAME }}/poglink:dev
+            ${{ secrets.DOCKERHUB_USERNAME }}/poglink:${{ github.sha }}
+            ${{ secrets.DOCKERHUB_USERNAME }}/poglink:${{ needs.publish-non-release-python.outputs.package_version || 'dev' }}
+      - name: Push Readme 
+        uses: peter-evans/dockerhub-description@v2
+        with:
+          username: ${{ secrets.DOCKERHUB_USERNAME }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+          repository: ${{ secrets.DOCKERHUB_USERNAME }}/poglink
+          short-description: ${{ github.event.repository.description }}
 
diff --git a/.releaserc.json b/.releaserc.json
index f7b1a92..cf9f47b 100644
--- a/.releaserc.json
+++ b/.releaserc.json
@@ -5,7 +5,7 @@
         "@semantic-release/github",
         [
             "@semantic-release/exec", {
-                "publishCmd": "make python-publish-test"
+                "publishCmd": "make python-publish-prod"
             }
         ]
     ]
diff --git a/Dockerfile b/Dockerfile
index d53eee6..84b338b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,7 +9,7 @@ RUN pip install --upgrade pip \
         --wheel-dir /tmp/wheels
 
 # Build application
-COPY ark_discord_bot ./ark_discord_bot
+COPY poglink ./poglink
 COPY setup.py .
 COPY README.md .
 ARG PYTHON_PACKAGE_VERSION=0.0.1
@@ -28,7 +28,7 @@ RUN pip install --upgrade pip \
     && pip install \
         -r requirements.txt \
         --no-index \
-        ark_discord_bot \
+        poglink \
         --find-links /tmp/wheels \
     && rm -r \
         requirements.txt \
diff --git a/Makefile b/Makefile
index a2b6187..71d8402 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ all: help
 ##	Automatically format project code with black.
 .PHONY: lint 
 lint:
-	black ark_discord_bot tests
+	black poglink tests
 
 ## - test
 ##	Run pytest tests.
diff --git a/README.md b/README.md
index b29af40..962685d 100644
--- a/README.md
+++ b/README.md
@@ -19,59 +19,59 @@ There are a few different ways to run this bot on your own machine. Either in yo
 
 - Before installing, copy `sample_config.yaml`, rename it to `config.yaml`, and fill in the required values.
 
-- You'll also need to decide where you want to store this configuration file. By default, the bot will look for it in `~/.ark-discord-bot`, but you can change the location via the `-d` CLI argument. 
+- You'll also need to decide where you want to store this configuration file. By default, the bot will look for it in `~/.poglink`, but you can change the location via the `-d` CLI argument. 
 
 - Whether you decide to use the default location, or a custom one, you'll need to move the `config.yaml` file to that directory before running.
 
-- For example, if you chose to use the default, you'd need to move the `config.yaml` file to `~/.ark-discord-bot/config.yaml`
+- For example, if you chose to use the default, you'd need to move the `config.yaml` file to `~/.poglink/config.yaml`
 
 #### Installing from PyPi
 
 Run the following command to install from PyPi
 
-    pip install ark-discord-bot
+    pip install poglink
     
 #### Installing from Git repo
 1. Get the code via either of the following two methods:
 
-    a) Download & extract the [latest bot release](https://github.com/FM-17/ark_discord_bot/releases/latest)
+    a) Download & extract the [latest bot release](https://github.com/FM-17/poglink/releases/latest)
 
-    b) Clone the repo via `git clone https://github.com/FM-17/ark_discord_bot.git` 
+    b) Clone the repo via `git clone https://github.com/FM-17/poglink.git` 
 
 2. Install the bot
     
     I'd suggest doing this within a virtual environment via [pyenv](https://github.com/pyenv/pyenv) or [virtualenv](https://pypi.org/project/virtualenv/), but its not required.
     ```bash
-    cd {download location}/ark-discord-bot/
+    cd {download location}/poglink/
     pip install .
     ```
 
 ### Running in Python
 
 To run the bot in Python you can either:
-1. Execute via the CLI entrypoint: `ark-discord-bot`, passing config parameters any of the ways described below; or
-2. Import within your own Python code and execute `ark_discord_bot.main.run`, passing in configuration parameters as keyword arguments.
+1. Execute via the CLI entrypoint: `poglink`, passing config parameters any of the ways described below; or
+2. Import within your own Python code and execute `poglink.main.run`, passing in configuration parameters as keyword arguments.
 
 ### Installing in Docker
 Run the following command to pull the latest docker image
 ```
-docker pull travipross/ark-discord-bot
+docker pull fm17/poglink
 ```
 
 ### Running in Docker / Docker Compose
-To run in a container, you can simply execute `docker run fm17/ark-discord-bot`, passing in any relevant configuration parameters as environment variables. In order to pass in a configuration file or to maintain persistent data between containers, mount a volume to the `/data` dir inside the container (or whichever data directory is configured via the `--data-dir` CLI argument or the `BOT_DATA_DIR` environment variable). 
+To run in a container, you can simply execute `docker run fm17/poglink`, passing in any relevant configuration parameters as environment variables. In order to pass in a configuration file or to maintain persistent data between containers, mount a volume to the `/data` dir inside the container (or whichever data directory is configured via the `--data-dir` CLI argument or the `BOT_DATA_DIR` environment variable). 
 
-In the example below, the host's `~/.ark-discord-bot` directory has been mounted to the container's `/data` directory. Therefore the `config.yaml` file must be moved to the `~/.ark-discord-bot` directory in order to be passed into the container. Both of these mounting directories can be modified as needed, see [Configuration](#configuration) for more details.
+In the example below, the host's `~/.poglink` directory has been mounted to the container's `/data` directory. Therefore the `config.yaml` file must be moved to the `~/.poglink` directory in order to be passed into the container. Both of these mounting directories can be modified as needed, see [Configuration](#configuration) for more details.
 
 Example `docker-compose.yaml`
 ```yaml
 version: "3"
 services:
   bot:
-    image: fm17/ark-discord-bot:latest
-    container_name: ark-discord-bot
+    image: fm17/poglink:latest
+    container_name: poglink
     volumes:
-      - ~/.ark-discord-bot:/data
+      - ~/.poglink:/data
     command: "" # provide CLI args here
     networks:
       - bot-net
@@ -83,10 +83,10 @@ networks:
 ## Configuration
 This bot can pull configuration from one of multiple locations. Each parameter will be parsed independently in the following order of precedence:
 1. CLI arguments
-    - See help menu by running `ark-discord-bot -h` for more information.
+    - See help menu by running `poglink -h` for more information.
 2. Configuration File
     - Assumed to be named `config.yaml` within the data directory.
-    - Data directory is set to `~/.ark-discord-bot` unless otherwise specified.
+    - Data directory is set to `~/.poglink` unless otherwise specified.
 3. Environment variables
     - Each parameter can be set via an environment variable prefixed with `BOT_`.
     - E.g. to configure the bot's polling delay, set `BOT_POLLING_DELAY`.
@@ -107,7 +107,7 @@ The following configuration parameters are available to be set in any of the abo
 | `--rates-channel-id`   | `BOT_RATES_CHANNEL_ID`   | None                                      | Yes      | Channel ID to post rates in                                          |
 | `--bans-channel-id`    | `BOT_BANS_CHANNEL_ID`    | None                                      | Yes      | Channel ID to post ban summary in                                    |
 | `--token `             | `BOT_TOKEN`              | None                                      | Yes      | Bot token (from Discord Developer Portal)                            |
-| `--data-dir`           | `BOT_DATA_DIR`           | ~/.ark-discord-bot                        | No       | Directory that will contain bot data, such as the `config.yaml` file |
+| `--data-dir`           | `BOT_DATA_DIR`           | ~/.poglink                        | No       | Directory that will contain bot data, such as the `config.yaml` file |
 | `--debug`              | `BOT_DEBUG`              | False                                     | No       | Enables debug logging                                                |
 
  *Initially developed for use in the official ARK: Survival Evolved Discord 
\ No newline at end of file
diff --git a/docker-compose.yaml b/docker-compose.yaml
index fa8977e..a21218c 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -1,7 +1,7 @@
 version: "3"
 services:
   bot:
-    container_name: ark-discord-bot
+    container_name: poglink
     build: .
     volumes:
       - ./data:/data
diff --git a/entrypoint.sh b/entrypoint.sh
index 2e28dbd..77f67b4 100644
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -21,4 +21,4 @@ if [ ! -e "${CONFIG_FILE}" ]; then
 fi
 
 # Run application with provided arguments
-ark-discord-bot $@
\ No newline at end of file
+poglink $@
\ No newline at end of file
diff --git a/ark_discord_bot/__init__.py b/poglink/__init__.py
similarity index 100%
rename from ark_discord_bot/__init__.py
rename to poglink/__init__.py
diff --git a/ark_discord_bot/bot.py b/poglink/bot.py
similarity index 100%
rename from ark_discord_bot/bot.py
rename to poglink/bot.py
diff --git a/ark_discord_bot/cogs/__init__.py b/poglink/cogs/__init__.py
similarity index 100%
rename from ark_discord_bot/cogs/__init__.py
rename to poglink/cogs/__init__.py
diff --git a/ark_discord_bot/cogs/bans.py b/poglink/cogs/bans.py
similarity index 100%
rename from ark_discord_bot/cogs/bans.py
rename to poglink/cogs/bans.py
diff --git a/ark_discord_bot/cogs/rates.py b/poglink/cogs/rates.py
similarity index 100%
rename from ark_discord_bot/cogs/rates.py
rename to poglink/cogs/rates.py
diff --git a/ark_discord_bot/config.py b/poglink/config.py
similarity index 95%
rename from ark_discord_bot/config.py
rename to poglink/config.py
index 2c7c75f..cceba68 100644
--- a/ark_discord_bot/config.py
+++ b/poglink/config.py
@@ -3,7 +3,7 @@
 
 import yaml
 
-from ark_discord_bot.utils import parse_list
+from poglink.utils import parse_list
 
 logger = logging.getLogger(__name__)
 
@@ -16,7 +16,7 @@
     "rates_channel_id": None,
     "bans_channel_id": None,
     "token": None,
-    "data_dir": "~/.ark-discord-bot",
+    "data_dir": "~/.poglink",
 }
 
 REQUIRED_VALUES = [
diff --git a/ark_discord_bot/main.py b/poglink/main.py
similarity index 76%
rename from ark_discord_bot/main.py
rename to poglink/main.py
index 9caf972..5d43dc8 100644
--- a/ark_discord_bot/main.py
+++ b/poglink/main.py
@@ -4,14 +4,14 @@
 import discord
 from discord.ext import commands
 
-import ark_discord_bot
-from ark_discord_bot.bot import ConfigurableBot
-from ark_discord_bot.config import REQUIRED_VALUES, setup_config
-from ark_discord_bot.utils import setup_argparse
+import poglink
+from poglink.bot import ConfigurableBot
+from poglink.config import REQUIRED_VALUES, setup_config
+from poglink.utils import setup_argparse
 
 # https://discord.com/api/oauth2/authorize?client_id=912847784477065278&permissions=117760&scope=bot//
 
-logger = logging.getLogger("ark-discord-bot")
+logger = logging.getLogger("poglink")
 
 
 def cli():
@@ -58,26 +58,26 @@ def run(**kwargs):
     @client.command()
     @commands.has_any_role(*client.config.allowed_roles)
     async def load(ctx, extension):
-        client.load_extension(f"ark_discord_bot.cogs.{extension}")
+        client.load_extension(f"poglink.cogs.{extension}")
 
     # unload a cogcd
     @client.command()
     @commands.has_any_role(*client.config.allowed_roles)
     async def unload(ctx, extension):
-        client.unload_extension(f"ark_discord_bot.cogs.{extension}")
+        client.unload_extension(f"poglink.cogs.{extension}")
 
     # reload a cog
     @client.command()
     @commands.has_any_role(*client.config.allowed_roles)
     async def reload(ctx, extension):
-        client.unload_extension(f"ark_discord_bot.cogs.{extension}")
-        client.load_extension(f"ark_discord_bot.cogs.{extension}")
+        client.unload_extension(f"poglink.cogs.{extension}")
+        client.load_extension(f"poglink.cogs.{extension}")
         await ctx.send(f"Extension '{extension}' reloaded.")
 
     # load all cogs on boot
-    for ext in ark_discord_bot.cogs.__all__:
+    for ext in poglink.cogs.__all__:
         if ext != "ban":
-            client.load_extension(f"ark_discord_bot.cogs.{ext}")
+            client.load_extension(f"poglink.cogs.{ext}")
 
     # run the bot
     try:
diff --git a/ark_discord_bot/models.py b/poglink/models.py
similarity index 100%
rename from ark_discord_bot/models.py
rename to poglink/models.py
diff --git a/ark_discord_bot/utils.py b/poglink/utils.py
similarity index 98%
rename from ark_discord_bot/utils.py
rename to poglink/utils.py
index bf4bd74..aa4d769 100644
--- a/ark_discord_bot/utils.py
+++ b/poglink/utils.py
@@ -32,7 +32,7 @@ def setup_argparse():
     parser.add_argument(
         "-d",
         "--data-dir",
-        help="Directory in which to store persistent data and config file. Defaults to ~/.ark-discord-bot",
+        help="Directory in which to store persistent data and config file. Defaults to ~/.poglink",
     )
     parser.add_argument(
         "-t",
diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh
index f9c2bb4..6d999b3 100755
--- a/scripts/docker-build.sh
+++ b/scripts/docker-build.sh
@@ -6,5 +6,5 @@ PYTHON_PACKAGE_VERSION=$(python3 -c 'from setuptools_scm import get_version; pri
 # Build docker container
 docker build \
     --build-arg "PYTHON_PACKAGE_VERSION=${PYTHON_PACKAGE_VERSION}" \
-    -t ark-discord-bot:latest \
+    -t poglink:latest \
     .
diff --git a/setup.py b/setup.py
index ad5b96f..e7f414a 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@
     long_description = f.read()
 
 setup(
-    name="ark-discord-bot",
+    name="poglink",
     version=version,
     use_scm_version=use_scm_version,
     setup_requires=["setuptools_scm"],
@@ -27,12 +27,12 @@
     long_description_content_type="text/markdown",
     author="FM-17",
     author_email="info@fm17.dev",
-    url="https://github.com/FM-17/ark-discord-bot",
+    url="https://github.com/FM-17/poglink",
     packages=find_packages(),
     install_requires=["discord>=1.7", "pyyaml", "python-dateutil", "jinja2"],
     entry_points={
         "console_scripts": [
-            "ark-discord-bot=ark_discord_bot.main:cli",
+            "poglink=poglink.main:cli",
         ]
     },
 )


Test patch:
diff --git a/ark_discord_bot/cogs/test.py b/poglink/cogs/test.py
similarity index 100%
rename from ark_discord_bot/cogs/test.py
rename to poglink/cogs/test.py
diff --git a/tests/integration/test_async_http_request.py b/tests/integration/test_async_http_request.py
index f4a5b89..c1fa3da 100644
--- a/tests/integration/test_async_http_request.py
+++ b/tests/integration/test_async_http_request.py
@@ -1,7 +1,7 @@
 import aiohttp
 import aiohttp
 import pytest
-from ark_discord_bot.models import RatesStatus
+from poglink.models import RatesStatus
 
 
 @pytest.mark.asyncio
diff --git a/tests/integration/test_cogs_bans.py b/tests/integration/test_cogs_bans.py
index aa2af7b..da75eed 100644
--- a/tests/integration/test_cogs_bans.py
+++ b/tests/integration/test_cogs_bans.py
@@ -1,7 +1,7 @@
 import pytest
 import aiohttp
-from ark_discord_bot.cogs.bans import Bans
-from ark_discord_bot.bot import ConfigurableBot
+from poglink.cogs.bans import Bans
+from poglink.bot import ConfigurableBot
 
 
 @pytest.fixture()
diff --git a/tests/unit/test_cli.py b/tests/unit/test_cli.py
index 350b515..7588d34 100644
--- a/tests/unit/test_cli.py
+++ b/tests/unit/test_cli.py
@@ -1,4 +1,4 @@
-from ark_discord_bot.utils import setup_argparse, parse_list
+from poglink.utils import setup_argparse, parse_list
 
 
 def test_parse_list():
diff --git a/tests/unit/test_config.py b/tests/unit/test_config.py
index 5cfc13c..4004983 100644
--- a/tests/unit/test_config.py
+++ b/tests/unit/test_config.py
@@ -3,7 +3,7 @@
 import yaml
 import tempfile
 import argparse
-from ark_discord_bot.config import setup_config, DEFAULT_CONFIG
+from poglink.config import setup_config, DEFAULT_CONFIG
 
 
 @pytest.fixture
diff --git a/tests/unit/test_models_bans.py b/tests/unit/test_models_bans.py
index 104c0be..2504a81 100644
--- a/tests/unit/test_models_bans.py
+++ b/tests/unit/test_models_bans.py
@@ -1,6 +1,6 @@
 import pytest
 import datetime
-from ark_discord_bot.models import BansStatus
+from poglink.models import BansStatus
 
 
 @pytest.fixture()
diff --git a/tests/unit/test_models_rates.py b/tests/unit/test_models_rates.py
index c828873..808edf9 100644
--- a/tests/unit/test_models_rates.py
+++ b/tests/unit/test_models_rates.py
@@ -1,6 +1,6 @@
 import pytest
 import copy
-from ark_discord_bot.models import RatesDiffItem, RatesDiff, RatesStatus
+from poglink.models import RatesDiffItem, RatesDiff, RatesStatus
 
 
 @pytest.fixture()