Skip to content

Getting Set Up

Setting up for Development

You can work from anywhere on your system, however, these instructions assume you're on a unix operating system, have the username pbdtools and the code will be located at /home/pbdtools/xfds/.

Install xFDS required software

Refer to the xFDS installation instructions

Install Git

Install Git on your machine. Git is used for version control and must be used to contribute to the code base.

Once you have Git installed, follow the first time Git setup instructions.

/home/pbdtools
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com

Fork and Clone the Repository

Go to the project repository and in the top right of the page, click "fork" to make a fork of the repository in your account.

Navigate to where you want to copy the files and clone your fork of the repository. Make sure to change <USERNAME> to your Github user name.

/home/pbdtools/
git clone https://github.com/<USERNAME>/xfds.git
cd xfds

Install Poetry

Poetry is used to manage dependencies and build xFDS for distribution. Follow their installation instructions for your operating system.

Once Python and Poetry are installed, you can install the required packages with the poetry install command.

/home/pbdtools/xfds/
poetry install

Setting up for Testing

Install Nox

Nox is used to test xFDS on different versions of Python. A whole suite of tests are defined in noxfile.py

The Nox documentation suggests installing nox with pip, but pipx will isolate Nox from any other dependencies

/home/pbdtools/
pipx install nox
/home/pbdtools/
pip install --user --upgrade nox

Other Tools

Just

Just provides a way to save and run project-specific commands. These commands are stored in the justfile. Follow their installation instructions for your operating system.

Below are some example commands and their equivalents.

Install Project Dependencies

/home/pbdtools/xfds
just install
/home/pbdtools/xfds
poetry install

Run pre-commit on All Files

/home/pbdtools/xfds
just check
/home/pbdtools/xfds
poetry run pre-commit run --all-files

Run pytest Suite on All Versions of Python

/home/pbdtools/xfds
just tests
/home/pbdtools/xfds
nox -rs tests

Install Current Development Version with pipx

/home/pbdtools/xfds
just pipx
/home/pbdtools/xfds
rm -Rf dist
poetry build
pipx install --force `find ./dist -name "*.whl" | sort | tail -n 1`

View Documentation

/home/pbdtools/xfds
just docs
/home/pbdtools/xfds
poetry run mkdocs serve