Skip to content

Latest commit

 

History

History
 
 

02-library

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

cs506

This is an example python package for implementing and re-using tools learned in BU CS506

Setup

You need to have python3 and pip installed on your laptop. If you are using windows, please take a look at this resource for an example set up (terminal, git, IDE etc.).

Additionally, I recommend installing virtualenv (pip install this package) to manage the python packages you install for each project you create.

Before you Start

Go to your local CS506-Fall2020/02-library/ folder.

Optional

Create a virtualenv in this folder (for windows users, please see https://programwithus.com/learn-to-code/Pip-and-virtualenv-on-Windows/ for the corresponding commands)

    virtualenv -p python3 <name-of-your-virtual-env>

Activate the virtualenv:

    source <name-of-your-virtual-env>/bin/activate

(to deactivate the environment, just type "deactivate" in your terminal/powershell)

Required

Install the cs506 package locally:

    pip install .

Install all the requirements.txt

    pip install -r requirements.txt

Verify your setup

Run the tests with the following command

    tox 

Ensure that all the tests are failing because of a "NotImplementedError" being raised.

Goal

Take a look at the library functions here and here.

Remove the

raise NotImplementedError()

line and replace it with code that does what the function should do. Test your implementation by running "tox". The goal is to get all tests to pass. Upload your implementations to github by creating a pull request.

Bonus

It's a good idea to take a look at the tests defined here and here, and add a few tests of your own. Remember to use both positive and negative examples for testing.

Contributions are always welcome (and encouraged) to clarify existing documentation in this repository!