Skip to content
Merged
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
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ cd tidesdb-python

# Run the setup script
./setup.sh

# Activate the virtual environment
source venv/bin/activate # Your prompt should show (venv) at the beginning
```

#### Windows
Expand All @@ -38,6 +41,10 @@ cd tidesdb-python

# Run the setup script
.\setup.ps1

# Activate the virtual environment
# For Windows (PowerShell or Command Prompt):
venv\Scripts\activate # Your prompt should show (venv) at the beginning
```

### Understanding the Setup Process
Expand All @@ -48,15 +55,20 @@ The installation process consists of several important steps:
- The setup scripts automatically clone and configure the TidesDB C foundation (`cfoundation/`).
- This component is crucial as it provides the core database functionality that the Python bindings interact with.
- The scripts handle:
- Cloning the C foundation repository
- Cloning the C foundation repository (only essential files)
- Configuring build options for optimal performance
- Building and installing the C library
- Integrating it seamlessly with the Python bindings

2. **Python Environment**
- Creates a virtual environment for isolated package management
- Installs all required Python dependencies
- Sets up the Python package in development mode
- The setup script automatically:
- Creates a virtual environment for isolated package management
- Installs all required Python dependencies
- Sets up the Python package in development mode
- After installation, you must manually activate the virtual environment:
- For Linux/macOS: `source venv/bin/activate`
- For Windows: `venv\Scripts\activate`
- Once activated, your prompt should show (venv) at the beginning

#### Automated Setup Details

Expand Down
9 changes: 6 additions & 3 deletions setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ $ErrorActionPreference = "Stop"
# Define C library repository
$CLIB_REPO = "https://github.com/tidesdb/tidesdb"

# Clone and set up C foundation
Write-Host "Cloning TidesDB C foundation..."
git clone $CLIB_REPO cfoundation
# Clone with sparse checkout
Write-Host "Cloning TidesDB C foundation (minimal)..."
git clone --filter=blob:none --sparse $CLIB_REPO cfoundation
Set-Location cfoundation

# Configure sparse checkout patterns
git sparse-checkout set --no-cone '/*' '!artwork/' '!test/' '!.github/' '!CODE_OF_CONDUCT.md' '!CONTRIBUTING.md' '!LICENSE' '!README.md' '!SECURITY.md' '!.gitignore'

# Remove .git directory as it will be part of the main project
Write-Host "Cleaning up git history..."
Remove-Item -Recurse -Force .git
Expand Down
9 changes: 6 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ set -e # Stop the script in case of error
# Define C library repository
CLIB_REPO="https://github.com/tidesdb/tidesdb"

# Clone and set up C foundation
echo "Cloning TidesDB C foundation..."
git clone "$CLIB_REPO" cfoundation
# Clone with sparse checkout
echo "Cloning TidesDB C foundation (minimal)..."
git clone --filter=blob:none --sparse "$CLIB_REPO" cfoundation
cd cfoundation

# Configure sparse checkout patterns
git sparse-checkout set --no-cone '/*' '!artwork/' '!test/' '!.github/' '!CODE_OF_CONDUCT.md' '!CONTRIBUTING.md' '!LICENSE' '!README.md' '!SECURITY.md' '!.gitignore'

# Remove .git directory as it will be part of the main project
echo "Cleaning up git history..."
rm -rf .git
Expand Down