Python task manager from scratch, part 8: Requirements management

Our task manager does stuff now, though in a primitive form. I ended the last installment by reflecting on the tons and tons of stuff that this software does not do and that we would like it to do.

Testing software is an essential part of improving it. (Here are some other things I think about software testing, if you're curious.) And the best way to test almost all software is with other software.

So, even at this very early stage, we must confront the question of incorporating other software into our software. There is a lot to know here: again, you'll hear people say that knowing a lot about the subject is a hard prerequisite for doing anything useful as a programmer. This claim is refuted by the observation that only a small minority of working programmers have any kind of expert knowledge of how software packaging, distribution, etc. work.

I therefore recommend you absorb these facts, at any level of depth you find appropriate right now. As always, I state them briefly not because they are easy to understand but because I'm relying on excellent treatments elsewhere. 1. You can use other software--especially, other Python software--in the software you write in Python. 1. A common convention for documenting what software you're incorporating is by listing the software you plan to use in a file called requirements.txt. 1. Software is distributed in units called "packages." 1. Python software packages are commonly installed with a tool called "pip".

What you should do now

  1. Install pip or pip3.
  2. Create a requirements.txt file in the veery/ directory.
  3. Put a single line, pytest==7.1.2, in that file.
  4. Run pip install -r requirements.txt.
  5. (Optional:) Play with pip, Pytest, etc. as you choose.

As you might have guessed, we will be using Pytest to test our code. Among full-featured test frameworks for Python, it is by far the friendliest and most intuitive.

Good luck! Here's the current commit in the veery/ repository.


Home page