Packaging a Python library: first steps
Nov 11, 2018
Alexander Junge
1 minute read

A central goal in the development of CoCoScore is to make it as easy as possible for new users to get start with context-aware co-occurrence text mining. So far, I recommended new users to set up a conda virtual environment to install CoCoScore and its dependencies. I now started working on releasing CoCoScore as a library on PyPI.

Releasing on PyPI will allow an installation via pip and make it even easier for new users to get started with CoCoScore because installing conda will not be needed anymore. You can follow my progress on wrapping up the PyPI release in this pull request.

Since I found packaging my first library for PyPI release far from trivial, I would like to share a handful of resources that helped me along the way:

Some of the main changes I made to the code base after going through these resources were:

  • Switching from cocoscore/ to a src/cocoscore/ project layout (after reading this)
  • Switched from unittest-based to pytest-based code testing
  • Using tox to run the test suite against multiple versions of Python and dependencies


comments powered by Disqus