Skip to content

celeen/PythonDataStructures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Exploring Data Structures in Python

About

This repo is the skeleton for an exploratory, TDD-based course on Data Structures using Python. The series is based on Dave Astels' DBC Deep Dives, and adapted for implementation in, and of, the Python language.

I've done a bit of asking around, and attempted to adopt most commonly followed practices in the world of python testing. Tests are written using the built in unittest framework and run using nose. A few naming conventions might look different, because I've framed them around what I think is the best way to teach the material through TDD (and a bit of BDD).

Using this Repo

Dependencies

Here's a detailed breakdown is the software you'll need in order to work through these exercises:

  • You'll need git, for cloning the repo:
    • First, double check to see if you already have it: git --version
    • If you don't, visit this website for instructions.
  • Make sure you have python installed, and check the version: this repo uses 2.x
    • python --version will check the version you're using
    • if you're using python 3.x, and you don't already have a tool like pyenv installed, go ahead and install it. After it's installed, check out the docs for which commands will set up your environment.
    • If this stuff doens't work for you (or if you're on windows- sorry) don't worry too much. These exercises should be compatible with python 3, but I can't guarantee that.
  • install nose: pip install nose

Getting started

  • First, clone the repo: git clone https://github.com/celeen/PythonDataStructures.git
  • Then choose the Data Structure you're exploring- take, for example, Lists.
    • cd into the tests directory, and run nosetests list_tests.py
      • run nosetests -v list_tests.py for verbose output
    • confirm it runs, and that everything passes
    • Find the related file in the main package, and delete its contents.
    • run the tests again; confirm they run and that nothing passes.

Happy Coding!

##Notes: ###Lists:

-You get remove() and append() for free. Please attempt to implement the others using these two. -Thanks to @gotrhythm88 for noticing that the initial implementation of pop() assumes there are no duplicates in the list. The tests have been changed, and a good solution is a WIP right now. Feel free to submit a pull reuqest if you've got one!

Feedback

Any feedback is welcome in the form of PRs, issues, or emails. This is a work in progress.

About

adaptation of dastels dbc-deep-dives in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages