Skip to content

Commit fd4b929

Browse files
authored
Update CONTRIBUTING.md file
Fix #11
1 parent 4dfb39c commit fd4b929

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,39 @@
22

33
## How to contribute
44

5+
### Run unit tests
6+
After changes made to the project, it's a good idea to run the unit tests before making a pull request.
7+
8+
9+
1. **Run SQL Server**
10+
Make sure you have SQL Server running in your local machine.
11+
Download and install SQL Server [here](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), or you could use docker. Change `testapp/settings.py` to match your SQL Server login username and password.
12+
13+
```
14+
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword42' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest
15+
```
16+
2. **Clone Django**
17+
In `mssql-django` folder.
18+
```
19+
# Install your local mssql-django
20+
pip install -e .
21+
22+
# The unit test suite are in `Django` folder, so we need to clone it
23+
git clone https://github.com/django/django.git --depth 1
24+
```
25+
26+
3. **Install Tox**
27+
```
28+
# we use `tox` to run tests and install dependencies
29+
pip install tox
30+
```
31+
4. **Run Tox**
32+
```
33+
# eg. run django 3.1 tests with Python 3.7
34+
tox -e py37-django31
35+
```
36+
37+
---
538
This project welcomes contributions and suggestions. Most contributions require you to agree to a
639
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
740
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ The following features and additions are planned:
233233

234234
## Contributing
235235

236+
More details on contributing can be found [Here](CONTRIBUTING.md).
237+
236238
This project welcomes contributions and suggestions. Most contributions require you to agree to a
237239
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
238240
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

0 commit comments

Comments
 (0)