You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+10-15Lines changed: 10 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Additionally, linked below are some helpful resources:
24
24
If you are new to contributing to open-source projects on GitHub, the general workflow is as follows:
25
25
26
26
1.[Fork](https://w3schools.com/git/git_remote_fork.asp) this [repository](https://phoenixnap.com/kb/what-is-a-git-repository#ftoc-heading-1) and [clone](https://w3schools.com/git/git_clone.asp) it
27
-
2. Create a [branch](https://w3schools.com/git/git_remote_branch.asp)off main
27
+
2. Create a [branch](https://w3schools.com/git/git_remote_branch.asp)from `main`
28
28
3. Make your changes and [commit](https://w3schools.com/git/git_commit.asp) them
29
29
4.[Push](https://w3schools.com/git/git_push_to_remote.asp) your local [branch](https://w3schools.com/git/git_remote_branch.asp) to your remote fork
30
30
5. Open a new [pull request on GitHub](https://w3schools.com/git/git_remote_send_pull_request.asp)
@@ -44,20 +44,20 @@ If you find an issue with TeX-Bot, the best place to report it is through the is
44
44
If you are looking for issues to contribute code to, it's a good idea to look at the [issues labelled "good-first-issue"](https://github.com/CSSUoB/TeX-Bot-Py-V2/issues?q=label%3A%22good+first+issue%22)!
45
45
46
46
When submitting an issue, please be as descriptive as possible.
47
-
If you are submitting a bug report, please include the steps to reproduce the bug, and the environment it is in.
47
+
If you are submitting a bug report, please include the steps to reproduce the bug and the environment it is in.
48
48
If you are submitting a feature request, please include the steps to implement the feature.
49
49
50
50
## Repository Structure
51
51
52
52
### Top level files
53
53
54
54
*[`main.py`](main.py): is the main entrypoint to instantiate the [`Bot` object](https://docs.pycord.dev/stable/api/clients.html#discord.Bot) & run it
55
-
*[`exceptions.py`](exceptions.py): contains common [exception](https://docs.python.org/3/tutorial/errors) subclasses that may be raised when certain errors occur
56
55
*[`config.py`](config.py): retrieves the [environment variables](README.md#setting-environment-variables) & populates the correct values into the `settings` object
57
56
58
57
### Other significant directories
59
58
60
59
*[`cogs/`](cogs): contains all the [cogs](https://guide.pycord.dev/popular-topics/cogs) within this project, see [below](#cogs) for more information
60
+
*[`exceptions/`](exceptions): contains common [exception](https://docs.python.org/3/tutorial/errors) subclasses that may be raised when certain errors occur
61
61
*[`utils/`](utils): contains common utility classes & functions used by the top-level modules & cogs
62
62
*[`db/core/models/`](db/core/models): contains all the [database ORM models](https://docs.djangoproject.com/en/stable/topics/db/models) to interact with storing information longer-term (between individual command events)
63
63
*[`tests/`](tests): contains the complete test suite for this project, based on the [Pytest framework](https://pytest.org)
@@ -68,8 +68,8 @@ If you are submitting a feature request, please include the steps to implement t
68
68
They combine related [listeners](https://guide.pycord.dev/getting-started/more-features#event-handlers) and [commands](https://guide.pycord.dev/category/application-commands) (each as individual methods) into one class.
69
69
There are separate cog files for each activity, and one [`__init__.py`](cogs/__init__.py) file which instantiates them all:
*For more information about the purpose of each cog, please look at the documentation within the files themselves*
71
+
> [!IMPORTANT]
72
+
> For more information about the purpose of each cog, please look at the documentation within the files themselves
73
73
74
74
*[`cogs/__init__.py`](cogs/__init__.py): instantiates all the cog classes within this directory
75
75
@@ -92,16 +92,16 @@ There are separate cog files for each activity, and one [`__init__.py`](cogs/__i
92
92
*[`cogs/remind_me.py`](cogs/remind_me.py): cogs to ask TeX-Bot to send a reminder message at a later date
93
93
94
94
*[`cogs/send_get_roles_reminders.py`](cogs/send_get_roles_reminders.py): cogs relating to sending reminders, to Discord members, about opt-in roles.
95
-
(See [Repeated Tasks Conditions](README.md#repeated-tasks-conditions) for which conditions are required to be met, to execute this task)
95
+
(See [Repeated Tasks Conditions](README.md#repeated-tasks-conditions) for which conditions are required to be met to execute this task)
96
96
97
97
*[`cogs/send_introduction_reminders.py`](cogs/send_introduction_reminders.py): cogs relating to sending reminders, to Discord members, about introducing themselves.
98
-
(See [Repeated Tasks Conditions](README.md#repeated-tasks-conditions) for which conditions are required to be met, to execute this task)
98
+
(See [Repeated Tasks Conditions](README.md#repeated-tasks-conditions) for which conditions are required to be met to execute this task)
99
99
100
100
*[`cogs/source.py`](cogs/source.py): cogs for displaying information about the source-code of this project
101
101
102
102
*[`cogs/startup.py`](cogs/startup.py): cogs for startup & bot initialisation
103
103
104
-
*[`cogs/stats.py`](cogs/stats.py): cogs for displaying stats about your group's Discord guild, as well as its channels & Discord members
104
+
*[`cogs/stats/`](cogs/stats): cogs for displaying stats about your group's Discord guild, as well as its channels & Discord members
105
105
106
106
*[`cogs/strike.py`](cogs/strike.py): cogs for applying moderation actions to Discord members
107
107
@@ -159,20 +159,15 @@ It can be run with the following command:
159
159
uv run mypy .
160
160
```
161
161
162
-
Although there is [a PyCharm plugin](https://github.com/leinardi/mypy-pycharm#mypy-pycharm) to provide GUI control & inline warnings for [mypy](https://mypy-lang.org), it has been rather temperamental recently.
163
-
So it is suggested to avoid using it, and run [mypy](https://mypy-lang.org) from the command-line instead.
164
-
165
162
#### PyMarkdown
166
163
167
164
[PyMarkdown](https://github.com/jackdewinter/pymarkdown) is a static analysis [Markdown](https://markdownguide.org/getting-started#what-is-markdown)[linter](https://wikipedia.org/wiki/Lint_(software)), which will alert you to possible formatting mistakes in your [MarkDown](https://markdownguide.org/getting-started#what-is-markdown) files.
168
165
It can be run with the following command:
169
166
170
167
```shell
171
-
uv run ccft-pymarkdown scan-all --with-git
168
+
uv run pymarkdown scan.
172
169
```
173
170
174
-
This command includes the removal of custom-formatted tables. See the [CCFT-PyMarkdown tool](https://github.com/CarrotManMatt/CCFT-PyMarkdown) for more information on linting Markdown files that contain custom-formatted tables.
175
-
176
171
### Git Commit Messages
177
172
178
173
Commit messages should be written in the imperative present tense. For example, "Fix bug #1".
@@ -205,7 +200,7 @@ Please note that any contributions you make will be made under the terms of the
205
200
206
201
## Guidance
207
202
208
-
We aim to get more people involved with our projects, and help build members' confidence in using git and contributing to open-source.
203
+
We aim to get more people involved with our projects and help build members' confidence in using git and contributing to open-source.
209
204
If you see an error, we encourage you to **be bold** and fix it yourself, rather than just raising an issue.
210
205
If you are stuck, need help, or have a question, the best place to ask is on our Discord.
Copy file name to clipboardExpand all lines: README.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,6 @@ uv sync
142
142
> [!TIP]
143
143
> Syncing the dependencies is not required. uv performs this automatically every time the `uv run` command is used
144
144
145
-
146
145
### Creating Your [Bot](https://discord.com/developers/docs/topics/oauth2#bot-vs-user-accounts)
147
146
148
147
A full guide on how to create your bot's account can be found [here; on Pycord's wiki](https://docs.pycord.dev/en/stable/discord.html).
@@ -170,7 +169,7 @@ You'll also need to set a number of [environment variables](https://wikipedia.or
170
169
*`SU_PLATFORM_ACCESS_COOKIE`: The SU platform [access session cookie](https://wikipedia.org/wiki/HTTP_cookie#Session_cookie).
171
170
* This [session cookie](https://wikipedia.org/wiki/HTTP_cookie#Session_cookie) will [authenticate](https://wikipedia.org/wiki/Authentication) TeX-Bot to view your group's members list on the SU platform, as if it were [logged in to the website](https://wikipedia.org/wiki/Login_session) as a Committee member.
172
171
* This can be [extracted from your web-browser](https://wikihow.com/View-Cookies), after logging in to view your members list yourself.
173
-
It will most likely be listed as a [cookie](https://wikipedia.org/wiki/HTTP_cookie) named [`.ASPXAUTH`](https://stackoverflow.com/a/424061/14403974).
172
+
It will most likely be listed as a [cookie](https://wikipedia.org/wiki/HTTP_cookie) named `.AspNet.SharedCookie`.
174
173
* If you wish to test TeX-Bot with the SU platform-access disabled, a dummy value of 128 `0` characters can be used.
175
174
Note that this will cause many commands and scheduled tasks to fail when they are used at runtime.
# NOTE: Shortcut accessors are placed at the top of the function, so that the exceptions they raise are displayed before any further errors may be sent
170
+
# NOTE: Shortcut accessors are placed at the top of the function so that the exceptions they raise are displayed before any further errors may be sent
0 commit comments