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: pydis_site/apps/content/resources/guides/pydis-guides/contributing.md
+58-32Lines changed: 58 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: A guide to contributing to our open source projects.
4
4
icon: fab fa-github
5
5
---
6
6
7
-
Our projects on Python Discord are open source and [available on Github](https://github.com/python-discord). If you would like to contribute, consider one of the following projects:
7
+
Our projects on Python Discord are open source and [available on GitHub](https://github.com/python-discord). If you would like to contribute, consider one of the following projects:
@@ -19,11 +19,7 @@ Our projects on Python Discord are open source and [available on Github](https:/
19
19
</div>
20
20
<div class="card-content">
21
21
<div class="content">
22
-
Our community-driven Discord bot.
23
-
</div>
24
-
<div class="tags has-addons">
25
-
<span class="tag is-dark">Difficulty</span>
26
-
<span class="tag is-primary">Beginner</span>
22
+
Sir Lancebot has a collection of self-contained, for-fun features. If you're new to Discord bots or contributing, this is a great place to start!
27
23
</div>
28
24
</div>
29
25
<div class="card-footer">
@@ -46,11 +42,7 @@ Our projects on Python Discord are open source and [available on Github](https:/
46
42
</div>
47
43
<div class="card-content">
48
44
<div class="content">
49
-
The community and moderation Discord bot.
50
-
</div>
51
-
<div class="tags has-addons">
52
-
<span class="tag is-dark">Difficulty</span>
53
-
<span class="tag is-warning">Intermediate</span>
45
+
Called @Python on the server, this bot handles moderation tools, help channels, and other critical features for our community.
54
46
</div>
55
47
</div>
56
48
<div class="card-footer">
@@ -73,11 +65,7 @@ Our projects on Python Discord are open source and [available on Github](https:/
73
65
</div>
74
66
<div class="card-content">
75
67
<div class="content">
76
-
The website, subdomains and API.
77
-
</div>
78
-
<div class="tags has-addons">
79
-
<span class="tag is-dark">Difficulty</span>
80
-
<span class="tag is-danger">Advanced</span>
68
+
This website itself! This project is built with Django and includes our API, which is used by various services such as @Python.
81
69
</div>
82
70
</div>
83
71
<div class="card-footer">
@@ -91,26 +79,64 @@ Our projects on Python Discord are open source and [available on Github](https:/
91
79
</div>
92
80
</div>
93
81
94
-
If you don't understand anything or need clarification, feel free to ask any staff member with the **@PyDis Core Developers** role in the server. We're always happy to help!
82
+
# How do I start contributing?
83
+
Unsure of what contributing to open source projects involves? Have questions about how to use GitHub? Just need to know about our contribution etiquette? Completing these steps will have you ready to make your first contribution no matter your starting point.
84
+
85
+
Feel free to skip any steps you're already familiar with, but please make sure not to miss the [Contributing Guidelines](#5-read-our-contributing-guidelines).
86
+
87
+
If you are here looking for the answer to a specific question, check out the sub-articles in the top right of the page to see a list of our guides.
88
+
89
+
**Note:** We use Git to keep track of changes to the files in our projects. Git allows you to make changes to your local code and then distribute those changes to the other people working on the project. You'll use Git in a couple steps of the contributing process. You can refer to this [**guide on using Git**](./working-with-git/).
90
+
{: .notification }
91
+
92
+
### 1. Fork and clone the repo
93
+
GitHub is a website based on Git that stores project files in the cloud. We use GitHub as a central place for sending changes, reviewing others' changes, and communicating with each other. You'll need to create a copy under your own GitHub account, a.k.a. "fork" it. You'll make your changes to this copy, which can then later be merged into the Python Discord repository.
94
+
95
+
*Note: Members of the Python Discord staff can create feature branches directly on the repo without forking it.*
96
+
97
+
Check out our [**guide on forking a GitHub repo**](./forking-repository/).
98
+
99
+
Now that you have your own fork you need to be able to make changes to the code. You can clone the repo to your local machine, commit changes to it there, then push those changes to GitHub.
100
+
101
+
Check out our [**guide on cloning a GitHub repo**](./cloning-repository/).
102
+
103
+
### 2. Set up the project
104
+
You have the source code on your local computer, now how do you actually run it? We have detailed guides on setting up the environment for each of our main projects:
105
+
106
+
*[**Sir Lancebot**](./sir-lancebot/)
107
+
108
+
*[**Python Bot**](./bot/)
109
+
110
+
*[**Site**](./site/)
111
+
112
+
### 3. Read our Contributing Guidelines
113
+
We have a few short rules that all contributors must follow. Make sure you read and follow them while working on our projects.
As mentioned in the Contributing Guidelines, we have a simple style guide for our projects based on PEP 8. Give it a read to keep your code consistent with the rest of the codebase.
118
+
119
+
[**Style Guide**](./style-guide/)
120
+
121
+
### 4. Create an issue
122
+
The first step to any new contribution is an issue describing a problem with the current codebase or proposing a new feature. All the open issues are viewable on the GitHub repositories, for instance here is the [issues page for Sir Lancebot](https://github.com/python-discord/sir-lancebot/issues). If you have something that you want to implement open a new issue to present your idea. Otherwise you can browse the unassigned issues and ask to be assigned to one that you're interested in, either in the comments on the issue or in the [`#dev-contrib`](https://discord.gg/2h3qBv8Xaa) channel on Discord.
123
+
124
+
[**How to write a good issue**](./issues/)
95
125
96
-
### Useful Resources
126
+
Don't move forward until your issue is approved by a Core Developer. Issues are not guaranteed to be approved so your work may be wasted.
127
+
{: .notification .is-warning }
97
128
98
-
[Guidelines](./contributing-guidelines/) - General guidelines you should follow when contributing to our projects.<br>
99
-
[Style Guide](./style-guide/) - Information regarding the code styles you should follow when working on our projects.<br>
100
-
[Review Guide](../code-reviews-primer/) - A guide to get you started on doing code reviews.
129
+
### 5. Make changes
130
+
Now it is time to make the changes to fulfill your approved issue. You should create a new Git branch for your feature; that way you can keep your main branch up to date with ours and even work on multiple features at once in separate branches.
101
131
102
-
## Contributors Community
103
-
We are very happy to have many members in our community that contribute to [our open source projects](https://github.com/python-discord/).
104
-
Whether it's writing code, reviewing pull requests, or contributing graphics for our events, it’s great to see so many people being motivated to help out.
105
-
As a token of our appreciation, those who have made significant contributions to our projects will receive a special **@Contributors** role on our server that makes them stand out from other members.
106
-
That way, they can also serve as guides to others who are looking to start contributing to our open source projects or open source in general.
132
+
This is a good time to review [how to write good commit messages](./contributing-guidelines/commit-messages) if you haven't already.
107
133
108
-
#### Guidelines for the @Contributors Role
134
+
### 6. Open a pull request
135
+
After your issue has been approved and you've written your code and tested it, it's time to open a pull request. Pull requests are a feature in GitHub; you can think of them as asking the project maintainers to accept your changes. This gives other contributors a chance to review your code and make any needed changes before it's merged into the main branch of the project.
109
136
110
-
One question we get a lot is what the requirements for the **@Contributors** role are.
111
-
As it’s difficult to precisely quantify contributions, we’ve come up with the following guidelines for the role:
137
+
Check out our [**Pull Request Guide**](./pull-requests/) for help with opening a pull request and going through the review process.
112
138
113
-
- The member has made several significant contributions to our projects.
114
-
- The member has a positive influence in our contributors subcommunity.
139
+
Check out our [**Code Review Guide**](../code-reviews-primer/) to learn how to be a star reviewer. Reviewing PRs is a vital part of open source development, and we always need more reviewers!
115
140
116
-
The role will be assigned at the discretion of the Admin Team in consultation with the Core Developers Team.
141
+
### That's it!
142
+
Thank you for contributing to our community projects. If there's anything you don't understand or you just want to discuss with other contributors, come visit the [`#dev-contrib`](https://discord.gg/2h3qBv8Xaa) channel to ask questions. Keep an eye out for staff members with the **@PyDis Core Developers** role in the server; we're always happy to help!
<span class="card-header-title subtitle is-6 my-2 ml-2">Getting started with Git and GitHub</span>
16
-
<span class="card-header-icon">
17
-
<i class="fas fa-fw fa-angle-down title is-5" aria-hidden="true"></i>
18
-
</span>
19
-
</button>
20
-
<div class="collapsible-content collapsed">
21
-
<div class="card-content">
22
-
<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>
23
-
<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>
24
-
<p>Creating a copy of a repository under your own account is called a <em>fork</em>. This is where all your changes and commits will be pushed to, and from where your pull requests will originate from.</p>
25
-
<p><strong><a href="../forking-repository">Learn about forking a project</a></strong>.</p>
26
-
</div>
27
-
</div>
28
-
</div>
29
-
<br>
30
-
31
-
You will need to create a fork of [the project](https://github.com/python-discord/bot), and clone the fork.
32
-
Once this is done, you will have completed the first step towards having a running version of the bot.
8
+
You should have already forked the repository and cloned it to your local machine. If not, check out our [detailed walkthrough](../#1-fork-and-clone-the-repo).
33
9
34
-
#### Working on the Repository Directly
35
-
If you are a member of the organisation (a member of [this list](https://github.com/orgs/python-discord/people), or in our particular case, server staff), you can clone the project repository without creating a fork, and work on a feature branch instead.
10
+
This page will focus on the quickest steps one can take, with mentions of alternatives afterwards.
36
11
37
12
---
38
13
@@ -570,10 +545,7 @@ Now that you have everything setup, it is finally time to make changes to the bo
570
545
571
546
#### Working with Git
572
547
573
-
If you have not yet [read the contributing guidelines](../contributing-guidelines), now is a good time.
574
-
Contributions that do not adhere to the guidelines may be rejected.
575
-
576
-
Notably, version control of our projects is done using Git and Github.
548
+
Version control of our projects is done using Git and Github.
577
549
It can be intimidating at first, so feel free to ask for any help in the server.
578
550
579
551
[**Click here to see the basic Git workflow when contributing to one of our projects.**](../working-with-git/)
@@ -664,4 +636,11 @@ The following is a list of all available environment variables used by the bot:
664
636
| `METABASE_USERNAME` | When you wish to interact with Metabase | The username for a Metabase admin account.
665
637
| `METABASE_PASSWORD` | When you wish to interact with Metabase | The password for a Metabase admin account.
666
638
639
+
---
640
+
641
+
# Next steps
642
+
Now that you have everything setup, it is finally time to make changes to the bot! If you have not yet read the [contributing guidelines](../contributing-guidelines.md), now is a good time. Contributions that do not adhere to the guidelines may be rejected.
643
+
644
+
If you're not sure where to go from here, our [detailed walkthrough](../#2-set-up-the-project) is for you.
Copy file name to clipboardExpand all lines: pydis_site/apps/content/resources/guides/pydis-guides/contributing/contributing-guidelines.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,22 +4,15 @@ description: Guidelines to adhere to when contributing to our projects.
4
4
---
5
5
6
6
Thank you for your interest in our projects!
7
+
This page contains the golden rules to follow when contributing. If you have questions about how to get started contributing, check out our [in-depth walkthrough](../../contributing/).
7
8
8
-
If you are interested in contributing, **this page contains the golden rules to follow when contributing.**
9
-
Supplemental information [can be found here](./supplemental-information/).
10
-
Do note that failing to comply with our guidelines may lead to a rejection of the contribution.
11
-
12
-
If you are confused by any of these rules, feel free to ask us in the `#dev-contrib` channel in our [Discord server.](https://discord.gg/python)
13
-
14
-
# The Golden Rules of Contributing
15
-
16
-
1.**Lint before you push.** We have simple but strict style rules that are enforced through linting.
17
-
You must always lint your code before committing or pushing.
18
-
[Using tools](./supplemental-information/#linting-and-pre-commit) such as `flake8` and `pre-commit` can make this easier.
19
-
Make sure to follow our [style guide](../style-guide/) when contributing.
9
+
1.**Lint before you push.**
10
+
We have simple but strict style rules that are enforced through linting.
11
+
[Set up a pre-commit hook](../linting/) to lint your code when you commit it.
12
+
Not all of the style rules are enforced by linting, so make sure to read the [style guide](../style-guide/) as well.
20
13
2.**Make great commits.**
21
14
Great commits should be atomic, with a commit message explaining what and why.
22
-
More on that can be found in [this section](./supplemental-information/#writing-good-commit-messages).
15
+
Check out [Writing Good Commit Messages](./commit-messages) for details.
23
16
3.**Do not open a pull request if you aren't assigned to the issue.**
24
17
If someone is already working on it, consider offering to collaborate with that person.
25
18
4.**Use assets licensed for public use.**
@@ -28,4 +21,8 @@ Whenever the assets are images, audio or even code, they must have a license com
28
21
We aim to foster a welcoming and friendly environment on our open source projects.
29
22
We take violations of our Code of Conduct very seriously, and may respond with moderator action.
30
23
31
-
Welcome to our projects!
24
+
<br/>
25
+
26
+
Failing to comply with our guidelines may lead to a rejection of the contribution.
27
+
If you have questions about any of the rules, feel free to ask us in the [`#dev-contrib`](https://discord.gg/2h3qBv8Xaa) channel in our [Discord server](https://discord.gg/python).
description: Information about logging in our projects.
4
+
---
5
+
6
+
A well-structured git log is key to a project's maintainability; it provides insight into when and *why* things were done for future maintainers of the project.
7
+
8
+
Commits should be as narrow in scope as possible.
9
+
Commits that span hundreds of lines across multiple unrelated functions and/or files are very hard for maintainers to follow.
10
+
After about a week they'll probably be hard for you to follow, too.
11
+
12
+
Please also avoid making minor commits for fixing typos or linting errors.
13
+
[Don’t forget to lint before you push!](https://soundcloud.com/lemonsaurusrex/lint-before-you-push)
14
+
15
+
A more in-depth guide to writing great commit messages can be found in Chris Beam's [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/).
0 commit comments