Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ celerybeat.pid
# Environments
.env
.venv
.venv_wsl
env/
venv/
ENV/
Expand Down
15 changes: 15 additions & 0 deletions docs/source/contribute/development/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Developer guide
:hidden:

developer_guide/dev_installation
developer_guide/wsl_setup
developer_guide/git_workflow
developer_guide/ci
developer_guide/coding_standards
Expand All @@ -35,6 +36,20 @@ Developer guide

Installation

.. grid-item-card:: WSL Setup
:text-align: center

Set up Ubuntu WSL for development.

+++

.. button-ref:: developer_guide/wsl_setup
:color: primary
:click-parent:
:expand:

WSL Setup

.. grid-item-card:: Git Workflow
:text-align: center

Expand Down
73 changes: 73 additions & 0 deletions docs/source/contribute/development/developer_guide/wsl_setup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.. _wsl_setup:

=========
WSL Setup
=========

If you are a Windows user and prefer developing in a Linux environment,
you can use the Windows Subsystem for Linux (WSL). This guide will help
you set up ``skbase`` for development in Ubuntu WSL.

Prerequisites
-------------

1. **Install WSL**: Ensure you have WSL and the Ubuntu distribution
installed on your Windows machine. If not, you can install it by
running the following command in PowerShell as administrator:

.. code-block:: powershell

wsl --install

2. **Clone the Repository**: Clone the ``skbase`` repository to your
Windows filesystem (e.g., ``C:\code\skbase``). WSL can access your
Windows files via ``/mnt/c/``.

Alternatively, you can clone it directly inside the WSL filesystem
for better performance:

.. code-block:: bash

git clone https://github.com/sktime/skbase.git
cd skbase

Automated Setup
---------------

We provide a script to automate the setup of your development
environment in Ubuntu WSL.

1. Open your Ubuntu terminal.
2. Navigate to the root directory of the cloned ``skbase`` repository.
3. Run the setup script:

.. code-block:: bash

bash scripts/setup_wsl.sh

This script will:

- Update your package lists.
- Install ``python3-venv`` and ``python3-pip``.
- Create a virtual environment named ``.venv_wsl``.
- Install ``skbase`` in editable mode with development
and test dependencies.

Manual Activation
-----------------

After the setup is complete, you can activate the environment whenever
you open a new terminal:

.. code-block:: bash

source .venv_wsl/bin/activate

Verifying the Installation
--------------------------

To verify that everything is set up correctly, you can run the tests:

.. code-block:: bash

pytest
36 changes: 36 additions & 0 deletions scripts/setup_wsl.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Exit on error
set -e

echo "Starting Ubuntu WSL setup for skbase..."

# Update package lists
echo "Updating package lists..."
sudo apt update

# Install necessary system dependencies
echo "Installing python3-venv and python3-pip..."
sudo apt install -y python3-venv python3-pip

# Create virtual environment
if [ ! -d ".venv_wsl" ]; then
echo "Creating virtual environment .venv_wsl..."
python3 -m venv .venv_wsl
else
echo ".venv_wsl already exists, skipping creation."
fi

# Activate virtual environment
echo "Activating virtual environment..."
source .venv_wsl/bin/activate

# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip

# Install skbase in editable mode with development and test dependencies
echo "Installing skbase with [dev,test] dependencies..."
pip install -e ".[dev,test]"

echo "Setup complete! To activate the environment, run: source .venv_wsl/bin/activate"