Pure python implementation of simple data structures and some basic algorithms focused on readability.
Project description
noxcollections
simple, clean, pure python collections
noxcollections is pure Python implementation of basic data structures and a few basic algorithms operating on them.
Disclaimer
This project’s main purpose is to get myself acquainted to the process of developing a proper python package with the common tooling used for testing, linting, type checking, and building in python.
Additionally I hope to refresh and better structure my knowledge about the implemented data structures and algorithms.
For the reasons stated above this project is mainly meant for educational purposes. If you need performance built-in package collections as well as some other packages from PyPI will probably serve you better (due to better optimization as well as the fact that most of them are implemented as C extensions).
Goals
Following goals are most important to this project:
Clean, modern code
Full test coverage
Fully typed public API
Current state
The following lists contain planned features and their state current state.
This package is currently before its first release.
Data structures
- [ ] Linked lists and other data structures that can be based on them
[x] Linked list
[ ] Doubly linked list
[x] Stack
[ ] Queues
[ ] Other list types
[ ] Tree based structures
[ ] Graphs based structures
Algorithms
- [ ] Search Algorithms
[ ] Binary search
- [ ] Sorting Algorithms
[ ] Bubble sort
[ ] Merge sort
[ ] Quick sort
[ ] Graph algorithms (TBD)
How to use
For use only Python(3.8+) interpreter is needed. To run test/linters/mypy use of Poetry is recommended. Further instructions will assume you have it installed.
Installation
Once the first release (0.1.0) will be completed the package will be published to PyPI. However for now package can be build through Poetry in a following way:
Install in any environment using pip
poetry build # build, from main repository directory
pip install dist/noxcollections-*.whl # install using pip
Using Poetry
First install the package in the environment manage by Poetry:
poetry install # build, from main repository directory
And then call your script from the main repository’s directory prefacing it with poetry for example if your file is int same directory and as called main.py:
poetry python main.py
Testing and linting
Testing uses the pytest package for testing and tox to run the test suite against multiple versions of Python:
3.8
3.9
3.10
Tox configurations also does linting (using black and flake8) and type checking (using mypy)
To run all of the aforementioned tools using tox (after installing all of the dependencies and package using poetry install):
poetry run tox
To run those tools more selectively check the tox.ini file to check the names of the environments you wish to run.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file noxcollections-0.1.0.tar.gz.
File metadata
- Download URL: noxcollections-0.1.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.13 Linux/5.17.15-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82c14caaad51a62a4188628eda202b936f7e9f4de29f7c34ab8e2c6e70d4181e
|
|
| MD5 |
6482215b72e73a829ec840688ee39eae
|
|
| BLAKE2b-256 |
61161980d7dc6a31e82b4f59557b8160b98f9bf56b2d2163a0a7be1115b0d951
|
File details
Details for the file noxcollections-0.1.0-py3-none-any.whl.
File metadata
- Download URL: noxcollections-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.13 Linux/5.17.15-1-MANJARO
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8535a54c659421946232cedcff53b6ec4d2b3873becee1ab1f54f52e4bff0d6c
|
|
| MD5 |
a912208d60ff57952131cdba077b31b3
|
|
| BLAKE2b-256 |
2701e29f7dcbd8e889bcd562b599a896285785b0ad1ad161a1edd44b2a78da26
|