Installation

Warning

  • TARDIS is only supported on macOS and GNU/Linux. Windows users can run TARDIS from our official Docker image (coming soon), WSL or a Virtual Machine.

  • TARDIS packages and dependencies are distributed only through the conda package management system, therefore installation requires Anaconda or Miniconda to be installed on your system.

Install with lockfiles

Conda lockfiles are platform-specific dependency files that produce reproducible environments. We strongly recommend installing TARDIS using this method by following the steps below.

Note

Please note that you don’t need to install separate environments for each TARDIS package (STARDIS, Carsus, or TARDISBase). However, for scientific reproducibility, we recommend creating a new environment whenever you start a new project with TARDIS.

  1. Download the lockfile for your platform:

    wget -q https://github.com/tardis-sn/tardisbase/master/conda-{platform}-64.lock
    

    Replace {platform} with linux or osx-arm based on your operating system.

  2. Create the environment:

    conda create --name tardis-{project_name} --file conda-{platform}.lock
    

    Replace {project_name} with a name for your TARDIS project.

  3. Activate the environment:

    conda activate tardis-{project_name}
    
  4. The installation process differs for developers and non-developers:

    1. Developers should fork the repository , configure GitHub to work with SSH keys, set up the upstream remote and origin (pointing to your fork), and install TARDIS in development mode.

      $ git clone git@github.com:tardis-sn/tardis.git
      $ cd tardis
      $ git remote add upstream git@github.com:tardis-sn/tardis.git
      $ git fetch upstream
      $ git checkout upstream/master
      $ pip install -e ".[tardisbase,viz]" # or pip install -e ".[viz]" if tardisbase is already installed in editable mode
      

      Note

      The complete developer guidelines can be found here.

    2. Non-developers can install from specific releases using pip:

      $ pip install git+https://github.com/tardis-sn/tardis.git@{tag}
      

      For example, to install the latest release:

      $ pip install git+https://github.com/tardis-sn/tardis.git@release-latest
      

      or to install the most recent, unreleased changes from upstream:

      $ pip install git+https://github.com/tardis-sn/tardis.git@master
      

    Note

    Running specific modules or tests will require additional optional dependencies. The tardisbase package is required for running TARDIS Regression Tests. The viz package is required for running the TARDIS visualization tools. These optional dependencies can be installed by running:

    $ pip install -e ".[tardisbase,viz]"
    

    To update optional dependencies, use:

    $ pip install -e ".[tardisbase,viz]" --upgrade --force-reinstall
    
  5. Once finished working, you can deactivate your environment.

$ conda deactivate

From now on, just activate the tardis-{project_name} environment before working with the TARDIS package.

You have successfully installed TARDIS! 🎉 Please refer to Quickstart for TARDIS to start running simulations.

Environment update

Recommended approach: We highly recommend deleting your existing environment and creating a new one using the latest lockfile whenever you need to update your environment.

Use the following conda command to remove your current tardis environment:

$ conda remove --name tardis-{project_name} --all

Now, you can create a new environment by following the steps given here.

To update the environment, download the latest lockfile and run conda update.

$ wget -q https://github.com/tardis-sn/tardisbase/master/conda-{platform}-64.lock
$ conda update --name tardis --file conda-{platform}.lock

Note

If you have installed TARDIS in development mode, you should ideally update your environment whenever you pull the latest code because the new code added might be using updated (or new) dependencies. If you don’t do that and your installation seems broken, you can check if your environment requires update by comparing it against the latest environment file:

$ conda compare --name tardis-{project_name} env.yml

We also recommend updating optional dependencies whenever you pull the latest code.