-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-when-chaining
- Loading branch information
Showing
149 changed files
with
4,599 additions
and
1,950 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Tests for TPCH Queries | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
validate-queries: | ||
strategy: | ||
matrix: | ||
python-version: ["3.12"] | ||
os: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install uv | ||
run: curl -LsSf https://astral.sh/uv/install.sh | sh | ||
- name: install-reqs | ||
run: uv pip install --upgrade -r requirements-dev.txt --system | ||
- name: local-install | ||
run: uv pip install -e . --system | ||
- name: generate-data | ||
run: cd tpch && python generate_data.py | ||
- name: tpch-tests | ||
run: cd tpch && pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,36 @@ | ||
.venv | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.pyc | ||
todo.md | ||
|
||
# Distribution / packaging | ||
dist/ | ||
|
||
# Unit test / coverage reports | ||
.nox/ | ||
.coverage | ||
site/ | ||
.coverage.* | ||
.nox | ||
*.lock | ||
.cache | ||
coverage.xml | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Documentation | ||
site/ | ||
todo.md | ||
docs/api-completeness/*.md | ||
!docs/api-completeness/index.md | ||
!docs/api-completeness/index.md | ||
|
||
# Lock files | ||
*.lock | ||
|
||
# Environments | ||
.venv | ||
|
||
# TPC-H data | ||
tpch/data/* | ||
|
||
# VSCode | ||
.vscode/ | ||
|
||
# MacOS | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,22 +47,41 @@ git clone [email protected]:YOUR-USERNAME/narwhals.git | |
|
||
### 4. Setting up your environment | ||
|
||
Here's how you can set up your local development environment to contribute: | ||
|
||
1. Make sure you have Python3.8+ installed (for example, Python 3.11) | ||
2. Create a new virtual environment with `python3.11 -m venv .venv` (or whichever version of Python3.9+ you prefer) | ||
3. Activate it: `. .venv/bin/activate` | ||
4. Install Narwhals: `pip install -e .` | ||
5. Install test requirements: `pip install -r requirements-dev.txt` | ||
6. Install docs requirements: `pip install -r docs/requirements-docs.txt` | ||
Here's how you can set up your local development environment to contribute. | ||
|
||
#### Option 1: Use UV (recommended) | ||
|
||
1. Make sure you have Python3.8+ installed (for example, Python 3.11), create a virtual environment, | ||
and activate it. If you're new to this, here's one way that we recommend: | ||
1. Install uv: https://github.com/astral-sh/uv?tab=readme-ov-file#getting-started | ||
2. Install some version of Python greater than Python3.8. For example, to install | ||
Python3.11: | ||
``` | ||
uv python install 3.11 | ||
``` | ||
3. Create a virtual environment: | ||
``` | ||
uv venv -p 3.11 --seed | ||
``` | ||
4. Activate it. On Linux, this is `. .venv/bin/activate`, on Windows `.\.venv\Scripts\activate`. | ||
2. Install Narwhals: `uv pip install -e .` | ||
3. Install test requirements: `uv pip install -r requirements-dev.txt` | ||
4. Install docs requirements: `uv pip install -r docs/requirements-docs.txt` | ||
You should also install pre-commit: | ||
``` | ||
pip install pre-commit | ||
uv pip install pre-commit | ||
pre-commit install | ||
``` | ||
This will automatically format and lint your code before each commit, and it will block the commit if any issues are found. | ||
#### Option 2: use python3-venv | ||
1. Make sure you have Python 3.8+ installed. If you don't, you can check [install Python](https://realpython.com/installing-python/) | ||
to learn how. Then, [create and activate](https://realpython.com/python-virtual-environments-a-primer/) | ||
a virtual environment. | ||
2. Then, follow steps 2-4 from above but using `pip install` instead of `uv pip install`. | ||
### 5. Working on your issue | ||
Create a new git branch from the `main` branch in your local repository. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
- item | ||
- iter_rows | ||
- join | ||
- join_asof | ||
- lazy | ||
- null_count | ||
- pipe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
- max | ||
- mean | ||
- min | ||
- mode | ||
- null_count | ||
- n_unique | ||
- over | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
- group_by | ||
- head | ||
- join | ||
- join_asof | ||
- lazy | ||
- pipe | ||
- rename | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.