This project is an exercise in:
- Domain Driven Design
- Test Driven Development
- Pythonic packages and modules
- SQLAlchemy and Alembic integration
Create virtualenv:
# virtualenv virtualenv
# source virtualenv/bin/activate
Install requirements:
# pip install --requirement=requirements.txt
The domain entity groups are:
- Inventory: To track movement of stock
- Sales: Documents which describe purchase orders and invoices containing costs of goods sold
- Products: Details of goods for sale
- Taxons: Hierarchical grouping of products
- Customers: Entities which are able to purchase products and be invoiced
Domain services are:
- Pricing service: Calculate product discounts based on product category and customer discount tier
- Ordering service: Collect orders and acknowledge them
- Delivery service: Aggregate orders from a customer into a delivery
- Invoicing service: Create invoices for deliveries, orders or ad-hoc
Run tests:
# nosetests domain -d -v [--with-coverage --cover-branches --cover-package=domain --cover-html]
Comprised of:
- SQLAlchemy: Database library used to perform all database calls
- alembic: Migrations tool
Run tests:
# nosetests infrastructure -d -v -s
Options available:
export SQLITE_ECHO=1
for more database engine verbosityexport SQLITE_IN_MEMORY=1
to run tests on in-memory sqlite instance