This page describes how to set up a development environment, and other information useful for developers to be aware of.
The following instructions assume that "pyenv" is installed to enable the setup of an isolated Python environment.
See the following for setup instructions:
Once "pyenv" have been installed, install the Python version specified:
> pyenv install $(cat .python-version)
- Clone the "preserve" Git repository:
> git clone [email protected]:umd-lib/preserve.git
- Switch to the "preserve" directory:
> cd preserve
- Set up the virtual environment:
> pyenv local $(cat .python-version)
> python -m venv .venv --prompt preserve
> source .venv/bin/activate
If the virtual environment has already been setup:
> source .venv/bin/activate
- Run "pip install", including the "dev" and "test" dependencies:
Bash:
> pip install -e .[dev,test]
Zsh:
> pip install -e .'[dev,test]'
To run the tests:
> pytest
Application code style should generally conform to the guidelines in PEP 8. The "pycodestyle" tool to check compliance with the guidelines can be run using:
> pycodestyle .
For organizing modules, use isort:
> isort .