Installation

From GitHub

To install the Spin Sampler library, follow these steps:

  1. Clone the repository:

    git clone https://github.com/CristopherErazo/devtools_scicomp_project_2025.git <folder_name>
    
  2. Navigate to the folder directory, create and activate a virtual environment (with python 3.9 preferably):

    conda create --name <name> python=3.9
    conda activate <name>
    
  3. Install the required dependencies:

    pip install -r requirements.txt
    
  4. Precompile the numba module:

    python src/spin_sampler/compile_gibbs.py
    

This creates a file (.so in linux or .pyd in Windows) that contains the precompiled version of the numba functions and can be called as a module. If running on Windows you might need to install MSVC Build Tools first, selecting Desktop development with C++ during installation.

  1. Install the package:

    pip install .
    

Tests

You can run the unit tests just by running:

pytest