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
+16-9
Original file line number
Diff line number
Diff line change
@@ -24,14 +24,20 @@ python3 -m venv env
24
24
source env/bin/activate
25
25
```
26
26
27
-
#### Install development dependencies:
27
+
#### Install development dependencies
28
28
29
-
Install the project's development dependencies, which include testing and documentation tools:
29
+
Install the project's dependencies by running:
30
30
31
31
```bash
32
32
pip install -e .[develop]
33
33
```
34
34
35
+
Additionally, to ensure you have all the necessary tools for code formatting, linting, and additional development utilities, install the requirements from `requirements-dev.txt`:
36
+
37
+
```bash
38
+
pip install -r requirements-dev.txt
39
+
```
40
+
35
41
## Navigating the Project
36
42
37
43
* The main source code is located in the `albumentations/` directory.
@@ -66,7 +72,7 @@ pip install -e .[develop]
66
72
67
73
### Using Pre-commit Hooks
68
74
69
-
To maintain code quality and consistency, we use pre-commit hooks. These hooks run checks on your commits before they are submitted, helping catch common issues early. To set up pre-commit hooks in your local repository, follow these steps:
75
+
To maintain code quality and consistency, we use pre-commit hooks. Follow these steps to set up pre-commit hooks in your local repository:
70
76
71
77
1.**Install pre-commit:** If you haven't already, you need to install pre-commit on your machine. You can do this using pip:
72
78
@@ -84,9 +90,9 @@ pre-commit install
84
90
85
91
This command sets up the pre-commit hooks based on the configurations found in `.pre-commit-config.yaml` at the root of the repository.
86
92
87
-
3.**Run pre-commit hooks:**
93
+
3.**Running pre-commit hooks:**
88
94
89
-
Pre-commit will now automatically run on each commit. However, you can manually run the checks on all files in the repository with:
95
+
Pre-commit will automatically run the configured hooks on each commit. You can also manually run the hooks on all files in the repository with:
90
96
91
97
```bash
92
98
pre-commit run --all-files
@@ -110,19 +116,20 @@ Run the tests:
110
116
111
117
With `pytest` installed, you can run all tests using the following command from the root of the repository:
112
118
113
-
bash
114
-
Copy code
119
+
```bash
115
120
pytest
121
+
```
122
+
116
123
This will execute all the tests and display the results, indicating whether each test passed or failed.
117
124
118
-
**Tip**: If you've made changes to a specific area of the library, you can run a subset of the tests related to your changes. This can save time and make it easier to debug issues. Use the pytest documentation to learn more about running specific tests.
125
+
**Tip**: If you've made changes to a specific area of the library, you can run a subset of the tests related to your changes. This can save time and make it easier to debug issues. Use the `pytest` documentation to learn more about running specific tests.
119
126
120
127
### Ensuring Your Contribution is Ready
121
128
122
129
* After setting up pre-commit hooks and ensuring all tests pass, your contribution is nearly ready for submission.
123
130
* Review your changes one last time, ensuring they meet the project's coding guidelines and documentation standards.
124
131
* If your changes affect how users interact with Albumentations, update the documentation accordingly.
125
-
*
132
+
126
133
By following these guidelines, you help ensure that Albumentations remains a high-quality, reliable library. We appreciate your contributions and look forward to your pull request!
0 commit comments