Skip to content

Latest commit

 

History

History
113 lines (73 loc) · 2.13 KB

File metadata and controls

113 lines (73 loc) · 2.13 KB

Development Environment

Introduction

This document provides guidance on setting up a Scutes development environment on a local workstation.

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 Python 3.11:

pyenv install 3.11

This should download and install that version of Python.

Setup

Clone Scutes from GitHub:

git clone [email protected]:umd-lib/scutes
cd scutes
python -m venv --prompt "scutes-py$(cat .python-version)" .venv
source .venv/bin/activate
pip install -e .

Install libxmlsec1. This is required for the SAML authentication using [djangosaml2].

On Mac, it is available via Homebrew:

brew install xmlsec1

On Debian or Ubuntu Linux, it is available via apt:

sudo apt-get install xmlsec1

Update the /etc/hosts file to add:

127.0.0.1   localhost scutes-local

Add key and crt files to src/scutes directory.

Setup env file. Copy/rename src/.env-dev-example to src/.env and make adjustments as necessary.

Initalize the database

In src directory, run migrate command:

./manage.py migrate

Import Data Use either YAML test data or an .mbox file See Management Commands

Start the dev server

./manage.py runserver

The application will be running at http://scutes-local:15000/

Note: Use ctrl+c to stop the server

If the prompt is given back without stopping the server, you will need to kill the process

lsof -t -i tcp:15000 | xargs kill -9

Note: Scutes uses SSO

Scutes uses UMD SSO. You will need to be added to the appropriate Grouper group in order to use the web interface.

Tests

To install test dependencies, install the test extra:

pip install -e '.[test]'

This project uses [pytest] in conjunction with the [pytest-django] plugin to run its tests. To run the test suite:

pytest

To run with coverage information:

pytest --cov src --cov-report term-missing