mardi 15 octobre 2019

Correct way to development python packages

Let's say I have a standard python directory structure of python package like here and consider I need to add a function to the package. More specifically, I want to do it with trial-and-error, by running a test code. What is the correct work-flow for this?

I currently do the following:

  1. do sudo python setup.py install anytime I made a change in the package
  2. source ~/.bashrc
  3. open a python interpreter,
  4. run the test code.

But apparently this flow takes a lot of time to just check the modification via test code. And I feel that I'm doing something wrong, and the better ways exist.

Aucun commentaire:

Enregistrer un commentaire