Skip to content

Latest commit

 

History

History
87 lines (57 loc) · 1.45 KB

DevelopmentSetup.md

File metadata and controls

87 lines (57 loc) · 1.45 KB

Development Setup

Introduction

This page describes how to set up a development environment, and other information useful for developers to be aware of.

Prerequisites

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)

Installation for development

  1. Clone the "preserve" Git repository:
> git clone [email protected]:umd-lib/preserve.git
  1. Switch to the "preserve" directory:
> cd preserve
  1. 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
  1. Run "pip install", including the "dev" and "test" dependencies:

Bash:

> pip install -e .[dev,test]

Zsh:

> pip install -e .'[dev,test]'

Running the tests

To run the tests:

> pytest

Code Style

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 .