Project Structure & Creating Packages

Today we will walk through creating a Python package from scratch, and walk through the following:

  • Creating a github repository

    • Importance of adding a README
    • Importance of adding a LICENSE
    • Importance of adding a .gitignore
  • Creating a Python package

    • importance of the __init__.py file
    • relative vs. absolute imports
  • Creating and using test scripts

    • the tests directory
    • the nosetests command (py.test is also very nice)
  • Making your package installable

    • the setup.py script
    • Python's install path
  • Creating and using sphinx documentation

    • the doc directory
    • installing sphinx and using ReStructured Text
    • template: sphinx-quickstart or (better) copy shablona/doc template
  • Continuous integration with Travis (if we have time)

    • the .travis.yml file

For more detail on all of this, you can refer back to the screen-capture video that I will create during the lecture.

More Information