Skip to content

Development Environment Setup

The following instructions assume you are working on Linux (or with WSL on Windows) and have conda and vscode.

  1. Check/install conda

Check that you have conda installed:

conda info

You should see a list of parameters and values, which should include something like the following:

base environment : /home/<USERNAME>/miniforge3

If not, install miniforge3.

  1. Download miniforge

    wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
    
  2. Run the install script

    bash Miniforge3-$(uname)-$(uname -m).sh
    

    The interactive installation will prompt you to initialize conda with your shell. Do NOT do this if you are on a SLURM HPC. If you are on your personal computer it should be fine.

    TODO-copier-package point to docs for more info.

  3. Install the recommended VSCode extensions for this project.:

  4. Open the Command Palette: On macOS: Cmd+Shift+P On Windows/Linux: Ctrl+Shift+P.

  5. Show recommended extensions: Type and select > Extensions: Show Recommended Extensions

  6. Click the Install button for each recommended extension listed above.

  7. Create a development environment with conda

# Create the environment (or update and prune if it already exists)
conda env update --name able-workflow-copier --file environment-py312-dev.yaml --prune
conda activate able-workflow-copier

Alternatively, run the script scripts/conda_update.sh.

Configure the able-workflow-copier as the default python environment in the Python Environments VSCode extension.

  1. Install pre-commit into the repo to run checks on every commit
(able-workflow-copier) pre-commit install
  1. Play around in the sandbox. (The sandbox/ directory is in .gitignore and is a good place to explore how to use the template.)
copier copy --trust --vcs-ref HEAD --pretend "./" "sandbox/example"
  • --trust: Required to run this "untrusted" copier template under development.
  • --vcs-ref HEAD: Use the HEAD of the git repo, not a tagged release version.
  • --pretend: Do not modify any files, just ask the questions.
  • "./": The copier.yaml file is located in the current directory. When working in production, this will be replaced with the github link to able-workflow-copier.
  • "sandbox/example": The directory to place the rendered template, if we were not pretending.