Skip to content

Commit 09fb2a4

Browse files
authored
Merge pull request #582 from python-discord/swfarnsworth/smarter-resources/merge-with-main
Smarter Resources
2 parents df093d3 + 3e48c9d commit 09fb2a4

File tree

129 files changed

+2135
-825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+2135
-825
lines changed

poetry.lock

Lines changed: 107 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pydis_site/apps/api/models/bot/metricity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
)
1111

1212

13-
class NotFoundError(Exception):
13+
class NotFoundError(Exception): # noqa: N818
1414
"""Raised when an entity cannot be found."""
1515

1616
pass

pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ First things first, to run the bot's code and make changes to it, you need a loc
1414
<button type="button" class="card-header collapsible">
1515
<span class="card-header-title subtitle is-6 my-2 ml-2">Getting started with Git and GitHub</span>
1616
<span class="card-header-icon">
17-
<i class="fas fa-angle-down title is-5" aria-hidden="true"></i>
17+
<i class="fas fa-fw fa-angle-down title is-5" aria-hidden="true"></i>
1818
</span>
1919
</button>
20-
<div class="collapsible-content">
20+
<div class="collapsible-content collapsed">
2121
<div class="card-content">
2222
<p>If you don't have Git on your computer already, <a href="https://git-scm.com/downloads">install it</a>. You can additionally install a Git GUI such as <a href="https://www.gitkraken.com/download">GitKraken</a>, or the <a href="https://cli.github.com/manual/installation">GitHub CLI</a>.</p>
2323
<p>To learn more about Git, you can look into <a href="../working-with-git">our guides</a>, as well as <a href="https://education.github.com/git-cheat-sheet-education.pdf">this cheatsheet</a>, <a href="https://learngitbranching.js.org">Learn Git Branching</a>, and otherwise any guide you can find on the internet. Once you got the basic idea though, the best way to learn Git is to use it.</p>
@@ -78,10 +78,10 @@ See [here](../obtaining-discord-ids) for help with obtaining Discord IDs.
7878
<button type="button" class="card-header collapsible">
7979
<span class="card-header-title subtitle is-6 my-2 ml-2">Optional config.yml</span>
8080
<span class="card-header-icon">
81-
<i class="fas fa-angle-down title is-5" aria-hidden="true"></i>
81+
<i class="fas fa-fw fa-angle-down title is-5" aria-hidden="true"></i>
8282
</span>
8383
</button>
84-
<div class="collapsible-content">
84+
<div class="collapsible-content collapsed">
8585
<div class="card-content">
8686
<p>If you used the provided server template, and you're not sure which channels belong where in the config file, you can use the config below. Pay attention to the comments with several <code>#</code> symbols, and replace the <code>�</code> characters with the right IDs.</p>
8787
<pre>
@@ -458,10 +458,10 @@ We understand this is tedious and are working on a better solution for setting u
458458
<button type="button" class="card-header collapsible">
459459
<span class="card-header-title subtitle is-6 my-2 ml-2">Why do you need a separate config file?</span>
460460
<span class="card-header-icon">
461-
<i class="fas fa-angle-down title is-5" aria-hidden="true"></i>
461+
<i class="fas fa-fw fa-angle-down title is-5" aria-hidden="true"></i>
462462
</span>
463463
</button>
464-
<div class="collapsible-content">
464+
<div class="collapsible-content collapsed">
465465
<div class="card-content">
466466
While it's technically possible to edit <code>config-default.yml</code> to match your server, it is heavily discouraged.
467467
This file's purpose is to provide the configurations the Python bot needs to run in the Python server in production, and should remain as such.
@@ -487,10 +487,10 @@ You are now almost ready to run the Python bot. The simplest way to do so is wit
487487
<button type="button" class="card-header collapsible">
488488
<span class="card-header-title subtitle is-6 my-2 ml-2">Getting started with Docker</span>
489489
<span class="card-header-icon">
490-
<i class="fas fa-angle-down title is-5" aria-hidden="true"></i>
490+
<i class="fas fa-fw fa-angle-down title is-5" aria-hidden="true"></i>
491491
</span>
492492
</button>
493-
<div class="collapsible-content">
493+
<div class="collapsible-content collapsed">
494494
<div class="card-content">
495495
The requirements for Docker are:
496496
<ul>
@@ -541,10 +541,10 @@ With at least the site running in Docker already (see the previous section on ho
541541
<button type="button" class="card-header collapsible">
542542
<span class="card-header-title subtitle is-6 my-2 ml-2">Ways to run code</span>
543543
<span class="card-header-icon">
544-
<i class="fas fa-angle-down title is-5" aria-hidden="true"></i>
544+
<i class="fas fa-fw fa-angle-down title is-5" aria-hidden="true"></i>
545545
</span>
546546
</button>
547-
<div class="collapsible-content">
547+
<div class="collapsible-content collapsed">
548548
<div class="card-content">
549549
Notice that the bot is started as a module. There are several ways to do so:
550550
<ul>

pydis_site/apps/content/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __get_all_files(root: Path, folder: typing.Optional[Path] = None) -> list[st
3030

3131

3232
def get_all_pages() -> typing.Iterator[dict[str, str]]:
33-
"""Yield a dict of all pag categories."""
33+
"""Yield a dict of all page categories."""
3434
for location in __get_all_files(Path("pydis_site", "apps", "content", "resources")):
3535
yield {"location": location}
3636

pydis_site/apps/redirect/redirects.yaml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,45 @@ resources_index_redirect:
8787
original_path: pages/resources/
8888
redirect_route: "resources:index"
8989

90-
resources_resources_redirect:
91-
original_path: pages/resources/<str:category>/
92-
redirect_route: "resources:resources"
90+
resources_reading_redirect:
91+
original_path: resources/reading/
92+
redirect_route: "resources:index"
93+
redirect_arguments: ["book"]
94+
95+
resources_books_redirect:
96+
original_path: resources/books/
97+
redirect_route: "resources:index"
98+
redirect_arguments: ["book"]
99+
100+
resources_videos_redirect:
101+
original_path: resources/videos/
102+
redirect_route: "resources:index"
103+
redirect_arguments: ["video"]
104+
105+
resources_courses_redirect:
106+
original_path: resources/courses/
107+
redirect_route: "resources:index"
108+
redirect_arguments: ["course"]
109+
110+
resources_communities_redirect:
111+
original_path: resources/communities/
112+
redirect_route: "resources:index"
113+
redirect_arguments: ["community"]
114+
115+
resources_podcasts_redirect:
116+
original_path: resources/podcasts/
117+
redirect_route: "resources:index"
118+
redirect_arguments: ["podcast"]
119+
120+
resources_tutorials_redirect:
121+
original_path: resources/tutorials/
122+
redirect_route: "resources:index"
123+
redirect_arguments: ["tutorial"]
124+
125+
resources_tools_redirect:
126+
original_path: resources/tools/
127+
redirect_route: "resources:index"
128+
redirect_arguments: ["tool"]
93129

94130
# Events
95131
events_index_redirect:

pydis_site/apps/resources/resources/communities/adafruit.yaml renamed to pydis_site/apps/resources/resources/adafruit.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ description: Adafruit is an open-source electronics manufacturer
44
provide help with your projects,
55
and the Adafruit devs do all the CircuitPython Development right out in the open.
66
title_image: https://www.mouser.com/images/suppliers/logos/adafruit.png
7-
title_url: https://discord.gg/adafruit
8-
position: 4
7+
title_url: https://adafruit.com/
98
urls:
10-
- icon: branding/discord
11-
url: https://discord.gg/adafruit
12-
color: blurple
13-
- icon: regular/link
14-
url: https://adafruit.com/
15-
color: teal
9+
- icon: branding/discord
10+
url: https://discord.gg/adafruit
11+
color: blurple
12+
tags:
13+
topics:
14+
- microcontrollers
15+
payment_tiers:
16+
- free
17+
difficulty:
18+
- beginner
19+
- intermediate
20+
type:
21+
- community

pydis_site/apps/resources/resources/tools/editors/atom.yaml renamed to pydis_site/apps/resources/resources/atom.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@ description: A free Electron-based editor, a "hackable text editor for the 21st
22
by the GitHub team.
33
name: Atom
44
title_url: https://atom.io/
5-
position: 0
5+
tags:
6+
topics:
7+
- general
8+
payment_tiers:
9+
- free
10+
difficulty:
11+
- beginner
12+
- intermediate
13+
type:
14+
- tool

pydis_site/apps/resources/resources/reading/books/automate_the_boring_stuff.yaml renamed to pydis_site/apps/resources/resources/automate_the_boring_stuff_book.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,18 @@ description: One of the best books out there for Python beginners. This book wil
44
the web, manipulating files and automating keyboard and mouse input. Ideal for an
55
office worker who wants to make himself more useful.
66
name: Automate the Boring Stuff with Python
7-
position: 2
7+
title_url: https://automatetheboringstuff.com/
88
urls:
9-
- icon: regular/book
10-
url: https://automatetheboringstuff.com/
9+
- icon: branding/goodreads
10+
url: https://www.goodreads.com/book/show/22514127-automate-the-boring-stuff-with-python
1111
color: black
12-
- icon: branding/amazon
13-
url: https://www.amazon.com/Automate-Boring-Stuff-Python-Programming/dp/1593275994/
14-
color: amazon-orange
12+
tags:
13+
topics:
14+
- general
15+
payment_tiers:
16+
- free
17+
- paid
18+
difficulty:
19+
- beginner
20+
type:
21+
- book

pydis_site/apps/resources/resources/courses/automate_the_boring_stuff_with_python.yaml renamed to pydis_site/apps/resources/resources/automate_the_boring_stuff_course.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,13 @@ description: The interactive course version of Al Sweigart's excellent book for
22
This link has a discounted version of the course which will always cost 10 dollars. Thanks, Al!
33
name: Automate the Boring Stuff with Python
44
title_url: https://www.udemy.com/automate/?couponCode=FOR_LIKE_10_BUCKS
5-
position: 3
5+
tags:
6+
topics:
7+
- general
8+
payment_tiers:
9+
- paid
10+
difficulty:
11+
- beginner
12+
type:
13+
- course
14+
- interactive

pydis_site/apps/resources/resources/communities/awesome_programming_discord.yaml renamed to pydis_site/apps/resources/resources/awesome_programming_discord.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,13 @@ title_icon: branding/github
66
title_icon_color: black
77
title_url: https://github.com/mhxion/awesome-programming-discord
88
name: awesome-programming-discord
9-
position: 10
9+
tags:
10+
topics:
11+
- general
12+
payment_tiers:
13+
- free
14+
difficulty:
15+
- beginner
16+
- intermediate
17+
type:
18+
- community

0 commit comments

Comments
 (0)