clu-phontools
is written for Python >= v3.8. One option for development is to install the library in a virtual environment (ex. conda
, venv
, poetry
, etc.). Using conda
, the library can be installed interactively in an isolated environment using the following commands:
conda create --name clu-phontools python=3.8 ipython
source activate clu-phontools
# execute the following command from the project root:
pip install -e ".[all]"
# install the pre-commit hooks (as a convenience)
pre-commit install -t pre-push
[all]
will include dependencies for running tests and generating the documentation.
For those familiar with Docker, another option is to use a container with bind mounts as a development environment. Note that the instructions below assume you're developing using a Linux-based environment (they've also been tested on MacOS Catalina).
First, you'll need to build the docker image:
docker build -f Dockerfile -t "parsertongue/clu-phontools:latest" .
Launch a container using this image and connect to it:
docker run -it -v $PWD:/app "parsertongue/clu-phontools:latest /bin/bash"
Thanks to the bind mount, changes made to files locally (i.e., outside of the container) will be reflected inside the running container. The parsertongue/clu-phontools
includes Jupyter and iPython:
ipython
from clu.phontools import ReAline
realigner = ReAline()
If you want to save some space on your machine by removing images and containers you're no longer using, see the instructions here. As always, use caution when deleting things.