Skip to main content

A multi-purpose python package mainly for educational purposes

Project description

Ary's Box (abox)

Build Status Coverage Status


Works In Progress. Done by Ang Ray Yan.

User Note

U1. Installation

Installation using pip is the fastest way to go about getting abox:

pip install abox

U2. Getting Started

An example of what you could do with abox is as follows:

import abox
tree = abox.AVLTree()
for i in range(1, 16):
print('Tree Height (1-based): ', tree.get_height())
print('Preorder Traversal:    ', tree.pre_order())
print('Inorder Traversal:     ', tree.in_order())

And the output is (hopefully) what you would expect :)

Tree Height (1-based):  4
Preorder Traversal:     [8, 4, 2, 1, 3, 6, 5, 7, 12, 10, 9, 11, 14, 13, 15]
Inorder Traversal:      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]

Do refer to the documentation for more details!

Developer Note

pip3 and pip, as well as python3 and python are used interchangeably here.

D1. Installing required dependencies

Firstly, install all required dependencies (within the root directory):

pip3 install -r requirements.txt

D2. Testing

To run all tests, use the following command (in root directory too):

python3 -m pytest tests/ --cov=abox/

If necessary, you can generate a html report (to be stored in htmlcov/ directory)for coverage report instead as follows:

python3 -m pytest tests/ --cov=abox/ --cov-report html

D3. Generating Documentation

To rebuild documentation using Sphinx, you may run the following (in root directory):

sphinx-build -b html docs docs/_build

D4. Packaging/Releasing on PyPI

Run the following command to generate distribution packages:

python3 sdist bdist_wheel
twine upload dist/*

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for abox, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size abox-0.2-py3-none-any.whl (44.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size abox-0.2.tar.gz (12.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page