Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 1.47 KB

File metadata and controls

79 lines (52 loc) · 1.47 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" and "pyenv-virtualenv" are installed to enable the setup of an isolated Python environment.

See the following for setup instructions:

Once "pyenv" and "pyenv-virtualenv" have been installed, install Python 3.10.8

$ pyenv install 3.10.8

Installation for development

  1. Clone the "library-monitors" Git repository:
> git clone https://github.com/umd-lib/library-monitors.git
  1. Switch to the "library-monitors" directory:
> cd library-monitors
  1. Set up the virtual environment:
$ pyenv virtualenv 3.10.8 library-monitors
$ pyenv shell library-monitors
  1. Run "pip install" to download dependencies:
$ pip3 install -r requirements.txt

Running the Webapp

Create a .env file (then manually update environment variables):

$ cp env-template .env

To start the app:

$ python3 -m flask run

Code Style

Application code style should generally conform to the guidelines in PEP 8. The "pycodestyle" tool can be installed using:

$ pip3 install pycodestyle

Then check compliance with the guidelines by running:

$ pycodestyle .