Skip to content

jprestel-rue/python-interview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Interview Challenge

This project is the dead simple beginnings of an application back-end. The master branch is fairly barebones and includes just:

  • db.py a very simple mock database access layer, including mock database content
  • transaction.py a very simple python model of a transaction

Challenge

A junior developer was asked to build the initial Account features, including the ability to view a list of transactions. They've done the work and opened a pull request.

Your task is to review the pull request. Please provide suggestions for improvements and short pieces of replacement code, as appropriate.

Running locally

The code in this project can be run locally with relatively little setup.

Pre-requisites

  • Python 2.7.x
    • On Mac: Recommend installing python@2 via homebrew. Pay attention to the caveats to get the executable on your path.
  • Optional: virtualenv
    • Highly recommend that you install virtualenv as to not impact your global python install

Installation

  • git clone this repo
  • in a terminal, cd into your clone
  • create a python virtualenv for this project and activate it
  • pip install this package in editable mode with the test extras:
    pip install -e .[test]

Checkout the pull-request branch

the master branch is pretty boring, so you'll want to checkout the feature branch created by the junior dev.

git checkout feature/account

Execute the tests

This project uses pytest, so running the tests is a simple command:

pytest -vv

The pytest-sugar plug-in makes pytest's output a little more dev friendly. example pytest-sugar output

About

a simple python project for use in an interview

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages