DSiP: AI for Sleep Disordered Breathing
I recommend using virtualenv for Python development. It is optional, but very helpful and a best practice when working on a team or with different projects. I assume Python 3.7 or newer as well. Personally, I also manage my Python installs using pyenv but that isn't necessary.
You can change the venv directory, but it is handy to just store it inside the
project at .venv
.
python3 -m venv ./.venv --prompt aisdb
source ./.venv/bin/activate
Install pip requirements. For some reason pyEDFlib requires separate installation of numpy first. Numpy is included in the requirements.txt.
# Must install numpy first for pyEDFlib
pip install numpy
pip install -r requirements.txt
jupyter lab
I am putting the EDF files into a folder called local-data
which will not be
in git. We do not want EDF files in git because they are far too large. Anything
you put into the local-data
directory will be ignored by git.
If you need to add new dependencies to the project, be sure to update the
requirements.txt
so that we can all share the same libraries and run the code.
This can be done by updating this file using pip freeze
and then committing it
to git. Then each of us can use it to make sure our environments match. First,
use pip install
to install the new libraries, then:
pip freeze > requirements.txt