Skip to content

Commit 38e7d88

Browse files
Docs: Update README and CONTRIBUTING with new rules/examples (#92)
Overall language refactor, including more links to make it easier to find information and code. Addition of new references to address several points that came up during the last few months. Stylistic changes in the README
1 parent 92101d0 commit 38e7d88

File tree

2 files changed

+109
-87
lines changed

2 files changed

+109
-87
lines changed

CONTRIBUTING.md

Lines changed: 70 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,37 @@
11
# Contributing to Fast Music Remover
22

3-
Thank you for your interest in `Fast Music Remover`! Your contributions are invaluable in providing a free and open tool that is centered around tackling practical problems of internet media.
3+
Thank you for your interest in `Fast Music Remover`! Your contributions are invaluable in advancing this free and open tool, designed to address real-world challenges around internet media.
4+
5+
Please read this page carefully to get up to speed with our development practices, and don't hesitate to get in touch if you have questions!
46

57
## Contribution Channels
68

79
### 1. Issues:
8-
You can quickly report most issues with the [issue templates](https://github.com/omeryusufyagci/fast-music-remover/issues/new/choose) for the following types:
9-
* **Bug Report**: Report any unintended behavior, such as crashes, errors, etc.
10-
* **Feature Request**: Let us know what's missing and take part in shaping the direction of the project.
11-
* **Improvement Request**: Did you find some code that is inefficient, docs not clear, or anything in general that can be improved? Provide your feedback with an Improvement Request.
12-
10+
You can quickly report most issues with our [issue templates](https://github.com/omeryusufyagci/fast-music-remover/issues/new/choose).
1311
If these do not cover your specific case, you're welcome to open a custom issue.
1412

1513
### 2. Code Contributions:
16-
Have a look at the [issues](https://github.com/omeryusufyagci/fast-music-remover/issues), especially those tagged `good first issue`, which are easier to get started with and help you understand the general workflow.
14+
Have a look at our [open issues](https://github.com/omeryusufyagci/fast-music-remover/issues), especially those tagged `good first issue`, which should be easier to get started with and help you understand the general workflow.
1715

18-
For code contributions, please first open an issue and provide a description. Open a dedicated branch at the issue page, and only then submit your PR targeting this dedicated branch.
16+
To start off, open a new issue it's not already covered by an existing one, and provide a description.
17+
A dedicated branch will be opened by a maintainer and you should target your PR for that branch, e.g. `100-fix-broken-build-for-amd64-linux`.
18+
Please also take a look at our [Commit Guidelines](#commit-guidelines), and adhere to both for consistency.
1919

2020
### 3. Testing
21-
22-
As a new and rapidly growing project, we rely on tests to maintain our momentum as the codebase expands. Contributions that add new tests are highly appreciated, as they help ensure stability and prevent regressions. Additionally, testing the application on your system and reporting any issues you encounter is invaluable to us. Every bit of feedback helps!
21+
* We're using Google Test for our [processing engine](https://github.com/omeryusufyagci/fast-music-remover/tree/main/MediaProcessor) and have coverage around the most critical functionality.
22+
However, our coverage isn't as great for utilities and other less-critical parts. Improvements in these areas would be welcome additions!
23+
* We're still missing tests for the [Python backend](https://github.com/omeryusufyagci/fast-music-remover/blob/main/app.py), and the backend itself is long overdue for a refactor to reorganize it better. If you're interested in this, please get in touch!
2324

2425
### 4. Documentation:
25-
* If you find any part of the documentation missing or unclear, please consider contributing improvements.
26+
* If you find any part of the documentation missing, unclear or outdated, please let us know, and consider improving it by submitting a PR.
2627

2728
### 5. Outreach
28-
If you know others who might benefit from `Fast Music Remover` or want to contribute, help us by sharing the project with them. Join the [discussions](https://github.com/omeryusufyagci/fast-music-remover/discussions) to talk about ideas, give feedback, or ask questions—your input helps shape the project’s direction!
29+
We're building this with one thing in mind: to provide an **accessible solution** to a **shared problem**.
30+
31+
If you know others who might benefit from or contribute to `Fast Music Remover`, **help us by sharing the project with them**.
32+
Join the [discussions](https://github.com/omeryusufyagci/fast-music-remover/discussions) here or over at [discord](https://discord.gg/xje3PQTEYp) to talk about ideas, give feedback, and ask questions.
33+
34+
Your input helps shape the project’s direction, so don't hesitate to get in touch!
2935

3036
## Contribution Guidelines
3137

@@ -39,7 +45,10 @@ git clone https://github.com/<your-username>/fast-music-remover.git
3945
```
4046
#### Step 2: Set Up Your Development Environment
4147

42-
After cloning the repository, make sure to install the necessary dependencies as described in the [Getting Started](README.md#getting-started) section of the README. Ensure the `config.json` file at the root is properly configured for your system before continuing.
48+
After cloning the repository, make sure to install the dependencies as described in the [Getting Started](README.md#getting-started) section of the README.
49+
Ensure the `config.json` file at the root is properly configured for your system before continuing.
50+
> [!NOTE]
51+
> If you notice anything incorrect or outdated in the docs, please let us know!
4352
4453
Install the Python dependencies with:
4554

@@ -48,7 +57,8 @@ pip install -r requirements.txt
4857
```
4958
#### Step 3: Set Up Pre-Commit Hooks
5059

51-
We use pre-commit hooks to ensure code quality and maintain consistency across the project. This will automatically format your code before each commit.
60+
We use pre-commit hooks to maintain consistency across the project. This will automatically format your code before each commit.
61+
CI will reject poorly formatted code as well as code that won't build. So, please install these hooks to avoid wasting CI resources.
5262

5363
1. Install `pre-commit`:
5464
```sh
@@ -58,51 +68,73 @@ pip install pre-commit
5868
```sh
5969
pre-commit install
6070
```
61-
62-
> **Note**: These hooks will automatically run `black` for the backend code in Python and clang-format for the `MediaProcessor/src/`, before every commit. For a better experience, enable 'Format on Save' on your IDE, and point to the `.clang-format` file for C++.
71+
> [!TIP]
72+
> These hooks will automatically run `black` for the backend code in Python and `clang-format` for the `MediaProcessor/src/`, at every commit.
73+
>
74+
> For a better experience, enable 'Format on Save' on your IDE, and point to the `.clang-format` file for C++.
6375
6476
#### Step 4: Make Your Changes
6577

66-
As described above, make your changes on the dedicated issue branch, that you've generated via the GitHub Web UI. Here's an example
78+
As described above, make your changes on the dedicated issue branch (if you don't see one, ask the maintainers to open one for you).
79+
80+
Here's an example
6781
```sh
6882
git fetch origin
6983
git switch 123-fix-certain-bug-in-core
7084
git add -u
71-
git commit -m "Core: Fix bug where ..."
85+
git commit -m "Core: Fix bug in ..."
7286
git push origin 123-fix-certain-bug-in-core
7387
```
74-
Please ensure commit hygeine and use the following prefixes:
75-
* For changes in the MediaProcessor: `Core: <commit message>`
76-
* For changes in the backend: `Backend: <commit message>`
77-
* For changes in the backend: `Frontend: <commit message>`
78-
79-
Please adhere to the following practices:
80-
* Write your commit messages in imperative form, e.g. "Fix bug where..", instead of "Fixed bug where.."
81-
* Avoid long commit message bodies. Instead give a brief message, add 2 blank lines then provide further context where needed. Here the imperative form is not required.
88+
> [!IMPORTANT]
89+
> See our [Commit Guidelines](#commit-guidelines) for details on how to write commit messages.
8290
8391
#### Step 5: Submit a Pull Request
8492

85-
Submit a pull request explaining the nature of the changes.
93+
Submit a pull request explaining the nature of the changes.
8694

8795
### Pull Request Guidelines:
88-
* **Keep it Modular**: Focus on a singular unit of work for each pull request. This helps make the review process quicker and more efficient. If you're in doubt, feel free to clarify over at the discussions section or at the Discord server.
89-
* **Write a Useful Description**: Clearly describe what changes have been made and why they are necessary.
90-
* **Reference Issues**: Link the underlying issue in your pull request description using `Closes #issue-number`.
96+
* **Keep it Modular**: Focus on a singular work units for each PR. This helps keep the review process efficient.
97+
* **Provide Context**: Clearly describe the nature and justification of the changes. If already justified elsewhere on Github, e.g. issues, linking is sufficient.
98+
* **Reference Issues**: Link the underlying issue in your pull request description using `Closes #<issue-number>`.
99+
100+
### Commit Guidelines
101+
Please ensure commit hygeine and use the following specifiers:
102+
* `CI: <commit message>` for changes under the ``.github/workflow` files
103+
* `Docs: <commit message>` for updates to the documentation
104+
* `Core: <commit message>` for changes in `MediaProcessor`
105+
* `Backend: <commit message>` for changes in the backend
106+
* `Frontend: <commit message>` for changes in the frontend
107+
* `Tooling: <commit message>` for changes in any tools we have, such as the project launcher.
108+
109+
Please adhere to the following practices:
110+
* Start your commit with the appropriate specifier as listed above.
111+
* Write your commit messages in imperative form, e.g. `Core: Fix bug in..`, instead of `Core: Fixed bug in..`
112+
* Avoid long headers. Instead give a brief explanation, add a blank line then provide further context where needed. Here the imperative form is not required, and it may be good to explain briefly the nature and justification of the changes.
113+
114+
Here's an example:
115+
116+
```sh
117+
CI: Update image release workflow with multi-arch support.
118+
119+
This updates the GHCR image release workflow to provide the `latest`
120+
image with multi-architecture support for amd64 and arm64.
121+
```
91122

92123
### Style Guidelines:
93-
- **Python**: Please use black for formatting Python code. This is automatically done if you have set up the pre-commit hooks.
94-
- **C++**: Please follow the existing style for C++ files (refer to the .clang-format file). The pre-commit hooks will automatically run clang-format on `MediaProcessor/src`.
124+
- **C++**: Please follow the existing style for C++ files (refer to the .clang-format file).
125+
- **Python**: Please use `black` for formatting Python code.
126+
> [!NOTE]
127+
> These are done automatically if you installed the precommit hooks as described [above](#step-3-set-up-pre-commit-hooks).
95128
96129
### Commenting Guidelines:
97130

98131
#### General Rules:
99-
- **Avoid Redundancy**: Do not add comments for variables, parameters or functions that are self-explanatory.
100-
- **High-Level Overviews**: Add comments for public member functions and classes to provide a brief overview of what they do. Include details if the method performs multiple steps or has a more complex workflow.
101-
- **Minimal Private Method Comments**: Avoid commenting on private methods or member variables unless they perform non-obvious functions.
102-
- **Doxygen Style for Public API**: Use Doxygen-style comments (e.g., `@brief`) for public API documentation.
132+
- **Avoid Redundancy**: Do not add comments for variables, parameters or functions that are self-explanatory. When commenting, focus on why instead of what.
133+
- **High-Level Overviews**: Add comments for public member functions and classes to provide a brief overview of what they do. Include details if the workflow may not be immediately obvious to the reader.
134+
- **Doxygen-style for Public API**: Use Doxygen-style comments (e.g., `@brief`) for public API documentation.
103135
- **Clearly Note Exceptions**: If it's possible for a function to throw, clearly document this in the public API with a `@throws` tag.
104136

105-
#### Comment Style Example:
137+
Here's an example for a public member function:
106138
```cpp
107139
/**
108140
* @brief Merges the audio and video files into a single output file.
@@ -112,8 +144,5 @@ Submit a pull request explaining the nature of the changes.
112144
bool mergeMedia();
113145
```
114146

115-
#### Class Comments:
116-
Provide a brief description of what the class is responsible for. For abstract classes or interfaces, a minimal comment indicating its purpose is sufficient.
117-
118147
### Got Questions?
119-
Got questions, feedback or a feature request? Don't miss the [discussion](https://github.com/omeryusufyagci/fast-music-remover/discussions), and the [discord server](https://discord.gg/xje3PQTEYp) to get in touch!
148+
Got questions, feedback or a feature request? Don't miss the [discussion](https://github.com/omeryusufyagci/fast-music-remover/discussions), and the [discord server](https://discord.gg/xje3PQTEYp) to get in touch.

0 commit comments

Comments
 (0)