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
60 changes: 60 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Python Release

on:
release:
types:
- released
pull_request:
paths:
- .github/workflows/python-release.yml
workflow_dispatch:
inputs:
mode:
description: "dry_run: build & test only, release: build & publish to PyPI"
required: true
default: "dry_run"
type: choice
options:
- dry_run
- release

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for PyPI trusted publishing
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Build lance-ray
run: |
uv build

- name: Publish to PyPI
if: |
(github.event_name == 'release' && github.event.action == 'released') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'release')
run: |
uv publish --trusted-publishing always
76 changes: 76 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributing to Lance-Ray

Thank you for your interest in contributing to Lance-Ray!
This document provides guidelines and instructions for contributing to the project.

## Prerequisites

- Python >= 3.10
- UV package manager
- Git

## Setting Up Your Development Environment

1. **Fork and clone the repository**

```bash
# Fork the repository on GitHub, then clone your fork
git clone https://github.com/YOUR_USERNAME/lance-ray.git
cd lance-ray
```

2. **Install UV** (if not already installed)

```bash
pip install uv
```

3. **Install the project in development mode**

```bash
# Install with all development dependencies
uv pip install -e ".[dev]"

# To work on documentation, also install docs dependencies
uv pip install -e ".[dev,docs]"
```

## Running Tests

Run the test suite to ensure everything is working:

```bash
# Run all tests
uv run pytest

# Run with coverage report
uv run pytest --cov=lance_ray

# Run specific test file
uv run pytest tests/test_basic_read_write.py -vv
```

## Check Styles

We use `ruff` for both linting and formatting:

```bash
# Format code
uv run ruff format lance_ray/ tests/ examples/

# Check linting
uv run ruff check lance_ray/ tests/ examples/

# Fix linting issues automatically
uv run ruff check --fix lance_ray/ tests/ examples/
```

## Building Documentation Locally

```bash
# Serve documentation locally
cd docs
uv run mkdocs serve

# Documentation will be available at http://localhost:8000
```
Loading