This guide will walk you through setting up your development environment on both Linux and Windows operating systems.
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:
Install Git with the following command:
sudo apt-get install git
Configure Git to handle line endings with the following command:
git config --global core.autocrlf input
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.
git clone https://github.com/twosixlabs/armory-library.git
cd armory-library
./dev-install.sh
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
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
We use hatch to build our Python application into a wheel file:
hatch build --clean --target wheel
We use mkdocs to build our project documentation:
task docs
task test
Please don’t hesitate to ask if you have any questions about our software setup process. We’re here to help!