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¶
Info
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.
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.
git clone https://github.com/<USERNAME>/xfds.git
cd xfds
Install Poetry¶
Info
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.
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
pipx install nox
pip install --user --upgrade nox
Other Tools¶
Just¶
Info
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
just install
poetry install
Run pre-commit on All Files
just check
poetry run pre-commit run --all-files
Run pytest Suite on All Versions of Python
just tests
nox -rs tests
Install Current Development Version with pipx
just pipx
rm -Rf dist
poetry build
pipx install --force `find ./dist -name "*.whl" | sort | tail -n 1`
View Documentation
just docs
poetry run mkdocs serve