This directory contains the development container configuration for the FilTar project. The devcontainer provides a consistent development environment that can be easily spun up in GitHub Codespaces, VS Code Remote Containers, or other devcontainer-compatible tools.
- Conda Environment: Pre-configured with conda for package management
- Snakemake 8: Snakemake 8.30.0 installed for workflow management
- R Support: R development environment with syntax highlighting and debugging extensions
- Snakemake Extensions: Syntax highlighting and language support for Snakemake workflows
- GitHub Integration: GitHub Actions and Pull Request extensions for seamless GitHub workflow
- Python Support: Full Python development environment with linting and debugging capabilities
- Open the repository in GitHub
- Click the "Code" button and select "Codespaces"
- Click "Create codespace on main" (or your preferred branch)
- Wait for the container to build and the environment to be set up
- Install the "Remote - Containers" extension in VS Code
- Open the repository in VS Code
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) and select "Remote-Containers: Reopen in Container" - Wait for the container to build and the environment to be set up
The container automatically:
- Uses the Rocker R 4.2 base image with R pre-installed
- Installs essential R packages (remotes, testthat, languageserver) via devcontainer features
- Creates a conda environment named
test-environmentfromenvironment.yml - Installs Snakemake 8.30.0 and Python 3.12
- Installs the FilTar R package from GitHub
- Configures VS Code with appropriate extensions for R, Python, Snakemake, and GitHub workflows
The conda environment test-environment is automatically activated when you open a new terminal. If you need to manually activate it, use:
conda activate test-environment- Python:
ms-python.python,ms-python.pylint,ms-python.flake8,ms-python.autopep8 - R:
reditorsupport.r,rdebugger.r-debugger,posit.air-vscode - Snakemake:
snakemake-lang.snakemake-lang,tfehlmann.snakefmt - GitHub:
github.vscode-github-actions,github.vscode-pull-request-github - Additional: JSON, YAML support
R Terminal Issues: If R terminals cannot attach, the devcontainer automatically configures r.rterm.linux and r.rpath.linux to point to the R installation provided by the Rocker base image.
Python Interpreter Issues: The devcontainer creates workspace-specific settings to ensure the correct Python interpreter from the conda environment is used. If VS Code doesn't detect it automatically, check the bottom-left status bar and select the correct interpreter.
GitHub Extension Issues: If GitHub-related extensions show commit errors during initial setup, these typically resolve once the environment is fully built and VS Code restarts.
If you encounter issues with the environment setup:
- Check the terminal output during container creation
- Manually run the setup script:
bash .devcontainer/setup.sh - Verify the conda environment:
conda env list - Check Snakemake installation:
snakemake --version - Verify R installation:
R --version - Check Python interpreter: look for
/opt/conda/envs/test-environment/bin/pythonin VS Code status bar