armory-library

Software Setup Guide

This guide will walk you through setting up your development environment on both Linux and Windows operating systems.

Git Configuration & Setup

Configuring Git

Make sure to follow GitLab’s guide for Using SSH Keys to communicate with GitLab.

Instructions for setting up Git on Ubuntu Linux are as follows:

All of these configurations set Git to normalize line endings to LF on commit, and on Windows, to convert them back to CRLF when files are checked out.

Initial Setup

  1. Clone the repository
      git clone https://github.com/twosixlabs/armory-library.git
      cd armory-library
    
  2. Install the packages
      ./dev-install.sh
    

Prerequisites

Virtual Environment Setup and Project Installation

We use Python’s built-in venv module to create virtual environments. This keeps our project’s dependencies isolated from other Python projects.

In a terminal, navigate to your project directory and run the following commands:

# Create a virtual environment
python -m venv --copies venv

# Activate the virtual environment
source venv/bin/activate

# Upgrade pip, and install the build and wheel packages
python -m pip install --upgrade pip build wheel

# Install the project with all dependencies, without compiling
./dev-install.sh

Linting the Code

Before committing any code, we run a pre-commit script that lints the code to ensure it meets our coding standards:

python -m pre_commit # or just `pre-commit`
# or
task lint

Building the Application

We use hatch to build our Python application into a wheel file:

hatch build --clean --target wheel

Generating Documentation

We use mkdocs to build our project documentation:

task docs

Running Unit Tests

task test

Helpful VSCode Tips

Please don’t hesitate to ask if you have any questions about our software setup process. We’re here to help!