# Sorting Algorithms Package
A collection of sorting algorithms implemented in Python.
## Introduction
This repository contains a collection of sorting algorithms implemented in Python. The goal of this project is to provide a comprehensive set of sorting algorithms that can be used for educational and practical purposes.
## Features
* Implementation of various sorting algorithms, including:
+ Bubble sort
+ Selection sort
+ Insertion sort
## Installation
You can install this package using pip:
```
pip install siwp2005-james-sort
```
## Usage
You can use the sorting algorithms as follows:
```python
from siwp2005-james-sort.src.sort import bubble_sort, insertion_sort, quick_sort
arr = [3, 2, 1]
arr = bubble_sort(arr)
print(arr) # [1, 2, 3]
arr = [3, 2, 1]
arr = insertion_sort(arr)
print(arr) # [1, 2, 3]
arr = [3, 2, 1]
arr = quick_sort(arr)
print(arr) # [1, 2, 3]
```
## Running Tests
To run the tests, navigate to the root directory of the project and run the following command:
```
python -m unittest tests/test_bubble_sort.py
```
```
python -m unittest tests/test_insertion_sort.py
```
```
python -m unittest tests/test_quick_sort.py
```
This will execute the test cases in `test_bubble_sort.py`,`test_insertion_sort.py`,`test_quick_sort.py` and report any failures or errors.
Alternatively, you can run all tests in the `tests` directory using:
```
python -m unittest discover -s tests -p 'test_*.py'
```
This will discover and run all test files in the `tests` directory that match the pattern `test_*.py`.
Raw data
{
"_id": null,
"home_page": "https://github.com/JamesWilsonLie/siwp2005-james-sort",
"name": "siwp2005-james-sort",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "sorting algorithms",
"author": "James Wilson Lie",
"author_email": "jameswl00012@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/dd/d9/bfeeca31c8862d592cea1d49af06694ba7950bd1e198cefe938ed646bffd/siwp2005_james_sort-0.0.2.tar.gz",
"platform": null,
"description": "# Sorting Algorithms Package\n\nA collection of sorting algorithms implemented in Python.\n\n## Introduction\nThis repository contains a collection of sorting algorithms implemented in Python. The goal of this project is to provide a comprehensive set of sorting algorithms that can be used for educational and practical purposes.\n\n## Features\n* Implementation of various sorting algorithms, including:\n\t+ Bubble sort\n\t+ Selection sort\n\t+ Insertion sort\n\n## Installation\nYou can install this package using pip:\n```\npip install siwp2005-james-sort\n```\n\n## Usage\nYou can use the sorting algorithms as follows:\n```python\nfrom siwp2005-james-sort.src.sort import bubble_sort, insertion_sort, quick_sort\n\narr = [3, 2, 1]\narr = bubble_sort(arr)\nprint(arr) # [1, 2, 3]\n\narr = [3, 2, 1]\narr = insertion_sort(arr)\nprint(arr) # [1, 2, 3]\n\narr = [3, 2, 1]\narr = quick_sort(arr)\nprint(arr) # [1, 2, 3]\n```\n\n## Running Tests\nTo run the tests, navigate to the root directory of the project and run the following command:\n```\npython -m unittest tests/test_bubble_sort.py\n```\n```\npython -m unittest tests/test_insertion_sort.py\n```\n```\npython -m unittest tests/test_quick_sort.py\n```\n\nThis will execute the test cases in `test_bubble_sort.py`,`test_insertion_sort.py`,`test_quick_sort.py` and report any failures or errors.\nAlternatively, you can run all tests in the `tests` directory using:\n```\npython -m unittest discover -s tests -p 'test_*.py'\n```\nThis will discover and run all test files in the `tests` directory that match the pattern `test_*.py`.\n",
"bugtrack_url": null,
"license": null,
"summary": "A collection of sorting algorithms",
"version": "0.0.2",
"project_urls": {
"Bug Tracker": "https://github.com/JamesWilsonLie/siwp2005-james-sort/issues",
"Homepage": "https://github.com/JamesWilsonLie/siwp2005-james-sort"
},
"split_keywords": [
"sorting",
"algorithms"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5a929414d58010627d8f97a0c8f443814949e835d1fe6d82da4b05f1e9689fdf",
"md5": "82fcd9d6fe231805d0311df9fef0f140",
"sha256": "80a8b41d96d67eddb84be45d99826c655ff343866bb5abc2826194a77533496e"
},
"downloads": -1,
"filename": "siwp2005_james_sort-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "82fcd9d6fe231805d0311df9fef0f140",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3814,
"upload_time": "2024-06-13T10:10:17",
"upload_time_iso_8601": "2024-06-13T10:10:17.742403Z",
"url": "https://files.pythonhosted.org/packages/5a/92/9414d58010627d8f97a0c8f443814949e835d1fe6d82da4b05f1e9689fdf/siwp2005_james_sort-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ddd9bfeeca31c8862d592cea1d49af06694ba7950bd1e198cefe938ed646bffd",
"md5": "7338b92d8d436948cb15232e10531f46",
"sha256": "4bf8719187a2e4b07dbc82b046f8bf4846f426700139f18059b74ab25bef44eb"
},
"downloads": -1,
"filename": "siwp2005_james_sort-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "7338b92d8d436948cb15232e10531f46",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3702,
"upload_time": "2024-06-13T10:10:18",
"upload_time_iso_8601": "2024-06-13T10:10:18.860607Z",
"url": "https://files.pythonhosted.org/packages/dd/d9/bfeeca31c8862d592cea1d49af06694ba7950bd1e198cefe938ed646bffd/siwp2005_james_sort-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-13 10:10:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JamesWilsonLie",
"github_project": "siwp2005-james-sort",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "siwp2005-james-sort"
}