Skip to content

Commit acaefc4

Browse files
committed
Beautify README
Signed-off-by: Gourav <[email protected]>
1 parent ed88315 commit acaefc4

File tree

1 file changed

+179
-42
lines changed

1 file changed

+179
-42
lines changed

README.md

Lines changed: 179 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,269 @@
1+
12
PyDataStructs
23
=============
34

5+
6+
47
[![Build Status](https://github.com/codezonediitj/pydatastructs/actions/workflows/ci.yml/badge.svg)](https://github.com/codezonediitj/pydatastructs/actions) [![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/PwY7wQDG5G) [![Join the chat at https://gitter.im/codezonediitj/pydatastructs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/codezoned2017/Lobby) [![Discuss at [email protected]](https://img.shields.io/badge/discuss-pydatastructs%40googlegroups.com-blue.svg)](https://groups.google.com/forum/#!forum/pydatastructs) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/codezonediitj/pydatastructs/pulls) [![codecov](https://codecov.io/gh/codezonediitj/pydatastructs/branch/master/graph/badge.svg)](https://codecov.io/gh/codezonediitj/pydatastructs)
58

6-
About
7-
-----
9+
10+
11+
📚 About
12+
---------
13+
14+
815

9-
- **PyDataStructs** project aims to be a Python package for various data structures and algorithms (including their parallel implementations).
16+
- **PyDataStructs** project aims to be a Python package for various data structures and algorithms (including their parallel implementations).
17+
18+
1019

1120
- We are also working on providing C++ backend via Python C-API for high performance use cases.
1221

13-
Why PyDataStructs?
22+
23+
24+
🚀 Why PyDataStructs?
1425
-------------------
1526

16-
- **Single package for all your data structures and algorithms**
27+
28+
29+
- **Single package for all your data structures and algorithms**
30+
31+
1732

18-
- **Consistent and Clean Interface** - The APIs we have provided are consistent with each other, clean, and easy to use. We make sure of that before adding any new data structure or algorithm.
33+
- **Consistent and Clean Interface** - The APIs we have provided are consistent with each other, clean, and easy to use. We make sure of that before adding any new data structure or algorithm.
1934

20-
- **Well Tested** - We thoroughly test our code before making any new addition to PyDataStructs. 99 percent lines of our code have already been tested by us.
35+
2136

22-
Installation
37+
- **Well Tested** - We thoroughly test our code before making any new addition to PyDataStructs. 99% of the lines of our code have already been tested by us.
38+
39+
40+
41+
🔧 Installation
2342
------------
2443

44+
45+
2546
If you are using Anaconda/Mamba, you can setup your development environment by executing the following commands,
2647

48+
49+
2750
```bash
28-
conda env create --file environment.yml
29-
conda activate pyds-env
51+
52+
conda env create --file environment.yml
53+
54+
conda activate pyds-env
55+
3056
```
3157

58+
59+
3260
You can install the library by running the following command,
3361

62+
63+
3464
```python
65+
3566
python scripts/build/install.py
67+
3668
```
3769

70+
71+
3872
For development purposes i.e., if you intend to be a contributor,
3973

74+
75+
4076
```python
77+
4178
python scripts/build/develop.py
79+
4280
```
4381

44-
Make sure you change your working directory to `pydatastructs` before executing any of the above commands. Also, your python version should be at least `3.8`.
82+
83+
84+
Make sure you change your working directory to `pydatastructs` before executing any of the above commands. Also, make sure your python version is at least `3.8`.
4585

46-
Testing
86+
87+
88+
✅ Testing
4789
-------
4890

49-
For testing your patch locally follow the steps given below,
91+
92+
93+
For testing your patch locally follow the steps given below:
5094

51-
1. Install [pytest-cov](https://pypi.org/project/pytest-cov/). Skip this step if you are already having the package.
52-
2. Run, `python3 -m pytest --doctest-modules --cov=./ --cov-report=html`. Look for, `htmlcov/index.html` and open it in your browser, which will show the coverage report. Try to ensure that the coverage is not decreasing by more than 1% for your patch.
95+
96+
97+
1. Install [pytest-cov](https://pypi.org/project/pytest-cov/). Skip this step if you already have the package installed.
98+
2. Run tests and check the coverage report:
99+
100+
```python
101+
python3 -m pytest --doctest-modules --cov=./ --cov-report=html
102+
```
103+
Look for `htmlcov/index.html` and open it in your browser, which will show the coverage report. Try to ensure that the coverage is not decreasing by more than 1% for your patch.
104+
53105

54106
For a good visualisation of the different data structures and algorithms, refer the following websites:
55107

56-
- <https://visualgo.net/>
57-
- <https://www.cs.usfca.edu/~galles/visualization/>
108+
109+
110+
- [VisuAlgo](https://visualgo.net/)
111+
112+
- [USFCA Visualization](https://www.cs.usfca.edu/~galles/visualization/)
113+
114+
58115

59116
You can use the examples given in the following book as tests for your code:
60117

61-
- [https://opendatastructures.org/ods-python.pdf](https://opendatastructures.org/ods-python.pdf)
118+
119+
120+
- [Open Data Structures (Python)](https://opendatastructures.org/ods-python.pdf)
121+
122+
62123

63124
### Light weighted testing (without benchmarks)
64125

126+
127+
65128
Make sure you have activated the conda environment: `pyds-env` and your working directory is `../pydatastructs`.
66129

130+
131+
67132
In the terminal, run: `python -c "from pydatastructs.utils.testing_util import test; test()"`.
68133

134+
135+
69136
This will run all the test files, except benchmark tests. This should be used if benchmark tests are computationally too heavy to be run on your local machine.
70137

71-
Why do we use Python?
138+
139+
140+
🐍 Why do we use Python?
72141
------------------
73142

143+
144+
74145
- As we know Python is an interpreted language and hence executing programs in it is slower as compared to C++.
75146

147+
148+
76149
- We still decided to use Python because the software development can happen at a much faster pace and it is much easier to test various software designs and APIs as coding them out takes no time in Python.
77150

78-
- However, keeping the need of the users in mind, we are also working on providing a C++ backend, which will happen quickly as we would be required to just translate the tested code rather than writing it from scratch.
151+
79152

80-
How to contribute?
81-
------------------
153+
- However, keeping the need of the users in mind, we are also working on providing a C++ backend, which will happen quickly as we would be required to just translate the tested code rather than writing it from scratch.
82154

83-
Follow the steps given below,
155+
84156

85-
1. Fork, <https://github.com/codezonediitj/pydatastructs/>
86-
2. Execute, `git clone https://github.com/codezonediitj/pydatastructs/`
87-
3. Change your working directory to `../pydatastructs`.
88-
4. Execute, `git remote add origin_user https://github.com/<your-github-username>/pydatastructs/`
89-
5. Execute, `git checkout -b <your-new-branch-for-working>`.
90-
6. Make changes to the code.
91-
7. Add your name and email to the AUTHORS, if you wish to.
92-
8. Execute, `git add .`.
93-
9. Execute, `git commit -m "your-commit-message"`.
94-
10. Execute, `git push origin_user <your-current-branch>`.
95-
11. Make PR.
157+
✨ How to contribute?
158+
------------------
96159

97-
That's it, 10 easy steps for your first contribution. For future contributions just follow steps 5 to 10. Make sure that before starting work, always checkout to master and pull the recent changes using the remote `origin` and then start following steps 5 to 10.
160+
161+
162+
Follow the steps given below:
163+
164+
165+
1. **Fork the repo** [PyDataStructs on GitHub](https://github.com/codezonediitj/pydatastructs)
166+
167+
2. **Clone your fork**:
168+
169+
```bash
170+
git clone https://github.com/<your-username>/pydatastructs
171+
```
172+
3. **Navigate to the project directory**:
173+
```bash
174+
cd pydatastructs
175+
```
176+
4. **Add a remote to sync your fork with the upstream repository**:
177+
```bash
178+
git remote add origin_user https://github.com/<your-username>/pydatastructs
179+
```
180+
5. **Create a new branch**:
181+
```bash
182+
git checkout -b <your-branch-name>
183+
```
184+
6. **Make changes and test your code**.
185+
7. **Add yourself to AUTHORS** (optional).
186+
8. **Stage your changes**:
187+
```bash
188+
git add .
189+
```
190+
9. **Commit your changes**:
191+
```bash
192+
git commit -m "Describe your changes"
193+
```
194+
10. **Push your branch**:
195+
```bash
196+
git push origin_user <your-branch-name>
197+
```
198+
11. **Create a pull request (PR)**.
199+
200+
That's it, 11 easy steps for your first contribution. For future contributions just follow steps 5 to 11.
98201

99202
See you soon with your first PR.
100203

204+
205+
💡 _Tip_: Always pull the latest changes from `master` before creating a new branch for your contribution.
206+
207+
208+
🎯 Important Links
209+
----------
210+
211+
101212
It is recommended to go through the following links before you start working.
102213

214+
215+
103216
- [Issue Policy](https://github.com/codezonediitj/pydatastructs/wiki/Issue-Policy)
217+
104218
- [Pull Request Policy](https://github.com/codezonediitj/pydatastructs/wiki/Pull-Request-Policy)
219+
105220
- [Plan of Action for the Projects](https://github.com/codezonediitj/pydatastructs/wiki/Plan-of-Action-for-the-Projects)
106221

107-
Guidelines
222+
223+
224+
225+
📜 Guidelines
108226
----------
109227

228+
229+
110230
We recommend you to join our [discord channel](https://discord.gg/PwY7wQDG5G) for discussing anything related to the project.
111231

112-
Please follow the rules and guidelines given below,
232+
233+
234+
Please follow the rules and guidelines given below:
235+
236+
113237

114238
1. Follow the [numpydoc docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html).
239+
115240
2. If you are planning to contribute a new data structure then first raise an **issue** for discussing the API, rather than directly making a PR. Please go through [Plan of Action for Adding New Data Structures](https://github.com/codezonediitj/pydatastructs/wiki/Plan-of-Action-for-Adding-New-Data-Structures).
241+
116242
3. For the first-time contributors we recommend not to take a complex data structure, rather start with `beginner` or `easy`.
243+
117244
4. We don't assign issues to any individual. Instead, we follow First Come First Serve for taking over issues, i.e., if one contributor has already shown interest then no comment should be made after that as it won't be considered. Anyone willing to work on an issue can comment on the thread that he/she is working on and raise a PR for the same.
245+
118246
5. Any open PR must be provided with some updates after being reviewed. If it is stalled for more than 4 days, it will be labeled as `Please take over`, meaning that anyone willing to continue that PR can start working on it.
247+
119248
6. PRs that are not related to the project or don't follow any guidelines will be labeled as `Could Close`, meaning that the PR is not necessary at the moment.
120249

250+
251+
121252
The following parameters are to be followed to pass the code quality tests for your Pull Requests,
122253

254+
255+
123256
1. There should not be any trailing white spaces at any line of code.
257+
124258
2. Each `.py` file should end with exactly one new line.
125-
3. Comparisons involving `True`, `False`, and `None` should be done by
126-
reference (using `is`, `is not`) and not by value(`==`, `!=`).
127259

128-
Keep contributing!!
260+
3. Comparisons involving `True`, `False`, and `None` should be done by reference (using `is`, `is not`) and not by value(`==`, `!=`).
261+
262+
263+
264+
🚀 Contributors
265+
--------
129266

130-
Thanks to these wonderful people ✨✨:
267+
A big thank you to these amazing contributors! 🎉
131268

132-
![https://github.com/codezonediitj/pydatastructs/graphs/contributors](https://contrib.rocks/image?repo=codezonediitj/pydatastructs)
269+
![https://github.com/codezonediitj/pydatastructs/graphs/contributors](https://contrib.rocks/image?repo=codezonediitj/pydatastructs)

0 commit comments

Comments
 (0)