diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 52911d3b34d6..4d150e93655b 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1,7 +1,8 @@
* @ritchie46
-/.github/ @ritchie46 @stinodego
+/.github/ @ritchie46 @stinodego
/crates/ @ritchie46 @orlp
/crates/polars-sql/ @ritchie46 @orlp @universalmind303
/crates/polars-time/ @ritchie46 @orlp @MarcoGorelli
/py-polars/ @ritchie46 @stinodego @alexander-beedie
+/docs/ @ritchie46 @c-peters @braaannigan
diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml
index 4a5c23267ebd..3594bdb6a40e 100644
--- a/.github/ISSUE_TEMPLATE/documentation.yml
+++ b/.github/ISSUE_TEMPLATE/documentation.yml
@@ -13,11 +13,11 @@ body:
required: true
- type: input
- id: location
+ id: link
attributes:
- label: Location
+ label: Link
description: >
Provide a link to the existing documentation, if applicable.
- placeholder: https://pola-rs.github.io/polars/docs/python/dev/reference/api/polars.read_csv.html
+ placeholder: ex. https://pola-rs.github.io/polars/docs/python/dev/...
validations:
required: false
diff --git a/.github/workflows/docs-global.yml b/.github/workflows/docs-global.yml
new file mode 100644
index 000000000000..801449af6e02
--- /dev/null
+++ b/.github/workflows/docs-global.yml
@@ -0,0 +1,85 @@
+name: Build documentation
+
+on:
+ pull_request:
+ paths:
+ - docs/**
+ - mkdocs.yml
+ - .github/workflows/docs-global.yml
+ push:
+ tags:
+ - py-**
+
+jobs:
+ markdown-link-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: gaurav-nelson/github-action-markdown-link-check@v1
+ with:
+ folder-path: docs
+
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: psf/black@stable
+ with:
+ src: docs/src/python
+ version: "23.7.0"
+
+ deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.11'
+
+ - name: Create virtual environment
+ run: |
+ python -m venv .venv
+ echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
+
+ - name: Install dependencies
+ run: |
+ pip install -r py-polars/requirements-dev.txt
+ pip install -r docs/requirements.txt
+
+ - name: Set up Rust
+ run: rustup show
+
+ - name: Cache Rust
+ uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: py-polars
+ save-if: ${{ github.ref_name == 'main' }}
+
+ - name: Install Polars
+ working-directory: py-polars
+ run: |
+ source activate
+ maturin develop
+
+ - name: Set up Graphviz
+ uses: ts-graphviz/setup-graphviz@v1
+
+ - name: Build documentation
+ run: mkdocs build
+
+ - name: Add .nojekyll
+ if: ${{ github.ref_type == 'tag' }}
+ working-directory: site
+ run: touch .nojekyll
+
+ - name: Deploy docs
+ if: ${{ github.ref_type == 'tag' }}
+ uses: JamesIves/github-pages-deploy-action@v4
+ with:
+ folder: site
+ clean-exclude: |
+ docs/
+ py-polars/
+ single-commit: true
diff --git a/.github/workflows/lint-rust.yml b/.github/workflows/lint-rust.yml
index de78f4e2d505..1c5b1e314033 100644
--- a/.github/workflows/lint-rust.yml
+++ b/.github/workflows/lint-rust.yml
@@ -38,7 +38,7 @@ jobs:
save-if: ${{ github.ref_name == 'main' }}
- name: Run cargo clippy with all features enabled
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
+ run: cargo clippy -p polars --all-features -- -D warnings
# Default feature set should compile on the stable toolchain
clippy-stable:
@@ -58,7 +58,7 @@ jobs:
save-if: ${{ github.ref_name == 'main' }}
- name: Run cargo clippy
- run: cargo clippy --workspace --all-targets -- -D warnings
+ run: cargo clippy -p polars -- -D warnings
rustfmt:
if: github.ref_name != 'main'
@@ -90,7 +90,6 @@ jobs:
POLARS_ALLOW_EXTENSION: '1'
run: >
cargo miri test
- --no-default-features
--features object
-p polars-core
-p polars-arrow
diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml
index 1d9517d0ed5c..02386075157d 100644
--- a/.github/workflows/test-python.yml
+++ b/.github/workflows/test-python.yml
@@ -41,6 +41,9 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
+ - name: Set up Graphviz
+ uses: ts-graphviz/setup-graphviz@v1
+
- name: Create virtual environment
run: |
python -m venv .venv
@@ -65,11 +68,13 @@ jobs:
- name: Run tests and report coverage
if: github.ref_name != 'main'
- run: pytest --cov -n auto --dist loadgroup -m "not benchmark"
+ run: pytest --cov -n auto --dist loadgroup -m "not benchmark and not docs"
- name: Run doctests
if: github.ref_name != 'main'
- run: python tests/docs/run_doctest.py
+ run: |
+ python tests/docs/run_doctest.py
+ pytest tests/docs/test_user_guide.py -m docs
- name: Check import without optional dependencies
if: github.ref_name != 'main'
@@ -80,6 +85,7 @@ jobs:
"matplotlib"
"backports.zoneinfo"
"connectorx"
+ "pyiceberg"
"deltalake"
"xlsx2csv"
)
@@ -125,7 +131,7 @@ jobs:
- name: Run tests
if: github.ref_name != 'main'
- run: pytest -n auto --dist loadgroup -m "not benchmark"
+ run: pytest -n auto --dist loadgroup -m "not benchmark and not docs"
- name: Check import without optional dependencies
if: github.ref_name != 'main'
diff --git a/.gitignore b/.gitignore
index 1dd5ecb4236f..5eb602ae7f52 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,27 +1,37 @@
*.iml
*.so
*.ipynb
-.DS_Store
.ENV
-.coverage
.env
-.hypothesis/
-.idea/
.ipynb_checkpoints/
-.mypy_cache/
-.pytest_cache/
.python-version
.yarn/
-.vscode/
-__pycache__/
-AUTO_CHANGELOG.md
-Cargo.lock
coverage.lcov
coverage.xml
data/
-node_modules/
polars/vendor
-target/
-venv*/
-.venv*/
+
+# OS
+.DS_Store
+
+# IDE
+.idea/
+.vscode/
.vim
+
+# Python
+.hypothesis/
+.mypy_cache/
+.pytest_cache/
+.venv/
+__pycache__/
+.coverage
+
+# Rust
+target/
+Cargo.lock
+
+# Project
+/docs/data/
+/docs/images/
+/docs/people.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 315ac4c8acd8..cc0993ff47e3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -148,12 +148,12 @@ If you are stuck or unsure about your solution, feel free to open a draft pull r
## Contributing to documentation
-The most important components of Polars documentation are the [user guide](https://pola-rs.github.io/polars-book/user-guide/), the API references, and the database of questions on [StackOverflow](https://stackoverflow.com/).
+The most important components of Polars documentation are the [user guide](https://pola-rs.github.io/polars/user-guide/), the API references, and the database of questions on [StackOverflow](https://stackoverflow.com/).
### User guide
-The user guide is maintained in the [polars-book](https://github.com/pola-rs/polars-book) repository.
-For contributing to the user guide, please refer to the [contributing guide](https://github.com/pola-rs/polars-book/blob/master/CONTRIBUTING.md) in that repository.
+The user guide is maintained in the `docs` folder.
+Further contributing information will be added shortly.
### API reference
diff --git a/Cargo.toml b/Cargo.toml
index 2f22c6309025..f4bfc6d14cac 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ exclude = [
]
[workspace.package]
-version = "0.32.0"
+version = "0.33.2"
authors = ["Ritchie Vink