Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basil's Wave SE Challenge #158

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5c04bad
First Commit
Feb 15, 2017
dedf988
refactor(FielStructure): building the file structure
Feb 16, 2017
0ced7b5
feat(Migration): Complete first migration and DB setup
Feb 16, 2017
dfa070b
feat(Utilities): Add helper functions to upload file
Feb 16, 2017
f67a5e7
refactor(Template): Setup basic templates and add gitignore
Feb 16, 2017
d1d3db6
Include(Asset): Assets files for template included
Feb 16, 2017
f7dca53
feat(UploadForm): Fix Upload Form on the template
Feb 16, 2017
4bfb8c2
feat(ExpenseSummary): Page with chart and simple table
Feb 16, 2017
a9329df
Refactor(CSV): Remove old csv files from git (cache)
Feb 16, 2017
419ad3b
feat(DataTables): Add pagination and search for Data Tables
Feb 16, 2017
4db7bae
feat(Summary): SUmmary sheets with details and chart added
Feb 17, 2017
79f33c0
refactor(Template): Fix HTML and Links in the components
Feb 17, 2017
ec57a93
feat(Upload): Upload button styles and datatables sort default
Feb 17, 2017
0796263
refactor(Template): refactor html template and add font icons
Feb 17, 2017
9ce266a
feat(Timezone): Add timezone aware time (EST)
Feb 17, 2017
de11b46
feat(Dates): Date filters to show month and year
Feb 17, 2017
1c0b930
refactor(HTML): templating and formats
Feb 17, 2017
ea9c87d
fix(Sidebar-Image): Syntax fixes
Feb 17, 2017
e4cfaec
Merge branch 'master' of github.com:basilkhan05/se-challenge-expenses
Feb 17, 2017
a351dc9
Add Setup Instructions to README file
Feb 17, 2017
095328f
Delete urls.py
Feb 17, 2017
2d62274
Update README File
Feb 17, 2017
7971eb5
Add Credits to README
Feb 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# media and databases #
######################
*.sqlite3
*.sqlite3-journal
/media/
/wave/myapp/migrations/*
!/wave/myapp/migrations/__init__.py


*.pyc
.DS_Store
61 changes: 61 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
# Basil's Wave Software Development Challenge

## Project Development Environment Setup

### Instructions for setting up on Mac OS X:
(optional) Feel free to set up a virtual env for the development setup

- Install Python, pip and Django 1.10.2
```
brew install python

sudo easy_install pip

sudo pip install Django

```
- Clone Repository
```
git clone [email protected]:basilkhan05/se-challenge-expenses.git
```
- Run Database Migrations
```
cd se-challenge-expenses

python manage.py migrate
```
- Run Development Sever
```
python manage.py runserver
```
- Checkout the application in action at http://localhost:8000/


## Application Architecture

The CSV upload and parser application was built in Django 1.10.2 with a sqlite3 database. Django's Model-View-Template (MVT) framework makes the application modular with separation of concerns. This applies not only to the UI and template of the application, but also to the Models and Views that were generated for the csv files uploaded and for the expense summaries.

This Modular design can help in the integration of this application/feature into a larger application or Wave's production app. Separating the helper functions and using packages such as csv.DictReader can also help modify the helper functions to parse any other csv format with different header titles that can be defined or chosen by the user via an Admin UI.

The html templates were further split into larger components (header, navbar, sidebar, etc.) that can assist a front-end engineer to integrate a component or parts of a component into an existing front-end framework like React or Angular. Furthermore, when deploying this application, the static files, which are further split into their own folder, can be served over a CDN or an AWS S3 buckets in production.

The choice of a light weight relational database (sqlite3) was made to help in quick development setup time as well as the ability to use powerful SQL queries to extract and summarize expense information and other queries as the need arises.

### Future feature considerations (not an exhaustive list):
- File type validation
- CSV Field Type Validation (for dates and amounts)
- 'Parsing Status' flag in the database to let the user know that the file is still being processed/parsed (for very large file sizes)
- Better memory handling when parsing very large file sizes
- Limit on File Upload Size
- Upload feature implemented as an API to get response from the server on upload and parsing status
- Implementation of UI elements for the above

### Credits:
- [Google Charts](https://developers.google.com/chart/)
- [Material Kit: Free Bootstrap Material Design UI Kit](https://www.creative-tim.com/product/material-kit)
- [Django Project](https://www.djangoproject.com/)
- [minimal-django-file-upload-example](https://github.com/axelpale/minimal-django-file-upload-example)

-----------------------------------
# original README FILE:

# Wave Software Development Challenge
Applicants for the [Software developer](https://wave.bamboohr.co.uk/jobs/view.php?id=1) role at Wave must complete the following challenge, and submit a solution prior to the onsite interview.

Expand Down
10 changes: 10 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env python
import os
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wave.settings")

from django.core.management import execute_from_command_line

execute_from_command_line(sys.argv)
5 changes: 5 additions & 0 deletions static/assets/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading