From 11451fb010eb3afdc48ddcc4ab13fa24614920a0 Mon Sep 17 00:00:00 2001 From: sco1 Date: Mon, 30 Sep 2019 21:33:39 -0400 Subject: Update contrib doc for new wiki links --- CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a0a1200ec..41df8fa20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,9 +36,10 @@ All projects evolve over time, and this contribution guide is no different. This ## Supplemental Information ### Developer Environment -A working environment for the [PyDis site](https://github.com/python-discord/site) is required to develop the bot. Instructions for setting up environments for both the site and the bot can be found on the PyDis Wiki: - * [Site](https://wiki.pythondiscord.com/wiki/contributing/project/site) - * [Bot](https://wiki.pythondiscord.com/wiki/contributing/project/bot) +Instructions for setting the bot developer environment can be found on the PyDis site: + * [Bot](https://pythondiscord.com/pages/contributing/bot/) + +To provide a standalone development environment for this project, docker compose is utilized to pull the current version of the [site backend](https://github.com/python-discord/site). While appropriate for bot-only contributions, any contributions that necessitate backend changes will require the site repository to be appropriately configured as well. Instructions for setting up the site environment can be found on the [PyDis site](https://pythondiscord.com/pages/contributing/site/). When pulling down changes from GitHub, remember to sync your environment using `pipenv sync --dev` to ensure you're using the most up-to-date versions the project's dependencies. -- cgit v1.2.3 From 35c4d06a1807bbc491a75459d8bf7790d1467731 Mon Sep 17 00:00:00 2001 From: "S. Co1" Date: Tue, 1 Oct 2019 09:40:28 -0400 Subject: Remove single-item list It looks silly --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 41df8fa20..39f76c7b4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,8 +36,7 @@ All projects evolve over time, and this contribution guide is no different. This ## Supplemental Information ### Developer Environment -Instructions for setting the bot developer environment can be found on the PyDis site: - * [Bot](https://pythondiscord.com/pages/contributing/bot/) +Instructions for setting the bot developer environment can be found on the [PyDis wiki](https://pythondiscord.com/pages/contributing/bot/) To provide a standalone development environment for this project, docker compose is utilized to pull the current version of the [site backend](https://github.com/python-discord/site). While appropriate for bot-only contributions, any contributions that necessitate backend changes will require the site repository to be appropriately configured as well. Instructions for setting up the site environment can be found on the [PyDis site](https://pythondiscord.com/pages/contributing/site/). -- cgit v1.2.3 From 514576666ff7856ca09e049cb90ee8ac993107e2 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Oct 2019 23:41:09 +0200 Subject: Create !tools alias and split !site resources. This splits the former !site resources into two separate commands, one for !site resources and one for !site tools. This makes sense now that we've split up the lists into two pages. It also adds a new alias, !tools, to call this command. This addresses #478. https://github.com/python-discord/bot/issues/478 --- bot/cogs/alias.py | 8 ++++++++ bot/cogs/site.py | 27 ++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/bot/cogs/alias.py b/bot/cogs/alias.py index 80ff37983..0df5498a1 100644 --- a/bot/cogs/alias.py +++ b/bot/cogs/alias.py @@ -53,6 +53,14 @@ class Alias (Cog): """Alias for invoking site resources.""" await self.invoke(ctx, "site resources") + @command(name="tools", hidden=True) + async def site_tools_alias(self, ctx): + """ + Alias for invoking site tools. + """ + + await self.invoke(ctx, "site tools") + @command(name="watch", hidden=True) async def bigbrother_watch_alias(self, ctx: Context, user: Union[Member, User, proxy_user], *, reason: str) -> None: """Alias for invoking bigbrother watch [user] [reason].""" diff --git a/bot/cogs/site.py b/bot/cogs/site.py index 4a423faa9..8a8fed575 100644 --- a/bot/cogs/site.py +++ b/bot/cogs/site.py @@ -44,17 +44,30 @@ class Site(Cog): async def site_resources(self, ctx: Context) -> None: """Info about the site's Resources page.""" learning_url = f"{PAGES_URL}/resources" - tools_url = f"{PAGES_URL}/tools" - embed = Embed(title="Resources & Tools") - embed.set_footer(text=f"{learning_url} | {tools_url}") + embed = Embed(title="Resources") + embed.set_footer(text=f"{learning_url}") embed.colour = Colour.blurple() embed.description = ( f"The [Resources page]({learning_url}) on our website contains a " - "list of hand-selected goodies that we regularly recommend " - f"to both beginners and experts. The [Tools page]({tools_url}) " - "contains a couple of the most popular tools for programming in " - "Python." + "list of hand-selected learning resources that we regularly recommend " + f"to both beginners and experts." + ) + + await ctx.send(embed=embed) + + @site_group.command(name="tools") + async def site_tools(self, ctx: Context): + """Info about the site's Tools page.""" + + tools_url = f"{PAGES_URL}/tools" + + embed = Embed(title="Tools") + embed.set_footer(text=f"{tools_url}") + embed.colour = Colour.blurple() + embed.description = ( + f"The [Tools page]({tools_url}) on our website contains a " + f"couple of the most popular tools for programming in Python." ) await ctx.send(embed=embed) -- cgit v1.2.3 From a994c2c2b67521b8a739536ae0c9d47de75ce7b8 Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 1 Oct 2019 23:49:10 +0200 Subject: Fix missing type annotations and docstring errors. --- bot/cogs/alias.py | 7 ++----- bot/cogs/site.py | 3 +-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/bot/cogs/alias.py b/bot/cogs/alias.py index 0df5498a1..0f49a400c 100644 --- a/bot/cogs/alias.py +++ b/bot/cogs/alias.py @@ -54,11 +54,8 @@ class Alias (Cog): await self.invoke(ctx, "site resources") @command(name="tools", hidden=True) - async def site_tools_alias(self, ctx): - """ - Alias for invoking site tools. - """ - + async def site_tools_alias(self, ctx: Context) -> None: + """Alias for invoking site tools.""" await self.invoke(ctx, "site tools") @command(name="watch", hidden=True) diff --git a/bot/cogs/site.py b/bot/cogs/site.py index 8a8fed575..c3bdf85e4 100644 --- a/bot/cogs/site.py +++ b/bot/cogs/site.py @@ -57,9 +57,8 @@ class Site(Cog): await ctx.send(embed=embed) @site_group.command(name="tools") - async def site_tools(self, ctx: Context): + async def site_tools(self, ctx: Context) -> None: """Info about the site's Tools page.""" - tools_url = f"{PAGES_URL}/tools" embed = Embed(title="Tools") -- cgit v1.2.3