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
+53-1Lines changed: 53 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,28 @@
1
-
# Contributing to JsWeb.
1
+
# Contributing to JsWeb
2
2
3
3
First off, thank you for considering contributing. It's people like you that make open-source such a great community. Any contributions you make are **greatly appreciated**.
4
4
5
+
## Development Setup
6
+
7
+
To contribute to JsWeb, you'll need to set up your development environment:
8
+
9
+
```bash
10
+
# 1. Fork and clone the repository
11
+
git clone https://github.com/Jsweb-Tech/jsweb.git
12
+
cd jsweb
13
+
14
+
# 2. Create a virtual environment
15
+
python -m venv venv
16
+
venv\Scripts\activate # Windows
17
+
# source venv/bin/activate # macOS/Linux
18
+
19
+
# 3. Install JsWeb in editable mode with dev dependencies
20
+
pip install -e ".[dev]"
21
+
22
+
# 4. Install pre-commit hooks
23
+
pre-commit install
24
+
```
25
+
5
26
## How to Contribute
6
27
7
28
We use a standard workflow for contributions. If you have an improvement, please follow these steps:
@@ -15,6 +36,7 @@ We use a standard workflow for contributions. If you have an improvement, please
15
36
16
37
3.**Make Your Changes and Commit**
17
38
* Write your code and make sure to add comments and docstrings where necessary.
39
+
* Run tests and linters before committing (see below).
18
40
* Commit your changes with a clear and descriptive commit message.
19
41
*`git commit -m 'feat: Add some AmazingFeature'`
20
42
@@ -25,6 +47,36 @@ We use a standard workflow for contributions. If you have an improvement, please
25
47
5.**Open a Pull Request**
26
48
* Go to the original repository and you will see a prompt to create a Pull Request from your new branch.
27
49
* Provide a clear title and description for your changes, explaining what you've added or fixed.
50
+
* Fill out the PR template completely.
51
+
52
+
## Testing & Code Quality
53
+
54
+
Before submitting your PR, ensure your code passes all checks:
55
+
56
+
```bash
57
+
# Run tests
58
+
pytest Tests/
59
+
60
+
# Run code formatters
61
+
black .
62
+
isort .
63
+
64
+
# Run linters
65
+
flake8 jsweb/
66
+
67
+
# Or run all pre-commit checks at once
68
+
pre-commit run --all-files
69
+
```
70
+
71
+
## Branch Protection
72
+
73
+
The `main` branch is protected and requires:
74
+
* ✅ Pull request with at least 1-2 approving reviews
75
+
* ✅ All CI checks must pass (tests, linting, type checking)
76
+
* ✅ Branch must be up-to-date with main
77
+
* ✅ Code owner review for core changes
78
+
79
+
**Note:** You cannot push directly to `main`. All changes must go through pull requests.
0 commit comments