From cd12eec0be5494b28d496f003621ffb73fcbaaa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:41:53 +0100 Subject: [PATCH] docs: Refactor docs directory hierarchy Split docs folder into two subfolders. All the main docs content lives in `docs/docs`. Dynamically generated content lives in `docs/docs-res`. This split prevents the MkDocs live reloading from entering an infinite loop when generating data files, images, or pages, for the documentation. --- .github/workflows/docs-global.yml | 8 ++--- .github/workflows/lint-rust.yml | 4 +-- .github/workflows/test-python.yml | 4 +-- .gitignore | 5 ++- Cargo.toml | 2 +- Makefile | 2 +- README.md | 6 ++-- .../polars/tests/it/io/parquet/arrow/read.rs | 4 +-- crates/polars/tests/it/io/parquet/read/mod.rs | 2 +- .../data/alltypes_plain.parquet | Bin docs/{ => docs-res}/data/apple_stock.csv | 0 docs/{ => docs-res}/data/iris.csv | 0 docs/{ => docs-res}/data/reddit.csv | 0 docs/docs-res/images/.gitignore | 2 ++ .../{ => docs}/_build/API_REFERENCE_LINKS.yml | 0 docs/{ => docs}/_build/assets/logo.png | Bin docs/{ => docs}/_build/css/extra.css | 0 docs/{ => docs}/_build/overrides/404.html | 0 docs/{ => docs}/_build/scripts/macro.py | 6 ++-- docs/{ => docs}/_build/scripts/people.py | 7 ++-- .../_build/snippets/under_construction.md | 0 docs/{ => docs}/api/index.md | 0 .../{ => docs}/development/contributing/ci.md | 0 .../development/contributing/code-style.md | 0 .../development/contributing/ide.md | 2 +- .../development/contributing/index.md | 0 .../development/contributing/test.md | 0 docs/{ => docs}/development/versioning.md | 0 docs/{ => docs}/index.md | 2 +- docs/{ => docs}/mlc-config.json | 0 docs/{ => docs}/pyproject.toml | 0 docs/{ => docs}/releases/changelog.md | 0 docs/{ => docs}/releases/upgrade/0.19.md | 0 docs/{ => docs}/releases/upgrade/0.20.md | 0 docs/{ => docs}/releases/upgrade/1.md | 0 docs/{ => docs}/releases/upgrade/index.md | 0 docs/{ => docs}/requirements.txt | 0 docs/{ => docs}/src/python/home/example.py | 2 +- .../python/user-guide/concepts/contexts.py | 0 .../user-guide/concepts/data-structures.py | 0 .../concepts/data-types/categoricals.py | 0 .../python/user-guide/concepts/expressions.py | 0 .../user-guide/concepts/lazy-vs-eager.py | 4 +-- .../python/user-guide/concepts/streaming.py | 5 +-- .../user-guide/expressions/aggregation.py | 0 .../python/user-guide/expressions/casting.py | 0 .../expressions/column-selections.py | 0 .../python/user-guide/expressions/folds.py | 0 .../user-guide/expressions/functions.py | 0 .../python/user-guide/expressions/lists.py | 0 .../user-guide/expressions/missing-data.py | 0 .../user-guide/expressions/numpy-example.py | 0 .../user-guide/expressions/operators.py | 0 .../python/user-guide/expressions/strings.py | 0 .../python/user-guide/expressions/structs.py | 0 .../expressions/user-defined-functions.py | 0 .../python/user-guide/expressions/window.py | 0 .../user-guide/getting-started/expressions.py | 0 .../user-guide/getting-started/joins.py | 0 .../getting-started/reading-writing.py | 14 ++++---- .../src/python/user-guide/io/bigquery.py | 0 .../src/python/user-guide/io/cloud-storage.py | 0 .../src/python/user-guide/io/csv.py | 6 ++-- .../src/python/user-guide/io/database.py | 0 .../src/python/user-guide/io/excel.py | 8 ++--- .../src/python/user-guide/io/hive.py | 28 +++++++-------- .../src/python/user-guide/io/hugging-face.py | 34 ++++++++++++------ .../src/python/user-guide/io/json.py | 8 ++--- .../src/python/user-guide/io/multiple.py | 14 ++++---- .../src/python/user-guide/io/parquet.py | 6 ++-- .../src/python/user-guide/lazy/execution.py | 8 ++--- .../src/python/user-guide/lazy/gpu.py | 0 .../src/python/user-guide/lazy/query-plan.py | 12 ++++--- .../src/python/user-guide/lazy/schema.py | 0 .../src/python/user-guide/lazy/using.py | 2 +- .../src/python/user-guide/misc/arrow.py | 0 .../python/user-guide/misc/arrow_pycapsule.py | 0 .../python/user-guide/misc/multiprocess.py | 0 .../src/python/user-guide/misc/styling.py | 2 +- .../python/user-guide/misc/visualization.py | 22 ++++++------ .../src/python/user-guide/sql/create.py | 0 .../src/python/user-guide/sql/cte.py | 0 .../src/python/user-guide/sql/intro.py | 12 +++---- .../src/python/user-guide/sql/select.py | 2 +- .../src/python/user-guide/sql/show.py | 0 .../transformations/concatenation.py | 0 .../user-guide/transformations/joins.py | 0 .../user-guide/transformations/pivot.py | 0 .../transformations/time-series/filter.py | 2 +- .../transformations/time-series/parsing.py | 4 +-- .../transformations/time-series/resampling.py | 0 .../transformations/time-series/rolling.py | 2 +- .../transformations/time-series/timezones.py | 0 .../user-guide/transformations/unpivot.py | 0 docs/{ => docs}/src/rust/Cargo.toml | 0 docs/{ => docs}/src/rust/home/example.rs | 2 +- .../src/rust/user-guide/concepts/contexts.rs | 0 .../user-guide/concepts/data-structures.rs | 0 .../rust/user-guide/concepts/expressions.rs | 0 .../rust/user-guide/concepts/lazy-vs-eager.rs | 4 +-- .../src/rust/user-guide/concepts/streaming.rs | 4 +-- .../user-guide/expressions/aggregation.rs | 0 .../rust/user-guide/expressions/casting.rs | 0 .../expressions/column-selections.rs | 0 .../src/rust/user-guide/expressions/folds.rs | 0 .../rust/user-guide/expressions/functions.rs | 0 .../src/rust/user-guide/expressions/lists.rs | 0 .../user-guide/expressions/missing-data.rs | 0 .../rust/user-guide/expressions/operators.rs | 0 .../rust/user-guide/expressions/strings.rs | 0 .../rust/user-guide/expressions/structs.rs | 0 .../expressions/user-defined-functions.rs | 0 .../src/rust/user-guide/expressions/window.rs | 0 .../user-guide/getting-started/expressions.rs | 0 .../rust/user-guide/getting-started/joins.rs | 0 .../getting-started/reading-writing.rs | 16 ++++----- .../src/rust/user-guide/io/cloud-storage.rs | 0 docs/{ => docs}/src/rust/user-guide/io/csv.rs | 4 +-- .../{ => docs}/src/rust/user-guide/io/json.rs | 8 ++--- .../src/rust/user-guide/io/parquet.rs | 4 +-- .../transformations/concatenation.rs | 0 .../rust/user-guide/transformations/joins.rs | 0 .../rust/user-guide/transformations/pivot.rs | 0 .../transformations/time-series/filter.rs | 2 +- .../transformations/time-series/parsing.rs | 4 +-- .../transformations/time-series/resampling.rs | 0 .../transformations/time-series/rolling.rs | 2 +- .../transformations/time-series/timezones.rs | 0 .../user-guide/transformations/unpivot.rs | 0 .../user-guide/concepts/contexts.md | 0 .../user-guide/concepts/data-structures.md | 0 .../concepts/data-types/categoricals.md | 0 .../concepts/data-types/overview.md | 0 .../user-guide/concepts/expressions.md | 0 docs/{ => docs}/user-guide/concepts/index.md | 0 .../user-guide/concepts/lazy-vs-eager.md | 0 .../user-guide/concepts/streaming.md | 0 docs/{ => docs}/user-guide/ecosystem.md | 2 +- .../user-guide/expressions/aggregation.md | 0 .../user-guide/expressions/casting.md | 0 .../expressions/column-selections.md | 0 .../user-guide/expressions/folds.md | 0 .../user-guide/expressions/functions.md | 0 .../user-guide/expressions/index.md | 0 .../user-guide/expressions/lists.md | 0 .../user-guide/expressions/missing-data.md | 0 .../user-guide/expressions/numpy.md | 0 .../user-guide/expressions/operators.md | 0 .../user-guide/expressions/plugins.md | 0 .../user-guide/expressions/strings.md | 0 .../user-guide/expressions/structs.md | 0 .../expressions/user-defined-functions.md | 0 .../user-guide/expressions/window.md | 0 docs/{ => docs}/user-guide/getting-started.md | 0 docs/{ => docs}/user-guide/gpu-support.md | 0 docs/{ => docs}/user-guide/installation.md | 0 docs/{ => docs}/user-guide/io/bigquery.md | 0 .../{ => docs}/user-guide/io/cloud-storage.md | 0 docs/{ => docs}/user-guide/io/csv.md | 0 docs/{ => docs}/user-guide/io/database.md | 0 docs/{ => docs}/user-guide/io/excel.md | 0 docs/{ => docs}/user-guide/io/hive.md | 0 docs/{ => docs}/user-guide/io/hugging-face.md | 16 ++++----- docs/{ => docs}/user-guide/io/index.md | 0 docs/{ => docs}/user-guide/io/json.md | 0 docs/{ => docs}/user-guide/io/multiple.md | 0 docs/{ => docs}/user-guide/io/parquet.md | 0 docs/{ => docs}/user-guide/lazy/execution.md | 0 docs/{ => docs}/user-guide/lazy/gpu.md | 0 docs/{ => docs}/user-guide/lazy/index.md | 0 .../user-guide/lazy/optimizations.md | 0 docs/{ => docs}/user-guide/lazy/query-plan.md | 0 docs/{ => docs}/user-guide/lazy/schemas.md | 0 docs/docs/user-guide/lazy/streaming.md | 3 ++ docs/{ => docs}/user-guide/lazy/using.md | 0 .../{ => docs}/user-guide/migration/pandas.md | 0 docs/{ => docs}/user-guide/migration/spark.md | 0 docs/{ => docs}/user-guide/misc/arrow.md | 0 docs/{ => docs}/user-guide/misc/comparison.md | 2 +- .../user-guide/misc/multiprocessing.md | 0 docs/{ => docs}/user-guide/misc/styling.md | 0 .../user-guide/misc/visualization.md | 0 docs/{ => docs}/user-guide/sql/create.md | 0 docs/{ => docs}/user-guide/sql/cte.md | 0 docs/{ => docs}/user-guide/sql/intro.md | 0 docs/{ => docs}/user-guide/sql/select.md | 0 docs/{ => docs}/user-guide/sql/show.md | 0 .../transformations/concatenation.md | 0 .../user-guide/transformations/index.md | 0 .../user-guide/transformations/joins.md | 0 .../user-guide/transformations/pivot.md | 0 .../transformations/time-series/filter.md | 0 .../transformations/time-series/parsing.md | 0 .../transformations/time-series/resampling.md | 0 .../transformations/time-series/rolling.md | 0 .../transformations/time-series/timezones.md | 0 .../user-guide/transformations/unpivot.md | 0 docs/images/.gitignore | 1 - docs/user-guide/lazy/streaming.md | 3 -- mkdocs.yml | 11 +++--- 200 files changed, 180 insertions(+), 161 deletions(-) rename docs/{ => docs-res}/data/alltypes_plain.parquet (100%) rename docs/{ => docs-res}/data/apple_stock.csv (100%) rename docs/{ => docs-res}/data/iris.csv (100%) rename docs/{ => docs-res}/data/reddit.csv (100%) create mode 100644 docs/docs-res/images/.gitignore rename docs/{ => docs}/_build/API_REFERENCE_LINKS.yml (100%) rename docs/{ => docs}/_build/assets/logo.png (100%) rename docs/{ => docs}/_build/css/extra.css (100%) rename docs/{ => docs}/_build/overrides/404.html (100%) rename docs/{ => docs}/_build/scripts/macro.py (96%) rename docs/{ => docs}/_build/scripts/people.py (81%) rename docs/{ => docs}/_build/snippets/under_construction.md (100%) rename docs/{ => docs}/api/index.md (100%) rename docs/{ => docs}/development/contributing/ci.md (100%) rename docs/{ => docs}/development/contributing/code-style.md (100%) rename docs/{ => docs}/development/contributing/ide.md (97%) rename docs/{ => docs}/development/contributing/index.md (100%) rename docs/{ => docs}/development/contributing/test.md (100%) rename docs/{ => docs}/development/versioning.md (100%) rename docs/{ => docs}/index.md (99%) rename docs/{ => docs}/mlc-config.json (100%) rename docs/{ => docs}/pyproject.toml (100%) rename docs/{ => docs}/releases/changelog.md (100%) rename docs/{ => docs}/releases/upgrade/0.19.md (100%) rename docs/{ => docs}/releases/upgrade/0.20.md (100%) rename docs/{ => docs}/releases/upgrade/1.md (100%) rename docs/{ => docs}/releases/upgrade/index.md (100%) rename docs/{ => docs}/requirements.txt (100%) rename docs/{ => docs}/src/python/home/example.py (79%) rename docs/{ => docs}/src/python/user-guide/concepts/contexts.py (100%) rename docs/{ => docs}/src/python/user-guide/concepts/data-structures.py (100%) rename docs/{ => docs}/src/python/user-guide/concepts/data-types/categoricals.py (100%) rename docs/{ => docs}/src/python/user-guide/concepts/expressions.py (100%) rename docs/{ => docs}/src/python/user-guide/concepts/lazy-vs-eager.py (79%) rename docs/{ => docs}/src/python/user-guide/concepts/streaming.py (81%) rename docs/{ => docs}/src/python/user-guide/expressions/aggregation.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/casting.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/column-selections.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/folds.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/functions.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/lists.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/missing-data.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/numpy-example.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/operators.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/strings.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/structs.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/user-defined-functions.py (100%) rename docs/{ => docs}/src/python/user-guide/expressions/window.py (100%) rename docs/{ => docs}/src/python/user-guide/getting-started/expressions.py (100%) rename docs/{ => docs}/src/python/user-guide/getting-started/joins.py (100%) rename docs/{ => docs}/src/python/user-guide/getting-started/reading-writing.py (60%) rename docs/{ => docs}/src/python/user-guide/io/bigquery.py (100%) rename docs/{ => docs}/src/python/user-guide/io/cloud-storage.py (100%) rename docs/{ => docs}/src/python/user-guide/io/csv.py (65%) rename docs/{ => docs}/src/python/user-guide/io/database.py (100%) rename docs/{ => docs}/src/python/user-guide/io/excel.py (64%) rename docs/{ => docs}/src/python/user-guide/io/hive.py (73%) rename docs/{ => docs}/src/python/user-guide/io/hugging-face.py (94%) rename docs/{ => docs}/src/python/user-guide/io/json.py (62%) rename docs/{ => docs}/src/python/user-guide/io/multiple.py (60%) rename docs/{ => docs}/src/python/user-guide/io/parquet.py (62%) rename docs/{ => docs}/src/python/user-guide/lazy/execution.py (78%) rename docs/{ => docs}/src/python/user-guide/lazy/gpu.py (100%) rename docs/{ => docs}/src/python/user-guide/lazy/query-plan.py (69%) rename docs/{ => docs}/src/python/user-guide/lazy/schema.py (100%) rename docs/{ => docs}/src/python/user-guide/lazy/using.py (87%) rename docs/{ => docs}/src/python/user-guide/misc/arrow.py (100%) rename docs/{ => docs}/src/python/user-guide/misc/arrow_pycapsule.py (100%) rename docs/{ => docs}/src/python/user-guide/misc/multiprocess.py (100%) rename docs/{ => docs}/src/python/user-guide/misc/styling.py (99%) rename docs/{ => docs}/src/python/user-guide/misc/visualization.py (79%) rename docs/{ => docs}/src/python/user-guide/sql/create.py (100%) rename docs/{ => docs}/src/python/user-guide/sql/cte.py (100%) rename docs/{ => docs}/src/python/user-guide/sql/intro.py (85%) rename docs/{ => docs}/src/python/user-guide/sql/select.py (97%) rename docs/{ => docs}/src/python/user-guide/sql/show.py (100%) rename docs/{ => docs}/src/python/user-guide/transformations/concatenation.py (100%) rename docs/{ => docs}/src/python/user-guide/transformations/joins.py (100%) rename docs/{ => docs}/src/python/user-guide/transformations/pivot.py (100%) rename docs/{ => docs}/src/python/user-guide/transformations/time-series/filter.py (90%) rename docs/{ => docs}/src/python/user-guide/transformations/time-series/parsing.py (84%) rename docs/{ => docs}/src/python/user-guide/transformations/time-series/resampling.py (100%) rename docs/{ => docs}/src/python/user-guide/transformations/time-series/rolling.py (95%) rename docs/{ => docs}/src/python/user-guide/transformations/time-series/timezones.py (100%) rename docs/{ => docs}/src/python/user-guide/transformations/unpivot.py (100%) rename docs/{ => docs}/src/rust/Cargo.toml (100%) rename docs/{ => docs}/src/rust/home/example.rs (85%) rename docs/{ => docs}/src/rust/user-guide/concepts/contexts.rs (100%) rename docs/{ => docs}/src/rust/user-guide/concepts/data-structures.rs (100%) rename docs/{ => docs}/src/rust/user-guide/concepts/expressions.rs (100%) rename docs/{ => docs}/src/rust/user-guide/concepts/lazy-vs-eager.rs (84%) rename docs/{ => docs}/src/rust/user-guide/concepts/streaming.rs (87%) rename docs/{ => docs}/src/rust/user-guide/expressions/aggregation.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/casting.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/column-selections.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/folds.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/functions.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/lists.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/missing-data.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/operators.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/strings.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/structs.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/user-defined-functions.rs (100%) rename docs/{ => docs}/src/rust/user-guide/expressions/window.rs (100%) rename docs/{ => docs}/src/rust/user-guide/getting-started/expressions.rs (100%) rename docs/{ => docs}/src/rust/user-guide/getting-started/joins.rs (100%) rename docs/{ => docs}/src/rust/user-guide/getting-started/reading-writing.rs (73%) rename docs/{ => docs}/src/rust/user-guide/io/cloud-storage.rs (100%) rename docs/{ => docs}/src/rust/user-guide/io/csv.rs (80%) rename docs/{ => docs}/src/rust/user-guide/io/json.rs (75%) rename docs/{ => docs}/src/rust/user-guide/io/parquet.rs (79%) rename docs/{ => docs}/src/rust/user-guide/transformations/concatenation.rs (100%) rename docs/{ => docs}/src/rust/user-guide/transformations/joins.rs (100%) rename docs/{ => docs}/src/rust/user-guide/transformations/pivot.rs (100%) rename docs/{ => docs}/src/rust/user-guide/transformations/time-series/filter.rs (94%) rename docs/{ => docs}/src/rust/user-guide/transformations/time-series/parsing.rs (91%) rename docs/{ => docs}/src/rust/user-guide/transformations/time-series/resampling.rs (100%) rename docs/{ => docs}/src/rust/user-guide/transformations/time-series/rolling.rs (97%) rename docs/{ => docs}/src/rust/user-guide/transformations/time-series/timezones.rs (100%) rename docs/{ => docs}/src/rust/user-guide/transformations/unpivot.rs (100%) rename docs/{ => docs}/user-guide/concepts/contexts.md (100%) rename docs/{ => docs}/user-guide/concepts/data-structures.md (100%) rename docs/{ => docs}/user-guide/concepts/data-types/categoricals.md (100%) rename docs/{ => docs}/user-guide/concepts/data-types/overview.md (100%) rename docs/{ => docs}/user-guide/concepts/expressions.md (100%) rename docs/{ => docs}/user-guide/concepts/index.md (100%) rename docs/{ => docs}/user-guide/concepts/lazy-vs-eager.md (100%) rename docs/{ => docs}/user-guide/concepts/streaming.md (100%) rename docs/{ => docs}/user-guide/ecosystem.md (98%) rename docs/{ => docs}/user-guide/expressions/aggregation.md (100%) rename docs/{ => docs}/user-guide/expressions/casting.md (100%) rename docs/{ => docs}/user-guide/expressions/column-selections.md (100%) rename docs/{ => docs}/user-guide/expressions/folds.md (100%) rename docs/{ => docs}/user-guide/expressions/functions.md (100%) rename docs/{ => docs}/user-guide/expressions/index.md (100%) rename docs/{ => docs}/user-guide/expressions/lists.md (100%) rename docs/{ => docs}/user-guide/expressions/missing-data.md (100%) rename docs/{ => docs}/user-guide/expressions/numpy.md (100%) rename docs/{ => docs}/user-guide/expressions/operators.md (100%) rename docs/{ => docs}/user-guide/expressions/plugins.md (100%) rename docs/{ => docs}/user-guide/expressions/strings.md (100%) rename docs/{ => docs}/user-guide/expressions/structs.md (100%) rename docs/{ => docs}/user-guide/expressions/user-defined-functions.md (100%) rename docs/{ => docs}/user-guide/expressions/window.md (100%) rename docs/{ => docs}/user-guide/getting-started.md (100%) rename docs/{ => docs}/user-guide/gpu-support.md (100%) rename docs/{ => docs}/user-guide/installation.md (100%) rename docs/{ => docs}/user-guide/io/bigquery.md (100%) rename docs/{ => docs}/user-guide/io/cloud-storage.md (100%) rename docs/{ => docs}/user-guide/io/csv.md (100%) rename docs/{ => docs}/user-guide/io/database.md (100%) rename docs/{ => docs}/user-guide/io/excel.md (100%) rename docs/{ => docs}/user-guide/io/hive.md (100%) rename docs/{ => docs}/user-guide/io/hugging-face.md (76%) rename docs/{ => docs}/user-guide/io/index.md (100%) rename docs/{ => docs}/user-guide/io/json.md (100%) rename docs/{ => docs}/user-guide/io/multiple.md (100%) rename docs/{ => docs}/user-guide/io/parquet.md (100%) rename docs/{ => docs}/user-guide/lazy/execution.md (100%) rename docs/{ => docs}/user-guide/lazy/gpu.md (100%) rename docs/{ => docs}/user-guide/lazy/index.md (100%) rename docs/{ => docs}/user-guide/lazy/optimizations.md (100%) rename docs/{ => docs}/user-guide/lazy/query-plan.md (100%) rename docs/{ => docs}/user-guide/lazy/schemas.md (100%) create mode 100644 docs/docs/user-guide/lazy/streaming.md rename docs/{ => docs}/user-guide/lazy/using.md (100%) rename docs/{ => docs}/user-guide/migration/pandas.md (100%) rename docs/{ => docs}/user-guide/migration/spark.md (100%) rename docs/{ => docs}/user-guide/misc/arrow.md (100%) rename docs/{ => docs}/user-guide/misc/comparison.md (98%) rename docs/{ => docs}/user-guide/misc/multiprocessing.md (100%) rename docs/{ => docs}/user-guide/misc/styling.md (100%) rename docs/{ => docs}/user-guide/misc/visualization.md (100%) rename docs/{ => docs}/user-guide/sql/create.md (100%) rename docs/{ => docs}/user-guide/sql/cte.md (100%) rename docs/{ => docs}/user-guide/sql/intro.md (100%) rename docs/{ => docs}/user-guide/sql/select.md (100%) rename docs/{ => docs}/user-guide/sql/show.md (100%) rename docs/{ => docs}/user-guide/transformations/concatenation.md (100%) rename docs/{ => docs}/user-guide/transformations/index.md (100%) rename docs/{ => docs}/user-guide/transformations/joins.md (100%) rename docs/{ => docs}/user-guide/transformations/pivot.md (100%) rename docs/{ => docs}/user-guide/transformations/time-series/filter.md (100%) rename docs/{ => docs}/user-guide/transformations/time-series/parsing.md (100%) rename docs/{ => docs}/user-guide/transformations/time-series/resampling.md (100%) rename docs/{ => docs}/user-guide/transformations/time-series/rolling.md (100%) rename docs/{ => docs}/user-guide/transformations/time-series/timezones.md (100%) rename docs/{ => docs}/user-guide/transformations/unpivot.md (100%) delete mode 100644 docs/images/.gitignore delete mode 100644 docs/user-guide/lazy/streaming.md diff --git a/.github/workflows/docs-global.yml b/.github/workflows/docs-global.yml index 9444cfd330c1..92b414152a3b 100644 --- a/.github/workflows/docs-global.yml +++ b/.github/workflows/docs-global.yml @@ -21,7 +21,7 @@ jobs: ref: ${{ github.event.client_payload.sha }} - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - config-file: docs/mlc-config.json + config-file: docs/docs/mlc-config.json folder-path: docs lint: @@ -39,13 +39,13 @@ jobs: - uses: chartboost/ruff-action@v1 with: - src: docs/ + src: docs/docs/ version: ${{ steps.version.outputs.version }} args: check --no-fix - uses: chartboost/ruff-action@v1 with: - src: docs/ + src: docs/docs/ version: ${{ steps.version.outputs.version }} args: format --diff @@ -69,7 +69,7 @@ jobs: echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV - name: Install Python dependencies - run: uv pip install -r py-polars/requirements-dev.txt -r docs/requirements.txt + run: uv pip install -r py-polars/requirements-dev.txt -r docs/docs/requirements.txt - name: Set up Rust run: rustup show diff --git a/.github/workflows/lint-rust.yml b/.github/workflows/lint-rust.yml index cb974eb8bd9d..fb688f273875 100644 --- a/.github/workflows/lint-rust.yml +++ b/.github/workflows/lint-rust.yml @@ -4,7 +4,7 @@ on: pull_request: paths: - crates/** - - docs/src/rust/** + - docs/docs/src/rust/** - examples/** - py-polars/src/** - py-polars/Cargo.toml @@ -15,7 +15,7 @@ on: - main paths: - crates/** - - docs/src/rust/** + - docs/docs/src/rust/** - examples/** - py-polars/src/** - py-polars/Cargo.toml diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 089ccb9f553a..87fc72d922b3 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -5,7 +5,7 @@ on: paths: - Cargo.lock - py-polars/** - - docs/src/python/** + - docs/docs/src/python/** - crates/** - .github/workflows/test-python.yml push: @@ -14,7 +14,7 @@ on: paths: - Cargo.lock - crates/** - - docs/src/python/** + - docs/docs/src/python/** - py-polars/** - .github/workflows/test-python.yml diff --git a/.gitignore b/.gitignore index 6cb7cc6fa0bd..7ccc017d8e96 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,5 @@ target/ *.tbl # Project -/docs/data/ -/docs/images/ -/docs/people.md +/docs/docs-res/data/ +/docs/docs-res/people.md diff --git a/Cargo.toml b/Cargo.toml index 393248a42e19..e4795a050ae9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ resolver = "2" members = [ "crates/*", - "docs/src/rust", + "docs/docs/src/rust", # "examples/*", "py-polars", ] diff --git a/Makefile b/Makefile index ae13f7a525bc..686e2cc0165e 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ requirements: .venv ## Install/refresh Python project requirements -r py-polars/requirements-dev.txt \ -r py-polars/requirements-lint.txt \ -r py-polars/docs/requirements-docs.txt \ - -r docs/requirements.txt + -r docs/docs/requirements.txt .PHONY: requirements-all requirements-all: .venv ## Install/refresh all Python requirements (including those needed for CI tests) diff --git a/README.md b/README.md index a106db5cc3ca..516cb5eaad7b 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ shape: (5, 8) ## SQL ```python ->>> df = pl.scan_csv("docs/data/iris.csv") +>>> df = pl.scan_csv("docs/docs-res/data/iris.csv") >>> ## OPTION 1 >>> # run SQL queries on frame-level >>> df.sql(""" @@ -141,14 +141,14 @@ SQL commands can also be run directly from your terminal using the Polars CLI: ```bash # run an inline SQL query -> polars -c "SELECT species, AVG(sepal_length) AS avg_sepal_length, AVG(sepal_width) AS avg_sepal_width FROM read_csv('docs/data/iris.csv') GROUP BY species;" +> polars -c "SELECT species, AVG(sepal_length) AS avg_sepal_length, AVG(sepal_width) AS avg_sepal_width FROM read_csv('docs/docs-res/data/iris.csv') GROUP BY species;" # run interactively > polars Polars CLI v0.3.0 Type .help for help. -> SELECT species, AVG(sepal_length) AS avg_sepal_length, AVG(sepal_width) AS avg_sepal_width FROM read_csv('docs/data/iris.csv') GROUP BY species; +> SELECT species, AVG(sepal_length) AS avg_sepal_length, AVG(sepal_width) AS avg_sepal_width FROM read_csv('docs/docs-res/data/iris.csv') GROUP BY species; ``` Refer to the [Polars CLI repository](https://github.com/pola-rs/polars-cli) for more information. diff --git a/crates/polars/tests/it/io/parquet/arrow/read.rs b/crates/polars/tests/it/io/parquet/arrow/read.rs index ac03b7fb1e10..cb702ebbf018 100644 --- a/crates/polars/tests/it/io/parquet/arrow/read.rs +++ b/crates/polars/tests/it/io/parquet/arrow/read.rs @@ -10,7 +10,7 @@ fn all_types() -> PolarsResult<()> { use crate::io::parquet::read::file::FileReader; let dir = env!("CARGO_MANIFEST_DIR"); - let path = PathBuf::from(dir).join("../../docs/data/alltypes_plain.parquet"); + let path = PathBuf::from(dir).join("../../docs/docs-res/data/alltypes_plain.parquet"); let mut reader = std::fs::File::open(path)?; @@ -55,7 +55,7 @@ fn all_types_chunked() -> PolarsResult<()> { use crate::io::parquet::read::file::FileReader; let dir = env!("CARGO_MANIFEST_DIR"); - let path = PathBuf::from(dir).join("../../docs/data/alltypes_plain.parquet"); + let path = PathBuf::from(dir).join("../../docs/docs-res/data/alltypes_plain.parquet"); let mut reader = std::fs::File::open(path)?; let metadata = read_metadata(&mut reader)?; diff --git a/crates/polars/tests/it/io/parquet/read/mod.rs b/crates/polars/tests/it/io/parquet/read/mod.rs index c4ba7d5e418e..c7870768ad7f 100644 --- a/crates/polars/tests/it/io/parquet/read/mod.rs +++ b/crates/polars/tests/it/io/parquet/read/mod.rs @@ -34,7 +34,7 @@ pub fn hybrid_rle_iter(d: HybridRleDecoder) -> ParquetResult PathBuf { let dir = env!("CARGO_MANIFEST_DIR"); - PathBuf::from(dir).join("../../docs/data") + PathBuf::from(dir).join("../../docs/docs-res/data") } /// Reads a page into an [`Array`]. diff --git a/docs/data/alltypes_plain.parquet b/docs/docs-res/data/alltypes_plain.parquet similarity index 100% rename from docs/data/alltypes_plain.parquet rename to docs/docs-res/data/alltypes_plain.parquet diff --git a/docs/data/apple_stock.csv b/docs/docs-res/data/apple_stock.csv similarity index 100% rename from docs/data/apple_stock.csv rename to docs/docs-res/data/apple_stock.csv diff --git a/docs/data/iris.csv b/docs/docs-res/data/iris.csv similarity index 100% rename from docs/data/iris.csv rename to docs/docs-res/data/iris.csv diff --git a/docs/data/reddit.csv b/docs/docs-res/data/reddit.csv similarity index 100% rename from docs/data/reddit.csv rename to docs/docs-res/data/reddit.csv diff --git a/docs/docs-res/images/.gitignore b/docs/docs-res/images/.gitignore new file mode 100644 index 000000000000..d6b7ef32c847 --- /dev/null +++ b/docs/docs-res/images/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/docs/_build/API_REFERENCE_LINKS.yml b/docs/docs/_build/API_REFERENCE_LINKS.yml similarity index 100% rename from docs/_build/API_REFERENCE_LINKS.yml rename to docs/docs/_build/API_REFERENCE_LINKS.yml diff --git a/docs/_build/assets/logo.png b/docs/docs/_build/assets/logo.png similarity index 100% rename from docs/_build/assets/logo.png rename to docs/docs/_build/assets/logo.png diff --git a/docs/_build/css/extra.css b/docs/docs/_build/css/extra.css similarity index 100% rename from docs/_build/css/extra.css rename to docs/docs/_build/css/extra.css diff --git a/docs/_build/overrides/404.html b/docs/docs/_build/overrides/404.html similarity index 100% rename from docs/_build/overrides/404.html rename to docs/docs/_build/overrides/404.html diff --git a/docs/_build/scripts/macro.py b/docs/docs/_build/scripts/macro.py similarity index 96% rename from docs/_build/scripts/macro.py rename to docs/docs/_build/scripts/macro.py index 15fbf9e1ddc2..d2cf8469d5e0 100644 --- a/docs/_build/scripts/macro.py +++ b/docs/docs/_build/scripts/macro.py @@ -22,7 +22,7 @@ ) # Load all links to reference docs -with open("docs/_build/API_REFERENCE_LINKS.yml", "r") as f: +with open("docs/docs/_build//API_REFERENCE_LINKS.yml", "r") as f: API_REFERENCE_LINKS = yaml.load(f, Loader=yaml.CLoader) @@ -39,7 +39,7 @@ def create_feature_flag_link(feature_name: str) -> str: def create_feature_flag_links(language: str, api_functions: List[str]) -> List[str]: - """Generate markdown feature flags for the code tas based on the api_functions. + """Generate markdown feature flags for the code tabs based on the api_functions. It checks for the key feature_flag in the configuration yaml for the function and if it exists print out markdown Args: @@ -165,7 +165,7 @@ def code_block( for language, info in LANGUAGES.items(): base_path = f"{language}/{path}{info['extension']}" - full_path = "docs/src/" + base_path + full_path = "docs/docs/src/" + base_path # Check if file exists for the language if os.path.exists(full_path): result.append(code_tab(base_path, section, info, api_functions)) diff --git a/docs/_build/scripts/people.py b/docs/docs/_build/scripts/people.py similarity index 81% rename from docs/_build/scripts/people.py rename to docs/docs/_build/scripts/people.py index 72ba55c37f56..13390b67bb81 100644 --- a/docs/_build/scripts/people.py +++ b/docs/docs/_build/scripts/people.py @@ -8,10 +8,11 @@ ICON_TEMPLATE = '{login}' + def get_people_md(): repo = g.get_repo("pola-rs/polars") contributors = repo.get_contributors() - with open("./docs/people.md", "w") as f: + with open("./docs/docs-res/people.md", "w") as f: for c in itertools.islice(contributors, 50): # We love dependabot, but he doesn't need a spot on our website if c.login == "dependabot[bot]": @@ -28,11 +29,11 @@ def get_people_md(): def on_startup(command, dirty): - """Mkdocs hook to autogenerate docs/people.md on startup""" + """Mkdocs hook to autogenerate docs/docs/people.md on startup""" try: get_people_md() except Exception as e: - msg = f"WARNING:{__file__}: Could not generate docs/people.md. Got error: {str(e)}" + msg = f"WARNING:{__file__}: Could not generate docs/docs/people.md. Got error: {str(e)}" print(msg) diff --git a/docs/_build/snippets/under_construction.md b/docs/docs/_build/snippets/under_construction.md similarity index 100% rename from docs/_build/snippets/under_construction.md rename to docs/docs/_build/snippets/under_construction.md diff --git a/docs/api/index.md b/docs/docs/api/index.md similarity index 100% rename from docs/api/index.md rename to docs/docs/api/index.md diff --git a/docs/development/contributing/ci.md b/docs/docs/development/contributing/ci.md similarity index 100% rename from docs/development/contributing/ci.md rename to docs/docs/development/contributing/ci.md diff --git a/docs/development/contributing/code-style.md b/docs/docs/development/contributing/code-style.md similarity index 100% rename from docs/development/contributing/code-style.md rename to docs/docs/development/contributing/code-style.md diff --git a/docs/development/contributing/ide.md b/docs/docs/development/contributing/ide.md similarity index 97% rename from docs/development/contributing/ide.md rename to docs/docs/development/contributing/ide.md index 562216e9ff5e..e5c10e523647 100644 --- a/docs/development/contributing/ide.md +++ b/docs/docs/development/contributing/ide.md @@ -51,7 +51,7 @@ This guide shows how to set up a debugging environment that makes debugging Rust Start by installing the CodeLLDB extension (see above). Then add the following two configurations to your `launch.json` file. This file is usually found in the `.vscode` folder of your project root. -See the [official VSCode documentation](https://code.visualstudio.com/docs/editor/debugging#_launch-configurations) for more information about the `launch.json` file. +See the [official VSCode documentation](https://code.visualstudio.com/docs/docs/editor/debugging#_launch-configurations) for more information about the `launch.json` file.
launch.json diff --git a/docs/development/contributing/index.md b/docs/docs/development/contributing/index.md similarity index 100% rename from docs/development/contributing/index.md rename to docs/docs/development/contributing/index.md diff --git a/docs/development/contributing/test.md b/docs/docs/development/contributing/test.md similarity index 100% rename from docs/development/contributing/test.md rename to docs/docs/development/contributing/test.md diff --git a/docs/development/versioning.md b/docs/docs/development/versioning.md similarity index 100% rename from docs/development/versioning.md rename to docs/docs/development/versioning.md diff --git a/docs/index.md b/docs/docs/index.md similarity index 99% rename from docs/index.md rename to docs/docs/index.md index e984a05f17e9..d49f0584d43b 100644 --- a/docs/index.md +++ b/docs/docs/index.md @@ -57,7 +57,7 @@ A more extensive introduction can be found in the [next chapter](user-guide/gett Polars has a very active community with frequent releases (approximately weekly). Below are some of the top contributors to the project: ---8<-- "docs/people.md" +--8<-- "docs/docs-res/people.md" ## Contributing diff --git a/docs/mlc-config.json b/docs/docs/mlc-config.json similarity index 100% rename from docs/mlc-config.json rename to docs/docs/mlc-config.json diff --git a/docs/pyproject.toml b/docs/docs/pyproject.toml similarity index 100% rename from docs/pyproject.toml rename to docs/docs/pyproject.toml diff --git a/docs/releases/changelog.md b/docs/docs/releases/changelog.md similarity index 100% rename from docs/releases/changelog.md rename to docs/docs/releases/changelog.md diff --git a/docs/releases/upgrade/0.19.md b/docs/docs/releases/upgrade/0.19.md similarity index 100% rename from docs/releases/upgrade/0.19.md rename to docs/docs/releases/upgrade/0.19.md diff --git a/docs/releases/upgrade/0.20.md b/docs/docs/releases/upgrade/0.20.md similarity index 100% rename from docs/releases/upgrade/0.20.md rename to docs/docs/releases/upgrade/0.20.md diff --git a/docs/releases/upgrade/1.md b/docs/docs/releases/upgrade/1.md similarity index 100% rename from docs/releases/upgrade/1.md rename to docs/docs/releases/upgrade/1.md diff --git a/docs/releases/upgrade/index.md b/docs/docs/releases/upgrade/index.md similarity index 100% rename from docs/releases/upgrade/index.md rename to docs/docs/releases/upgrade/index.md diff --git a/docs/requirements.txt b/docs/docs/requirements.txt similarity index 100% rename from docs/requirements.txt rename to docs/docs/requirements.txt diff --git a/docs/src/python/home/example.py b/docs/docs/src/python/home/example.py similarity index 79% rename from docs/src/python/home/example.py rename to docs/docs/src/python/home/example.py index 5f675f4e82e4..0472c565337f 100644 --- a/docs/src/python/home/example.py +++ b/docs/docs/src/python/home/example.py @@ -2,7 +2,7 @@ import polars as pl q = ( - pl.scan_csv("docs/data/iris.csv") + pl.scan_csv("docs/docs-res/data/iris.csv") .filter(pl.col("sepal_length") > 5) .group_by("species") .agg(pl.all().sum()) diff --git a/docs/src/python/user-guide/concepts/contexts.py b/docs/docs/src/python/user-guide/concepts/contexts.py similarity index 100% rename from docs/src/python/user-guide/concepts/contexts.py rename to docs/docs/src/python/user-guide/concepts/contexts.py diff --git a/docs/src/python/user-guide/concepts/data-structures.py b/docs/docs/src/python/user-guide/concepts/data-structures.py similarity index 100% rename from docs/src/python/user-guide/concepts/data-structures.py rename to docs/docs/src/python/user-guide/concepts/data-structures.py diff --git a/docs/src/python/user-guide/concepts/data-types/categoricals.py b/docs/docs/src/python/user-guide/concepts/data-types/categoricals.py similarity index 100% rename from docs/src/python/user-guide/concepts/data-types/categoricals.py rename to docs/docs/src/python/user-guide/concepts/data-types/categoricals.py diff --git a/docs/src/python/user-guide/concepts/expressions.py b/docs/docs/src/python/user-guide/concepts/expressions.py similarity index 100% rename from docs/src/python/user-guide/concepts/expressions.py rename to docs/docs/src/python/user-guide/concepts/expressions.py diff --git a/docs/src/python/user-guide/concepts/lazy-vs-eager.py b/docs/docs/src/python/user-guide/concepts/lazy-vs-eager.py similarity index 79% rename from docs/src/python/user-guide/concepts/lazy-vs-eager.py rename to docs/docs/src/python/user-guide/concepts/lazy-vs-eager.py index 1327bac6357a..c1fd0b5e7021 100644 --- a/docs/src/python/user-guide/concepts/lazy-vs-eager.py +++ b/docs/docs/src/python/user-guide/concepts/lazy-vs-eager.py @@ -2,7 +2,7 @@ # --8<-- [start:eager] -df = pl.read_csv("docs/data/iris.csv") +df = pl.read_csv("docs/docs-res/data/iris.csv") df_small = df.filter(pl.col("sepal_length") > 5) df_agg = df_small.group_by("species").agg(pl.col("sepal_width").mean()) print(df_agg) @@ -10,7 +10,7 @@ # --8<-- [start:lazy] q = ( - pl.scan_csv("docs/data/iris.csv") + pl.scan_csv("docs/docs-res/data/iris.csv") .filter(pl.col("sepal_length") > 5) .group_by("species") .agg(pl.col("sepal_width").mean()) diff --git a/docs/src/python/user-guide/concepts/streaming.py b/docs/docs/src/python/user-guide/concepts/streaming.py similarity index 81% rename from docs/src/python/user-guide/concepts/streaming.py rename to docs/docs/src/python/user-guide/concepts/streaming.py index a54f545c0979..57fb617275d3 100644 --- a/docs/src/python/user-guide/concepts/streaming.py +++ b/docs/docs/src/python/user-guide/concepts/streaming.py @@ -1,10 +1,11 @@ # --8<-- [start:import] import polars as pl + # --8<-- [end:import] # --8<-- [start:streaming] q1 = ( - pl.scan_csv("docs/data/iris.csv") + pl.scan_csv("docs/docs-res/data/iris.csv") .filter(pl.col("sepal_length") > 5) .group_by("species") .agg(pl.col("sepal_width").mean()) @@ -18,7 +19,7 @@ # --8<-- [end:example] # --8<-- [start:example2] -q2 = pl.scan_csv("docs/data/iris.csv").with_columns( +q2 = pl.scan_csv("docs/docs-res/data/iris.csv").with_columns( pl.col("sepal_length").mean().over("species") ) diff --git a/docs/src/python/user-guide/expressions/aggregation.py b/docs/docs/src/python/user-guide/expressions/aggregation.py similarity index 100% rename from docs/src/python/user-guide/expressions/aggregation.py rename to docs/docs/src/python/user-guide/expressions/aggregation.py diff --git a/docs/src/python/user-guide/expressions/casting.py b/docs/docs/src/python/user-guide/expressions/casting.py similarity index 100% rename from docs/src/python/user-guide/expressions/casting.py rename to docs/docs/src/python/user-guide/expressions/casting.py diff --git a/docs/src/python/user-guide/expressions/column-selections.py b/docs/docs/src/python/user-guide/expressions/column-selections.py similarity index 100% rename from docs/src/python/user-guide/expressions/column-selections.py rename to docs/docs/src/python/user-guide/expressions/column-selections.py diff --git a/docs/src/python/user-guide/expressions/folds.py b/docs/docs/src/python/user-guide/expressions/folds.py similarity index 100% rename from docs/src/python/user-guide/expressions/folds.py rename to docs/docs/src/python/user-guide/expressions/folds.py diff --git a/docs/src/python/user-guide/expressions/functions.py b/docs/docs/src/python/user-guide/expressions/functions.py similarity index 100% rename from docs/src/python/user-guide/expressions/functions.py rename to docs/docs/src/python/user-guide/expressions/functions.py diff --git a/docs/src/python/user-guide/expressions/lists.py b/docs/docs/src/python/user-guide/expressions/lists.py similarity index 100% rename from docs/src/python/user-guide/expressions/lists.py rename to docs/docs/src/python/user-guide/expressions/lists.py diff --git a/docs/src/python/user-guide/expressions/missing-data.py b/docs/docs/src/python/user-guide/expressions/missing-data.py similarity index 100% rename from docs/src/python/user-guide/expressions/missing-data.py rename to docs/docs/src/python/user-guide/expressions/missing-data.py diff --git a/docs/src/python/user-guide/expressions/numpy-example.py b/docs/docs/src/python/user-guide/expressions/numpy-example.py similarity index 100% rename from docs/src/python/user-guide/expressions/numpy-example.py rename to docs/docs/src/python/user-guide/expressions/numpy-example.py diff --git a/docs/src/python/user-guide/expressions/operators.py b/docs/docs/src/python/user-guide/expressions/operators.py similarity index 100% rename from docs/src/python/user-guide/expressions/operators.py rename to docs/docs/src/python/user-guide/expressions/operators.py diff --git a/docs/src/python/user-guide/expressions/strings.py b/docs/docs/src/python/user-guide/expressions/strings.py similarity index 100% rename from docs/src/python/user-guide/expressions/strings.py rename to docs/docs/src/python/user-guide/expressions/strings.py diff --git a/docs/src/python/user-guide/expressions/structs.py b/docs/docs/src/python/user-guide/expressions/structs.py similarity index 100% rename from docs/src/python/user-guide/expressions/structs.py rename to docs/docs/src/python/user-guide/expressions/structs.py diff --git a/docs/src/python/user-guide/expressions/user-defined-functions.py b/docs/docs/src/python/user-guide/expressions/user-defined-functions.py similarity index 100% rename from docs/src/python/user-guide/expressions/user-defined-functions.py rename to docs/docs/src/python/user-guide/expressions/user-defined-functions.py diff --git a/docs/src/python/user-guide/expressions/window.py b/docs/docs/src/python/user-guide/expressions/window.py similarity index 100% rename from docs/src/python/user-guide/expressions/window.py rename to docs/docs/src/python/user-guide/expressions/window.py diff --git a/docs/src/python/user-guide/getting-started/expressions.py b/docs/docs/src/python/user-guide/getting-started/expressions.py similarity index 100% rename from docs/src/python/user-guide/getting-started/expressions.py rename to docs/docs/src/python/user-guide/getting-started/expressions.py diff --git a/docs/src/python/user-guide/getting-started/joins.py b/docs/docs/src/python/user-guide/getting-started/joins.py similarity index 100% rename from docs/src/python/user-guide/getting-started/joins.py rename to docs/docs/src/python/user-guide/getting-started/joins.py diff --git a/docs/src/python/user-guide/getting-started/reading-writing.py b/docs/docs/src/python/user-guide/getting-started/reading-writing.py similarity index 60% rename from docs/src/python/user-guide/getting-started/reading-writing.py rename to docs/docs/src/python/user-guide/getting-started/reading-writing.py index 68c0ab235fd1..a5537422dae8 100644 --- a/docs/src/python/user-guide/getting-started/reading-writing.py +++ b/docs/docs/src/python/user-guide/getting-started/reading-writing.py @@ -19,24 +19,24 @@ # --8<-- [end:dataframe] # --8<-- [start:csv] -df.write_csv("docs/data/output.csv") -df_csv = pl.read_csv("docs/data/output.csv") +df.write_csv("docs/docs-res/data/output.csv") +df_csv = pl.read_csv("docs/docs-res/data/output.csv") print(df_csv) # --8<-- [end:csv] # --8<-- [start:csv2] -df_csv = pl.read_csv("docs/data/output.csv", try_parse_dates=True) +df_csv = pl.read_csv("docs/docs-res/data/output.csv", try_parse_dates=True) print(df_csv) # --8<-- [end:csv2] # --8<-- [start:json] -df.write_json("docs/data/output.json") -df_json = pl.read_json("docs/data/output.json") +df.write_json("docs/docs-res/data/output.json") +df_json = pl.read_json("docs/docs-res/data/output.json") print(df_json) # --8<-- [end:json] # --8<-- [start:parquet] -df.write_parquet("docs/data/output.parquet") -df_parquet = pl.read_parquet("docs/data/output.parquet") +df.write_parquet("docs/docs-res/data/output.parquet") +df_parquet = pl.read_parquet("docs/docs-res/data/output.parquet") print(df_parquet) # --8<-- [end:parquet] diff --git a/docs/src/python/user-guide/io/bigquery.py b/docs/docs/src/python/user-guide/io/bigquery.py similarity index 100% rename from docs/src/python/user-guide/io/bigquery.py rename to docs/docs/src/python/user-guide/io/bigquery.py diff --git a/docs/src/python/user-guide/io/cloud-storage.py b/docs/docs/src/python/user-guide/io/cloud-storage.py similarity index 100% rename from docs/src/python/user-guide/io/cloud-storage.py rename to docs/docs/src/python/user-guide/io/cloud-storage.py diff --git a/docs/src/python/user-guide/io/csv.py b/docs/docs/src/python/user-guide/io/csv.py similarity index 65% rename from docs/src/python/user-guide/io/csv.py rename to docs/docs/src/python/user-guide/io/csv.py index d4039a43ce35..5cf812e6d9f4 100644 --- a/docs/src/python/user-guide/io/csv.py +++ b/docs/docs/src/python/user-guide/io/csv.py @@ -5,15 +5,15 @@ """ # --8<-- [start:read] -df = pl.read_csv("docs/data/path.csv") +df = pl.read_csv("docs/docs-res/data/path.csv") # --8<-- [end:read] """ # --8<-- [start:write] df = pl.DataFrame({"foo": [1, 2, 3], "bar": [None, "bak", "baz"]}) -df.write_csv("docs/data/path.csv") +df.write_csv("docs/docs-res/data/path.csv") # --8<-- [end:write] # --8<-- [start:scan] -df = pl.scan_csv("docs/data/path.csv") +df = pl.scan_csv("docs/docs-res/data/path.csv") # --8<-- [end:scan] diff --git a/docs/src/python/user-guide/io/database.py b/docs/docs/src/python/user-guide/io/database.py similarity index 100% rename from docs/src/python/user-guide/io/database.py rename to docs/docs/src/python/user-guide/io/database.py diff --git a/docs/src/python/user-guide/io/excel.py b/docs/docs/src/python/user-guide/io/excel.py similarity index 64% rename from docs/src/python/user-guide/io/excel.py rename to docs/docs/src/python/user-guide/io/excel.py index 4715c741481a..87f756d44b55 100644 --- a/docs/src/python/user-guide/io/excel.py +++ b/docs/docs/src/python/user-guide/io/excel.py @@ -5,22 +5,22 @@ """ # --8<-- [start:read] -df = pl.read_excel("docs/data/path.xlsx") +df = pl.read_excel("docs/docs-res/data/path.xlsx") # --8<-- [end:read] # --8<-- [start:read_sheet_name] -df = pl.read_excel("docs/data/path.xlsx", sheet_name="Sales") +df = pl.read_excel("docs/docs-res/data/path.xlsx", sheet_name="Sales") # --8<-- [end:read_sheet_name] """ # --8<-- [start:write] df = pl.DataFrame({"foo": [1, 2, 3], "bar": [None, "bak", "baz"]}) -df.write_excel("docs/data/path.xlsx") +df.write_excel("docs/docs-res/data/path.xlsx") # --8<-- [end:write] """ # --8<-- [start:write_sheet_name] df = pl.DataFrame({"foo": [1, 2, 3], "bar": [None, "bak", "baz"]}) -df.write_excel("docs/data/path.xlsx", worksheet="Sales") +df.write_excel("docs/docs-res/data/path.xlsx", worksheet="Sales") # --8<-- [end:write_sheet_name] """ diff --git a/docs/src/python/user-guide/io/hive.py b/docs/docs/src/python/user-guide/io/hive.py similarity index 73% rename from docs/src/python/user-guide/io/hive.py rename to docs/docs/src/python/user-guide/io/hive.py index 072b0fb3c34a..9248c3b2236a 100644 --- a/docs/src/python/user-guide/io/hive.py +++ b/docs/docs/src/python/user-guide/io/hive.py @@ -17,16 +17,16 @@ ] for df, part in zip(dfs, parts): - path = Path("docs/data/hive/") / part / "data.parquet" + path = Path("docs/docs-res/data/hive/") / part / "data.parquet" Path(path).parent.mkdir(exist_ok=True, parents=True) df.write_parquet(path) - path = Path("docs/data/hive_mixed/") / part / "data.parquet" + path = Path("docs/docs-res/data/hive_mixed/") / part / "data.parquet" Path(path).parent.mkdir(exist_ok=True, parents=True) df.write_parquet(path) # Make sure the file is not empty because path expansion ignores empty files. -Path("docs/data/hive_mixed/description.txt").write_text("A") +Path("docs/docs-res/data/hive_mixed/description.txt").write_text("A") def print_paths(path: str) -> None: @@ -55,17 +55,17 @@ def dir_recurse(path: Path): print(df) -print_paths("docs/data/hive/") +print_paths("docs/docs-res/data/hive/") # --8<-- [end:init_paths] # --8<-- [start:show_mixed_paths] -print_paths("docs/data/hive_mixed/") +print_paths("docs/docs-res/data/hive_mixed/") # --8<-- [end:show_mixed_paths] # --8<-- [start:scan_dir] import polars as pl -df = pl.scan_parquet("docs/data/hive/").collect() +df = pl.scan_parquet("docs/docs-res/data/hive/").collect() with pl.Config(tbl_rows=99): print(df) @@ -75,7 +75,7 @@ def dir_recurse(path: Path): from pathlib import Path try: - pl.scan_parquet("docs/data/hive_mixed/").collect() + pl.scan_parquet("docs/docs-res/data/hive_mixed/").collect() except Exception as e: print(e) @@ -84,7 +84,7 @@ def dir_recurse(path: Path): # --8<-- [start:scan_glob] df = pl.scan_parquet( # Glob to match all files ending in `.parquet` - "docs/data/hive_mixed/**/*.parquet", + "docs/docs-res/data/hive_mixed/**/*.parquet", hive_partitioning=True, ).collect() @@ -96,8 +96,8 @@ def dir_recurse(path: Path): # --8<-- [start:scan_file_no_hive] df = pl.scan_parquet( [ - "docs/data/hive/year=2024/month=01/data.parquet", - "docs/data/hive/year=2024/month=02/data.parquet", + "docs/docs-res/data/hive/year=2024/month=01/data.parquet", + "docs/docs-res/data/hive/year=2024/month=02/data.parquet", ], ).collect() @@ -108,8 +108,8 @@ def dir_recurse(path: Path): # --8<-- [start:scan_file_hive] df = pl.scan_parquet( [ - "docs/data/hive/year=2024/month=01/data.parquet", - "docs/data/hive/year=2024/month=02/data.parquet", + "docs/docs-res/data/hive/year=2024/month=01/data.parquet", + "docs/docs-res/data/hive/year=2024/month=02/data.parquet", ], hive_partitioning=True, ).collect() @@ -124,9 +124,9 @@ def dir_recurse(path: Path): # --8<-- [end:write_parquet_partitioned_show_data] # --8<-- [start:write_parquet_partitioned] -df.write_parquet("docs/data/hive_write/", partition_by=["a", "b"]) +df.write_parquet("docs/docs-res/data/hive_write/", partition_by=["a", "b"]) # --8<-- [end:write_parquet_partitioned] # --8<-- [start:write_parquet_partitioned_show_paths] -print_paths("docs/data/hive_write/") +print_paths("docs/docs-res/data/hive_write/") # --8<-- [end:write_parquet_partitioned_show_paths] diff --git a/docs/src/python/user-guide/io/hugging-face.py b/docs/docs/src/python/user-guide/io/hugging-face.py similarity index 94% rename from docs/src/python/user-guide/io/hugging-face.py rename to docs/docs/src/python/user-guide/io/hugging-face.py index d18304a5b6b0..0b7631e359e1 100644 --- a/docs/src/python/user-guide/io/hugging-face.py +++ b/docs/docs/src/python/user-guide/io/hugging-face.py @@ -4,15 +4,18 @@ # --8<-- [end:setup] # --8<-- [start:scan_iris_csv] -print(pl.scan_csv("hf://datasets/nameexhaustion/polars-docs/iris.csv").collect()) +print(pl.scan_csv("hf://datasets/nameexhaustion/polars-docs/docs/iris.csv").collect()) # --8<-- [end:scan_iris_csv] # --8<-- [start:scan_iris_ndjson] -print(pl.scan_ndjson("hf://datasets/nameexhaustion/polars-docs/iris.jsonl").collect()) +print( + pl.scan_ndjson("hf://datasets/nameexhaustion/polars-docs/docs/iris.jsonl").collect() +) # --8<-- [end:scan_iris_ndjson] # --8<-- [start:scan_iris_repr] -print("""\ +print( + """\ shape: (150, 5) ┌──────────────┬─────────────┬──────────────┬─────────────┬───────────┐ │ sepal_length ┆ sepal_width ┆ petal_length ┆ petal_width ┆ species │ @@ -31,15 +34,21 @@ │ 6.2 ┆ 3.4 ┆ 5.4 ┆ 2.3 ┆ virginica │ │ 5.9 ┆ 3.0 ┆ 5.1 ┆ 1.8 ┆ virginica │ └──────────────┴─────────────┴──────────────┴─────────────┴───────────┘ -""") +""" +) # --8<-- [end:scan_iris_repr] # --8<-- [start:scan_parquet_hive] -print(pl.scan_parquet("hf://datasets/nameexhaustion/polars-docs/hive_dates/").collect()) +print( + pl.scan_parquet( + "hf://datasets/nameexhaustion/polars-docs/docs/hive_dates/" + ).collect() +) # --8<-- [end:scan_parquet_hive] # --8<-- [start:scan_parquet_hive_repr] -print("""\ +print( + """\ shape: (4, 3) ┌────────────┬────────────────────────────┬─────┐ │ date1 ┆ date2 ┆ x │ @@ -51,15 +60,19 @@ │ 2024-03-01 ┆ null ┆ 3 │ │ null ┆ 2023-03-01 01:01:01.000001 ┆ 4 │ └────────────┴────────────────────────────┴─────┘ -""") +""" +) # --8<-- [end:scan_parquet_hive_repr] # --8<-- [start:scan_ipc] -print(pl.scan_ipc("hf://spaces/nameexhaustion/polars-docs/orders.feather").collect()) +print( + pl.scan_ipc("hf://spaces/nameexhaustion/polars-docs/docs/orders.feather").collect() +) # --8<-- [end:scan_ipc] # --8<-- [start:scan_ipc_repr] -print("""\ +print( + """\ shape: (10, 9) ┌────────────┬───────────┬───────────────┬──────────────┬───┬─────────────────┬─────────────────┬────────────────┬─────────────────────────┐ │ o_orderkey ┆ o_custkey ┆ o_orderstatus ┆ o_totalprice ┆ … ┆ o_orderpriority ┆ o_clerk ┆ o_shippriority ┆ o_comment │ @@ -86,5 +99,6 @@ │ 34 ┆ 61001 ┆ O ┆ 58949.67 ┆ … ┆ 3-MEDIUM ┆ Clerk#000000223 ┆ 0 ┆ ly final packages. │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ┆ fluffily fi… │ └────────────┴───────────┴───────────────┴──────────────┴───┴─────────────────┴─────────────────┴────────────────┴─────────────────────────┘ -""") +""" +) # --8<-- [end:scan_ipc_repr] diff --git a/docs/src/python/user-guide/io/json.py b/docs/docs/src/python/user-guide/io/json.py similarity index 62% rename from docs/src/python/user-guide/io/json.py rename to docs/docs/src/python/user-guide/io/json.py index b4f89ef878aa..e5ea30cec88d 100644 --- a/docs/src/python/user-guide/io/json.py +++ b/docs/docs/src/python/user-guide/io/json.py @@ -5,23 +5,23 @@ """ # --8<-- [start:read] -df = pl.read_json("docs/data/path.json") +df = pl.read_json("docs/docs-res/data/path.json") # --8<-- [end:read] # --8<-- [start:readnd] -df = pl.read_ndjson("docs/data/path.json") +df = pl.read_ndjson("docs/docs-res/data/path.json") # --8<-- [end:readnd] """ # --8<-- [start:write] df = pl.DataFrame({"foo": [1, 2, 3], "bar": [None, "bak", "baz"]}) -df.write_json("docs/data/path.json") +df.write_json("docs/docs-res/data/path.json") # --8<-- [end:write] """ # --8<-- [start:scan] -df = pl.scan_ndjson("docs/data/path.json") +df = pl.scan_ndjson("docs/docs-res/data/path.json") # --8<-- [end:scan] """ diff --git a/docs/src/python/user-guide/io/multiple.py b/docs/docs/src/python/user-guide/io/multiple.py similarity index 60% rename from docs/src/python/user-guide/io/multiple.py rename to docs/docs/src/python/user-guide/io/multiple.py index a718c5cd1588..1bc75fc53b91 100644 --- a/docs/src/python/user-guide/io/multiple.py +++ b/docs/docs/src/python/user-guide/io/multiple.py @@ -4,27 +4,27 @@ df = pl.DataFrame({"foo": [1, 2, 3], "bar": [None, "ham", "spam"]}) for i in range(5): - df.write_csv(f"docs/data/my_many_files_{i}.csv") + df.write_csv(f"docs/docs-res/data/my_many_files_{i}.csv") # --8<-- [end:create] # --8<-- [start:read] -df = pl.read_csv("docs/data/my_many_files_*.csv") +df = pl.read_csv("docs/docs-res/data/my_many_files_*.csv") print(df) # --8<-- [end:read] # --8<-- [start:creategraph] import base64 -pl.scan_csv("docs/data/my_many_files_*.csv").show_graph( - output_path="docs/images/multiple.png", show=False +pl.scan_csv("docs/docs-res/data/my_many_files_*.csv").show_graph( + output_path="docs/docs-res/images/multiple.png", show=False ) -with open("docs/images/multiple.png", "rb") as f: +with open("docs/docs-res/images/multiple.png", "rb") as f: png = base64.b64encode(f.read()).decode() print(f'') # --8<-- [end:creategraph] # --8<-- [start:graph] -pl.scan_csv("docs/data/my_many_files_*.csv").show_graph() +pl.scan_csv("docs/docs-res/data/my_many_files_*.csv").show_graph() # --8<-- [end:graph] # --8<-- [start:glob] @@ -33,7 +33,7 @@ import polars as pl queries = [] -for file in glob.glob("docs/data/my_many_files_*.csv"): +for file in glob.glob("docs/docs-res/data/my_many_files_*.csv"): q = pl.scan_csv(file).group_by("bar").agg(pl.len(), pl.sum("foo")) queries.append(q) diff --git a/docs/src/python/user-guide/io/parquet.py b/docs/docs/src/python/user-guide/io/parquet.py similarity index 62% rename from docs/src/python/user-guide/io/parquet.py rename to docs/docs/src/python/user-guide/io/parquet.py index feba73df9a19..8b971ba09e2a 100644 --- a/docs/src/python/user-guide/io/parquet.py +++ b/docs/docs/src/python/user-guide/io/parquet.py @@ -5,15 +5,15 @@ """ # --8<-- [start:read] -df = pl.read_parquet("docs/data/path.parquet") +df = pl.read_parquet("docs/docs-res/data/path.parquet") # --8<-- [end:read] """ # --8<-- [start:write] df = pl.DataFrame({"foo": [1, 2, 3], "bar": [None, "bak", "baz"]}) -df.write_parquet("docs/data/path.parquet") +df.write_parquet("docs/docs-res/data/path.parquet") # --8<-- [end:write] # --8<-- [start:scan] -df = pl.scan_parquet("docs/data/path.parquet") +df = pl.scan_parquet("docs/docs-res/data/path.parquet") # --8<-- [end:scan] diff --git a/docs/src/python/user-guide/lazy/execution.py b/docs/docs/src/python/user-guide/lazy/execution.py similarity index 78% rename from docs/src/python/user-guide/lazy/execution.py rename to docs/docs/src/python/user-guide/lazy/execution.py index 721c0a45e3af..f44b6a649bb0 100644 --- a/docs/src/python/user-guide/lazy/execution.py +++ b/docs/docs/src/python/user-guide/lazy/execution.py @@ -6,7 +6,7 @@ # --8<-- [start:df] q1 = ( - pl.scan_csv("docs/data/reddit.csv") + pl.scan_csv("docs/docs-res/data/reddit.csv") .with_columns(pl.col("name").str.to_uppercase()) .filter(pl.col("comment_karma") > 0) ) @@ -14,7 +14,7 @@ # --8<-- [start:collect] q4 = ( - pl.scan_csv(f"docs/data/reddit.csv") + pl.scan_csv(f"docs/docs-res/data/reddit.csv") .with_columns(pl.col("name").str.to_uppercase()) .filter(pl.col("comment_karma") > 0) .collect() @@ -22,7 +22,7 @@ # --8<-- [end:collect] # --8<-- [start:stream] q5 = ( - pl.scan_csv(f"docs/data/reddit.csv") + pl.scan_csv(f"docs/docs-res/data/reddit.csv") .with_columns(pl.col("name").str.to_uppercase()) .filter(pl.col("comment_karma") > 0) .collect(streaming=True) @@ -30,7 +30,7 @@ # --8<-- [end:stream] # --8<-- [start:partial] q9 = ( - pl.scan_csv(f"docs/data/reddit.csv") + pl.scan_csv(f"docs/docs-res/data/reddit.csv") .with_columns(pl.col("name").str.to_uppercase()) .filter(pl.col("comment_karma") > 0) .fetch(n_rows=int(100)) diff --git a/docs/src/python/user-guide/lazy/gpu.py b/docs/docs/src/python/user-guide/lazy/gpu.py similarity index 100% rename from docs/src/python/user-guide/lazy/gpu.py rename to docs/docs/src/python/user-guide/lazy/gpu.py diff --git a/docs/src/python/user-guide/lazy/query-plan.py b/docs/docs/src/python/user-guide/lazy/query-plan.py similarity index 69% rename from docs/src/python/user-guide/lazy/query-plan.py rename to docs/docs/src/python/user-guide/lazy/query-plan.py index ed2c3f4bac45..957c2d6cc85c 100644 --- a/docs/src/python/user-guide/lazy/query-plan.py +++ b/docs/docs/src/python/user-guide/lazy/query-plan.py @@ -5,7 +5,7 @@ # --8<-- [start:plan] q1 = ( - pl.scan_csv("docs/data/reddit.csv") + pl.scan_csv("docs/docs-res/data/reddit.csv") .with_columns(pl.col("name").str.to_uppercase()) .filter(pl.col("comment_karma") > 0) ) @@ -14,8 +14,10 @@ # --8<-- [start:createplan] import base64 -q1.show_graph(optimized=False, show=False, output_path="docs/images/query_plan.png") -with open("docs/images/query_plan.png", "rb") as f: +q1.show_graph( + optimized=False, show=False, output_path="docs/docs-res/images/query_plan.png" +) +with open("docs/docs-res/images/query_plan.png", "rb") as f: png = base64.b64encode(f.read()).decode() print(f'') # --8<-- [end:createplan] @@ -31,8 +33,8 @@ # --8<-- [end:describe] # --8<-- [start:createplan2] -q1.show_graph(show=False, output_path="docs/images/query_plan_optimized.png") -with open("docs/images/query_plan_optimized.png", "rb") as f: +q1.show_graph(show=False, output_path="docs/docs-res/images/query_plan_optimized.png") +with open("docs/docs-res/images/query_plan_optimized.png", "rb") as f: png = base64.b64encode(f.read()).decode() print(f'') # --8<-- [end:createplan2] diff --git a/docs/src/python/user-guide/lazy/schema.py b/docs/docs/src/python/user-guide/lazy/schema.py similarity index 100% rename from docs/src/python/user-guide/lazy/schema.py rename to docs/docs/src/python/user-guide/lazy/schema.py diff --git a/docs/src/python/user-guide/lazy/using.py b/docs/docs/src/python/user-guide/lazy/using.py similarity index 87% rename from docs/src/python/user-guide/lazy/using.py rename to docs/docs/src/python/user-guide/lazy/using.py index 3566ee50367d..e15bb24b5dfc 100644 --- a/docs/src/python/user-guide/lazy/using.py +++ b/docs/docs/src/python/user-guide/lazy/using.py @@ -6,7 +6,7 @@ """ # --8<-- [start:dataframe] q1 = ( - pl.scan_csv(f"docs/data/reddit.csv") + pl.scan_csv(f"docs/docs-res/data/reddit.csv") .with_columns(pl.col("name").str.to_uppercase()) .filter(pl.col("comment_karma") > 0) ) diff --git a/docs/src/python/user-guide/misc/arrow.py b/docs/docs/src/python/user-guide/misc/arrow.py similarity index 100% rename from docs/src/python/user-guide/misc/arrow.py rename to docs/docs/src/python/user-guide/misc/arrow.py diff --git a/docs/src/python/user-guide/misc/arrow_pycapsule.py b/docs/docs/src/python/user-guide/misc/arrow_pycapsule.py similarity index 100% rename from docs/src/python/user-guide/misc/arrow_pycapsule.py rename to docs/docs/src/python/user-guide/misc/arrow_pycapsule.py diff --git a/docs/src/python/user-guide/misc/multiprocess.py b/docs/docs/src/python/user-guide/misc/multiprocess.py similarity index 100% rename from docs/src/python/user-guide/misc/multiprocess.py rename to docs/docs/src/python/user-guide/misc/multiprocess.py diff --git a/docs/src/python/user-guide/misc/styling.py b/docs/docs/src/python/user-guide/misc/styling.py similarity index 99% rename from docs/src/python/user-guide/misc/styling.py rename to docs/docs/src/python/user-guide/misc/styling.py index 5b570e4f1e49..29976d465604 100644 --- a/docs/src/python/user-guide/misc/styling.py +++ b/docs/docs/src/python/user-guide/misc/styling.py @@ -2,7 +2,7 @@ import polars as pl import polars.selectors as cs -path = "docs/data/iris.csv" +path = "docs/docs-res/data/iris.csv" df = ( pl.scan_csv(path) diff --git a/docs/src/python/user-guide/misc/visualization.py b/docs/docs/src/python/user-guide/misc/visualization.py similarity index 79% rename from docs/src/python/user-guide/misc/visualization.py rename to docs/docs/src/python/user-guide/misc/visualization.py index cd256127f1dd..06d8c249b75c 100644 --- a/docs/src/python/user-guide/misc/visualization.py +++ b/docs/docs/src/python/user-guide/misc/visualization.py @@ -1,7 +1,7 @@ # --8<-- [start:dataframe] import polars as pl -path = "docs/data/iris.csv" +path = "docs/docs-res/data/iris.csv" df = pl.read_csv(path) print(df) @@ -28,8 +28,8 @@ by="species", width=650, ) -hvplot.save(plot, "docs/images/hvplot_scatter.html") -with open("docs/images/hvplot_scatter.html", "r") as f: +hvplot.save(plot, "docs/docs-res/images/hvplot_scatter.html") +with open("docs/docs-res/images/hvplot_scatter.html", "r") as f: chart_html = f.read() print(f"{chart_html}") # --8<-- [end:hvplot_make_plot] @@ -58,8 +58,8 @@ y=df["sepal_length"], c=df["species"].cast(pl.Categorical).to_physical(), ) -fig.savefig("docs/images/matplotlib_scatter.png") -with open("docs/images/matplotlib_scatter.png", "rb") as f: +fig.savefig("docs/docs-res/images/matplotlib_scatter.png") +with open("docs/docs-res/images/matplotlib_scatter.png", "rb") as f: png = base64.b64encode(f.read()).decode() print(f'') # --8<-- [end:matplotlib_make_plot] @@ -87,8 +87,8 @@ y="sepal_length", hue="species", ) -fig.savefig("docs/images/seaborn_scatter.png") -with open("docs/images/seaborn_scatter.png", "rb") as f: +fig.savefig("docs/docs-res/images/seaborn_scatter.png") +with open("docs/docs-res/images/seaborn_scatter.png", "rb") as f: png = base64.b64encode(f.read()).decode() print(f'') # --8<-- [end:seaborn_make_plot] @@ -118,9 +118,9 @@ width=650, ) fig.write_html( - "docs/images/plotly_scatter.html", full_html=False, include_plotlyjs="cdn" + "docs/docs-res/images/plotly_scatter.html", full_html=False, include_plotlyjs="cdn" ) -with open("docs/images/plotly_scatter.html", "r") as f: +with open("docs/docs-res/images/plotly_scatter.html", "r") as f: chart_html = f.read() print(f"{chart_html}") # --8<-- [end:plotly_make_plot] @@ -149,8 +149,8 @@ .properties(width=500) .configure_scale(zero=False) ) -chart.save("docs/images/altair_scatter.html") -with open("docs/images/altair_scatter.html", "r") as f: +chart.save("docs/docs-res/images/altair_scatter.html") +with open("docs/docs-res/images/altair_scatter.html", "r") as f: chart_html = f.read() print(f"{chart_html}") # --8<-- [end:altair_make_plot] diff --git a/docs/src/python/user-guide/sql/create.py b/docs/docs/src/python/user-guide/sql/create.py similarity index 100% rename from docs/src/python/user-guide/sql/create.py rename to docs/docs/src/python/user-guide/sql/create.py diff --git a/docs/src/python/user-guide/sql/cte.py b/docs/docs/src/python/user-guide/sql/cte.py similarity index 100% rename from docs/src/python/user-guide/sql/cte.py rename to docs/docs/src/python/user-guide/sql/cte.py diff --git a/docs/src/python/user-guide/sql/intro.py b/docs/docs/src/python/user-guide/sql/intro.py similarity index 85% rename from docs/src/python/user-guide/sql/intro.py rename to docs/docs/src/python/user-guide/sql/intro.py index d2f357046dcd..6c6c1a29b58f 100644 --- a/docs/src/python/user-guide/sql/intro.py +++ b/docs/docs/src/python/user-guide/sql/intro.py @@ -39,7 +39,7 @@ # --8<-- [end:execute] # --8<-- [start:prepare_multiple_sources] -with open("docs/data/products_categories.json", "w") as temp_file: +with open("docs/docs-res/data/products_categories.json", "w") as temp_file: json_data = """{"product_id": 1, "category": "Category 1"} {"product_id": 2, "category": "Category 1"} {"product_id": 3, "category": "Category 2"} @@ -48,7 +48,7 @@ temp_file.write(json_data) -with open("docs/data/products_masterdata.csv", "w") as temp_file: +with open("docs/docs-res/data/products_masterdata.csv", "w") as temp_file: csv_data = """product_id,product_name 1,Product A 2,Product B @@ -73,8 +73,8 @@ # sales_data is a Pandas DataFrame with schema {'product_id': Int64, 'sales': Int64} with pl.SQLContext( - products_masterdata=pl.scan_csv("docs/data/products_masterdata.csv"), - products_categories=pl.scan_ndjson("docs/data/products_categories.json"), + products_masterdata=pl.scan_csv("docs/docs-res/data/products_masterdata.csv"), + products_categories=pl.scan_ndjson("docs/docs-res/data/products_categories.json"), sales_data=pl.from_pandas(sales_data), eager=True, ) as ctx: @@ -95,6 +95,6 @@ # --8<-- [start:clean_multiple_sources] import os -os.remove("docs/data/products_categories.json") -os.remove("docs/data/products_masterdata.csv") +os.remove("docs/docs-res/data/products_categories.json") +os.remove("docs/docs-res/data/products_masterdata.csv") # --8<-- [end:clean_multiple_sources] diff --git a/docs/src/python/user-guide/sql/select.py b/docs/docs/src/python/user-guide/sql/select.py similarity index 97% rename from docs/src/python/user-guide/sql/select.py rename to docs/docs/src/python/user-guide/sql/select.py index 2422fc575f46..8653eb96922b 100644 --- a/docs/src/python/user-guide/sql/select.py +++ b/docs/docs/src/python/user-guide/sql/select.py @@ -99,7 +99,7 @@ result = ctx.execute( """ SELECT * - FROM read_csv('docs/data/iris.csv') + FROM read_csv('docs/docs-res/data/iris.csv') """ ) print(result) diff --git a/docs/src/python/user-guide/sql/show.py b/docs/docs/src/python/user-guide/sql/show.py similarity index 100% rename from docs/src/python/user-guide/sql/show.py rename to docs/docs/src/python/user-guide/sql/show.py diff --git a/docs/src/python/user-guide/transformations/concatenation.py b/docs/docs/src/python/user-guide/transformations/concatenation.py similarity index 100% rename from docs/src/python/user-guide/transformations/concatenation.py rename to docs/docs/src/python/user-guide/transformations/concatenation.py diff --git a/docs/src/python/user-guide/transformations/joins.py b/docs/docs/src/python/user-guide/transformations/joins.py similarity index 100% rename from docs/src/python/user-guide/transformations/joins.py rename to docs/docs/src/python/user-guide/transformations/joins.py diff --git a/docs/src/python/user-guide/transformations/pivot.py b/docs/docs/src/python/user-guide/transformations/pivot.py similarity index 100% rename from docs/src/python/user-guide/transformations/pivot.py rename to docs/docs/src/python/user-guide/transformations/pivot.py diff --git a/docs/src/python/user-guide/transformations/time-series/filter.py b/docs/docs/src/python/user-guide/transformations/time-series/filter.py similarity index 90% rename from docs/src/python/user-guide/transformations/time-series/filter.py rename to docs/docs/src/python/user-guide/transformations/time-series/filter.py index e720c9ae8ef5..140e54f7b65b 100644 --- a/docs/src/python/user-guide/transformations/time-series/filter.py +++ b/docs/docs/src/python/user-guide/transformations/time-series/filter.py @@ -2,7 +2,7 @@ import polars as pl from datetime import datetime -df = pl.read_csv("docs/data/apple_stock.csv", try_parse_dates=True) +df = pl.read_csv("docs/docs-res/data/apple_stock.csv", try_parse_dates=True) print(df) # --8<-- [end:df] diff --git a/docs/src/python/user-guide/transformations/time-series/parsing.py b/docs/docs/src/python/user-guide/transformations/time-series/parsing.py similarity index 84% rename from docs/src/python/user-guide/transformations/time-series/parsing.py rename to docs/docs/src/python/user-guide/transformations/time-series/parsing.py index 0a7a05842cd1..7301f6a1abaa 100644 --- a/docs/src/python/user-guide/transformations/time-series/parsing.py +++ b/docs/docs/src/python/user-guide/transformations/time-series/parsing.py @@ -4,13 +4,13 @@ # --8<-- [end:setup] # --8<-- [start:df] -df = pl.read_csv("docs/data/apple_stock.csv", try_parse_dates=True) +df = pl.read_csv("docs/docs-res/data/apple_stock.csv", try_parse_dates=True) print(df) # --8<-- [end:df] # --8<-- [start:cast] -df = pl.read_csv("docs/data/apple_stock.csv", try_parse_dates=False) +df = pl.read_csv("docs/docs-res/data/apple_stock.csv", try_parse_dates=False) df = df.with_columns(pl.col("Date").str.to_date("%Y-%m-%d")) print(df) diff --git a/docs/src/python/user-guide/transformations/time-series/resampling.py b/docs/docs/src/python/user-guide/transformations/time-series/resampling.py similarity index 100% rename from docs/src/python/user-guide/transformations/time-series/resampling.py rename to docs/docs/src/python/user-guide/transformations/time-series/resampling.py diff --git a/docs/src/python/user-guide/transformations/time-series/rolling.py b/docs/docs/src/python/user-guide/transformations/time-series/rolling.py similarity index 95% rename from docs/src/python/user-guide/transformations/time-series/rolling.py rename to docs/docs/src/python/user-guide/transformations/time-series/rolling.py index cf07a4347de9..3b25c71c38c1 100644 --- a/docs/src/python/user-guide/transformations/time-series/rolling.py +++ b/docs/docs/src/python/user-guide/transformations/time-series/rolling.py @@ -6,7 +6,7 @@ # --8<-- [end:setup] # --8<-- [start:df] -df = pl.read_csv("docs/data/apple_stock.csv", try_parse_dates=True) +df = pl.read_csv("docs/docs-res/data/apple_stock.csv", try_parse_dates=True) df = df.sort("Date") print(df) # --8<-- [end:df] diff --git a/docs/src/python/user-guide/transformations/time-series/timezones.py b/docs/docs/src/python/user-guide/transformations/time-series/timezones.py similarity index 100% rename from docs/src/python/user-guide/transformations/time-series/timezones.py rename to docs/docs/src/python/user-guide/transformations/time-series/timezones.py diff --git a/docs/src/python/user-guide/transformations/unpivot.py b/docs/docs/src/python/user-guide/transformations/unpivot.py similarity index 100% rename from docs/src/python/user-guide/transformations/unpivot.py rename to docs/docs/src/python/user-guide/transformations/unpivot.py diff --git a/docs/src/rust/Cargo.toml b/docs/docs/src/rust/Cargo.toml similarity index 100% rename from docs/src/rust/Cargo.toml rename to docs/docs/src/rust/Cargo.toml diff --git a/docs/src/rust/home/example.rs b/docs/docs/src/rust/home/example.rs similarity index 85% rename from docs/src/rust/home/example.rs rename to docs/docs/src/rust/home/example.rs index 6ede797f6758..f10d5eb7abfd 100644 --- a/docs/src/rust/home/example.rs +++ b/docs/docs/src/rust/home/example.rs @@ -2,7 +2,7 @@ fn main() -> Result<(), Box> { // --8<-- [start:example] use polars::prelude::*; - let q = LazyCsvReader::new("docs/data/iris.csv") + let q = LazyCsvReader::new("docs/docs-res/data/iris.csv") .with_has_header(true) .finish()? .filter(col("sepal_length").gt(lit(5))) diff --git a/docs/src/rust/user-guide/concepts/contexts.rs b/docs/docs/src/rust/user-guide/concepts/contexts.rs similarity index 100% rename from docs/src/rust/user-guide/concepts/contexts.rs rename to docs/docs/src/rust/user-guide/concepts/contexts.rs diff --git a/docs/src/rust/user-guide/concepts/data-structures.rs b/docs/docs/src/rust/user-guide/concepts/data-structures.rs similarity index 100% rename from docs/src/rust/user-guide/concepts/data-structures.rs rename to docs/docs/src/rust/user-guide/concepts/data-structures.rs diff --git a/docs/src/rust/user-guide/concepts/expressions.rs b/docs/docs/src/rust/user-guide/concepts/expressions.rs similarity index 100% rename from docs/src/rust/user-guide/concepts/expressions.rs rename to docs/docs/src/rust/user-guide/concepts/expressions.rs diff --git a/docs/src/rust/user-guide/concepts/lazy-vs-eager.rs b/docs/docs/src/rust/user-guide/concepts/lazy-vs-eager.rs similarity index 84% rename from docs/src/rust/user-guide/concepts/lazy-vs-eager.rs rename to docs/docs/src/rust/user-guide/concepts/lazy-vs-eager.rs index 12cac8afab26..f3153074bdc7 100644 --- a/docs/src/rust/user-guide/concepts/lazy-vs-eager.rs +++ b/docs/docs/src/rust/user-guide/concepts/lazy-vs-eager.rs @@ -3,7 +3,7 @@ use polars::prelude::*; fn main() -> Result<(), Box> { // --8<-- [start:eager] let df = CsvReadOptions::default() - .try_into_reader_with_file_path(Some("docs/data/iris.csv".into())) + .try_into_reader_with_file_path(Some("docs/docs-res/data/iris.csv".into())) .unwrap() .finish() .unwrap(); @@ -18,7 +18,7 @@ fn main() -> Result<(), Box> { // --8<-- [end:eager] // --8<-- [start:lazy] - let q = LazyCsvReader::new("docs/data/iris.csv") + let q = LazyCsvReader::new("docs/docs-res/data/iris.csv") .with_has_header(true) .finish()? .filter(col("sepal_length").gt(lit(5))) diff --git a/docs/src/rust/user-guide/concepts/streaming.rs b/docs/docs/src/rust/user-guide/concepts/streaming.rs similarity index 87% rename from docs/src/rust/user-guide/concepts/streaming.rs rename to docs/docs/src/rust/user-guide/concepts/streaming.rs index 9c9ddec631cf..a55cf3266385 100644 --- a/docs/src/rust/user-guide/concepts/streaming.rs +++ b/docs/docs/src/rust/user-guide/concepts/streaming.rs @@ -2,7 +2,7 @@ use polars::prelude::*; fn main() -> Result<(), Box> { // --8<-- [start:streaming] - let q1 = LazyCsvReader::new("docs/data/iris.csv") + let q1 = LazyCsvReader::new("docs/docs-res/data/iris.csv") .with_has_header(true) .finish()? .filter(col("sepal_length").gt(lit(5))) @@ -19,7 +19,7 @@ fn main() -> Result<(), Box> { // --8<-- [end:example] // --8<-- [start:example2] - let q2 = LazyCsvReader::new("docs/data/iris.csv") + let q2 = LazyCsvReader::new("docs/docs-res/data/iris.csv") .finish()? .with_columns(vec![col("sepal_length") .mean() diff --git a/docs/src/rust/user-guide/expressions/aggregation.rs b/docs/docs/src/rust/user-guide/expressions/aggregation.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/aggregation.rs rename to docs/docs/src/rust/user-guide/expressions/aggregation.rs diff --git a/docs/src/rust/user-guide/expressions/casting.rs b/docs/docs/src/rust/user-guide/expressions/casting.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/casting.rs rename to docs/docs/src/rust/user-guide/expressions/casting.rs diff --git a/docs/src/rust/user-guide/expressions/column-selections.rs b/docs/docs/src/rust/user-guide/expressions/column-selections.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/column-selections.rs rename to docs/docs/src/rust/user-guide/expressions/column-selections.rs diff --git a/docs/src/rust/user-guide/expressions/folds.rs b/docs/docs/src/rust/user-guide/expressions/folds.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/folds.rs rename to docs/docs/src/rust/user-guide/expressions/folds.rs diff --git a/docs/src/rust/user-guide/expressions/functions.rs b/docs/docs/src/rust/user-guide/expressions/functions.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/functions.rs rename to docs/docs/src/rust/user-guide/expressions/functions.rs diff --git a/docs/src/rust/user-guide/expressions/lists.rs b/docs/docs/src/rust/user-guide/expressions/lists.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/lists.rs rename to docs/docs/src/rust/user-guide/expressions/lists.rs diff --git a/docs/src/rust/user-guide/expressions/missing-data.rs b/docs/docs/src/rust/user-guide/expressions/missing-data.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/missing-data.rs rename to docs/docs/src/rust/user-guide/expressions/missing-data.rs diff --git a/docs/src/rust/user-guide/expressions/operators.rs b/docs/docs/src/rust/user-guide/expressions/operators.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/operators.rs rename to docs/docs/src/rust/user-guide/expressions/operators.rs diff --git a/docs/src/rust/user-guide/expressions/strings.rs b/docs/docs/src/rust/user-guide/expressions/strings.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/strings.rs rename to docs/docs/src/rust/user-guide/expressions/strings.rs diff --git a/docs/src/rust/user-guide/expressions/structs.rs b/docs/docs/src/rust/user-guide/expressions/structs.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/structs.rs rename to docs/docs/src/rust/user-guide/expressions/structs.rs diff --git a/docs/src/rust/user-guide/expressions/user-defined-functions.rs b/docs/docs/src/rust/user-guide/expressions/user-defined-functions.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/user-defined-functions.rs rename to docs/docs/src/rust/user-guide/expressions/user-defined-functions.rs diff --git a/docs/src/rust/user-guide/expressions/window.rs b/docs/docs/src/rust/user-guide/expressions/window.rs similarity index 100% rename from docs/src/rust/user-guide/expressions/window.rs rename to docs/docs/src/rust/user-guide/expressions/window.rs diff --git a/docs/src/rust/user-guide/getting-started/expressions.rs b/docs/docs/src/rust/user-guide/getting-started/expressions.rs similarity index 100% rename from docs/src/rust/user-guide/getting-started/expressions.rs rename to docs/docs/src/rust/user-guide/getting-started/expressions.rs diff --git a/docs/src/rust/user-guide/getting-started/joins.rs b/docs/docs/src/rust/user-guide/getting-started/joins.rs similarity index 100% rename from docs/src/rust/user-guide/getting-started/joins.rs rename to docs/docs/src/rust/user-guide/getting-started/joins.rs diff --git a/docs/src/rust/user-guide/getting-started/reading-writing.rs b/docs/docs/src/rust/user-guide/getting-started/reading-writing.rs similarity index 73% rename from docs/src/rust/user-guide/getting-started/reading-writing.rs rename to docs/docs/src/rust/user-guide/getting-started/reading-writing.rs index 8fde957c373f..d916f77300a5 100644 --- a/docs/src/rust/user-guide/getting-started/reading-writing.rs +++ b/docs/docs/src/rust/user-guide/getting-started/reading-writing.rs @@ -20,7 +20,7 @@ fn main() -> Result<(), Box> { // --8<-- [end:dataframe] // --8<-- [start:csv] - let mut file = File::create("docs/data/output.csv").expect("could not create file"); + let mut file = File::create("docs/docs-res/data/output.csv").expect("could not create file"); CsvWriter::new(&mut file) .include_header(true) .with_separator(b',') @@ -28,13 +28,13 @@ fn main() -> Result<(), Box> { let df_csv = CsvReadOptions::default() .with_infer_schema_length(None) .with_has_header(true) - .try_into_reader_with_file_path(Some("docs/data/output.csv".into()))? + .try_into_reader_with_file_path(Some("docs/docs-res/data/output.csv".into()))? .finish()?; println!("{}", df_csv); // --8<-- [end:csv] // --8<-- [start:csv2] - let mut file = File::create("docs/data/output.csv").expect("could not create file"); + let mut file = File::create("docs/docs-res/data/output.csv").expect("could not create file"); CsvWriter::new(&mut file) .include_header(true) .with_separator(b',') @@ -43,16 +43,16 @@ fn main() -> Result<(), Box> { .with_infer_schema_length(None) .with_has_header(true) .map_parse_options(|parse_options| parse_options.with_try_parse_dates(true)) - .try_into_reader_with_file_path(Some("docs/data/output.csv".into()))? + .try_into_reader_with_file_path(Some("docs/docs-res/data/output.csv".into()))? .finish()?; println!("{}", df_csv); // --8<-- [end:csv2] // --8<-- [start:json] - let mut file = File::create("docs/data/output.json").expect("could not create file"); + let mut file = File::create("docs/docs-res/data/output.json").expect("could not create file"); JsonWriter::new(&mut file).finish(&mut df)?; - let f = File::open("docs/data/output.json")?; + let f = File::open("docs/docs-res/data/output.json")?; let df_json = JsonReader::new(f) .with_json_format(JsonFormat::JsonLines) .finish()?; @@ -60,9 +60,9 @@ fn main() -> Result<(), Box> { // --8<-- [end:json] // --8<-- [start:parquet] - let mut file = File::create("docs/data/output.parquet").expect("could not create file"); + let mut file = File::create("docs/docs-res/data/output.parquet").expect("could not create file"); ParquetWriter::new(&mut file).finish(&mut df)?; - let f = File::open("docs/data/output.parquet")?; + let f = File::open("docs/docs-res/data/output.parquet")?; let df_parquet = ParquetReader::new(f).finish()?; println!("{}", df_parquet); // --8<-- [end:parquet] diff --git a/docs/src/rust/user-guide/io/cloud-storage.rs b/docs/docs/src/rust/user-guide/io/cloud-storage.rs similarity index 100% rename from docs/src/rust/user-guide/io/cloud-storage.rs rename to docs/docs/src/rust/user-guide/io/cloud-storage.rs diff --git a/docs/src/rust/user-guide/io/csv.rs b/docs/docs/src/rust/user-guide/io/csv.rs similarity index 80% rename from docs/src/rust/user-guide/io/csv.rs rename to docs/docs/src/rust/user-guide/io/csv.rs index dc8b556a7faa..ea5066a12ee3 100644 --- a/docs/src/rust/user-guide/io/csv.rs +++ b/docs/docs/src/rust/user-guide/io/csv.rs @@ -5,7 +5,7 @@ fn main() -> Result<(), Box> { use polars::prelude::*; let df = CsvReadOptions::default() - .try_into_reader_with_file_path(Some("docs/data/path.csv".into())) + .try_into_reader_with_file_path(Some("docs/docs-res/data/path.csv".into())) .unwrap() .finish() .unwrap(); @@ -19,7 +19,7 @@ fn main() -> Result<(), Box> { ) .unwrap(); - let mut file = std::fs::File::create("docs/data/path.csv").unwrap(); + let mut file = std::fs::File::create("docs/docs-res/data/path.csv").unwrap(); CsvWriter::new(&mut file).finish(&mut df).unwrap(); // --8<-- [end:write] diff --git a/docs/src/rust/user-guide/io/json.rs b/docs/docs/src/rust/user-guide/io/json.rs similarity index 75% rename from docs/src/rust/user-guide/io/json.rs rename to docs/docs/src/rust/user-guide/io/json.rs index cda7b6a8c83d..b8680b5766f4 100644 --- a/docs/src/rust/user-guide/io/json.rs +++ b/docs/docs/src/rust/user-guide/io/json.rs @@ -4,13 +4,13 @@ fn main() -> Result<(), Box> { // --8<-- [start:read] use polars::prelude::*; - let mut file = std::fs::File::open("docs/data/path.json").unwrap(); + let mut file = std::fs::File::open("docs/docs-res/data/path.json").unwrap(); let df = JsonReader::new(&mut file).finish().unwrap(); // --8<-- [end:read] println!("{}", df); // --8<-- [start:readnd] - let mut file = std::fs::File::open("docs/data/path.json").unwrap(); + let mut file = std::fs::File::open("docs/docs-res/data/path.json").unwrap(); let df = JsonLineReader::new(&mut file).finish().unwrap(); // --8<-- [end:readnd] println!("{}", df); @@ -22,7 +22,7 @@ fn main() -> Result<(), Box> { ) .unwrap(); - let mut file = std::fs::File::create("docs/data/path.json").unwrap(); + let mut file = std::fs::File::create("docs/docs-res/data/path.json").unwrap(); // json JsonWriter::new(&mut file) @@ -38,7 +38,7 @@ fn main() -> Result<(), Box> { // --8<-- [end:write] // --8<-- [start:scan] - let lf = LazyJsonLineReader::new("docs/data/path.json") + let lf = LazyJsonLineReader::new("docs/docs-res/data/path.json") .finish() .unwrap(); // --8<-- [end:scan] diff --git a/docs/src/rust/user-guide/io/parquet.rs b/docs/docs/src/rust/user-guide/io/parquet.rs similarity index 79% rename from docs/src/rust/user-guide/io/parquet.rs rename to docs/docs/src/rust/user-guide/io/parquet.rs index 3746d4e2b782..c8938d9941bc 100644 --- a/docs/src/rust/user-guide/io/parquet.rs +++ b/docs/docs/src/rust/user-guide/io/parquet.rs @@ -2,7 +2,7 @@ use polars::prelude::*; fn main() -> Result<(), Box> { // --8<-- [start:read] - let mut file = std::fs::File::open("docs/data/path.parquet").unwrap(); + let mut file = std::fs::File::open("docs/docs-res/data/path.parquet").unwrap(); let df = ParquetReader::new(&mut file).finish().unwrap(); // --8<-- [end:read] @@ -15,7 +15,7 @@ fn main() -> Result<(), Box> { ) .unwrap(); - let mut file = std::fs::File::create("docs/data/path.parquet").unwrap(); + let mut file = std::fs::File::create("docs/docs-res/data/path.parquet").unwrap(); ParquetWriter::new(&mut file).finish(&mut df).unwrap(); // --8<-- [end:write] diff --git a/docs/src/rust/user-guide/transformations/concatenation.rs b/docs/docs/src/rust/user-guide/transformations/concatenation.rs similarity index 100% rename from docs/src/rust/user-guide/transformations/concatenation.rs rename to docs/docs/src/rust/user-guide/transformations/concatenation.rs diff --git a/docs/src/rust/user-guide/transformations/joins.rs b/docs/docs/src/rust/user-guide/transformations/joins.rs similarity index 100% rename from docs/src/rust/user-guide/transformations/joins.rs rename to docs/docs/src/rust/user-guide/transformations/joins.rs diff --git a/docs/src/rust/user-guide/transformations/pivot.rs b/docs/docs/src/rust/user-guide/transformations/pivot.rs similarity index 100% rename from docs/src/rust/user-guide/transformations/pivot.rs rename to docs/docs/src/rust/user-guide/transformations/pivot.rs diff --git a/docs/src/rust/user-guide/transformations/time-series/filter.rs b/docs/docs/src/rust/user-guide/transformations/time-series/filter.rs similarity index 94% rename from docs/src/rust/user-guide/transformations/time-series/filter.rs rename to docs/docs/src/rust/user-guide/transformations/time-series/filter.rs index 14eab6d4f95a..5410761a501d 100644 --- a/docs/src/rust/user-guide/transformations/time-series/filter.rs +++ b/docs/docs/src/rust/user-guide/transformations/time-series/filter.rs @@ -8,7 +8,7 @@ fn main() -> Result<(), Box> { // --8<-- [start:df] let df = CsvReadOptions::default() .map_parse_options(|parse_options| parse_options.with_try_parse_dates(true)) - .try_into_reader_with_file_path(Some("docs/data/apple_stock.csv".into())) + .try_into_reader_with_file_path(Some("docs/docs-res/data/apple_stock.csv".into())) .unwrap() .finish() .unwrap(); diff --git a/docs/src/rust/user-guide/transformations/time-series/parsing.rs b/docs/docs/src/rust/user-guide/transformations/time-series/parsing.rs similarity index 91% rename from docs/src/rust/user-guide/transformations/time-series/parsing.rs rename to docs/docs/src/rust/user-guide/transformations/time-series/parsing.rs index b12c488d0108..79c5fe868344 100644 --- a/docs/src/rust/user-guide/transformations/time-series/parsing.rs +++ b/docs/docs/src/rust/user-guide/transformations/time-series/parsing.rs @@ -7,7 +7,7 @@ fn main() -> Result<(), Box> { // --8<-- [start:df] let df = CsvReadOptions::default() .map_parse_options(|parse_options| parse_options.with_try_parse_dates(true)) - .try_into_reader_with_file_path(Some("docs/data/apple_stock.csv".into())) + .try_into_reader_with_file_path(Some("docs/docs-res/data/apple_stock.csv".into())) .unwrap() .finish() .unwrap(); @@ -17,7 +17,7 @@ fn main() -> Result<(), Box> { // --8<-- [start:cast] let df = CsvReadOptions::default() .map_parse_options(|parse_options| parse_options.with_try_parse_dates(false)) - .try_into_reader_with_file_path(Some("docs/data/apple_stock.csv".into())) + .try_into_reader_with_file_path(Some("docs/docs-res/data/apple_stock.csv".into())) .unwrap() .finish() .unwrap(); diff --git a/docs/src/rust/user-guide/transformations/time-series/resampling.rs b/docs/docs/src/rust/user-guide/transformations/time-series/resampling.rs similarity index 100% rename from docs/src/rust/user-guide/transformations/time-series/resampling.rs rename to docs/docs/src/rust/user-guide/transformations/time-series/resampling.rs diff --git a/docs/src/rust/user-guide/transformations/time-series/rolling.rs b/docs/docs/src/rust/user-guide/transformations/time-series/rolling.rs similarity index 97% rename from docs/src/rust/user-guide/transformations/time-series/rolling.rs rename to docs/docs/src/rust/user-guide/transformations/time-series/rolling.rs index 4db0ea1be92a..54ccb1e24df4 100644 --- a/docs/src/rust/user-guide/transformations/time-series/rolling.rs +++ b/docs/docs/src/rust/user-guide/transformations/time-series/rolling.rs @@ -8,7 +8,7 @@ fn main() -> Result<(), Box> { // --8<-- [start:df] let df = CsvReadOptions::default() .map_parse_options(|parse_options| parse_options.with_try_parse_dates(true)) - .try_into_reader_with_file_path(Some("docs/data/apple_stock.csv".into())) + .try_into_reader_with_file_path(Some("docs/docs-res/data/apple_stock.csv".into())) .unwrap() .finish() .unwrap() diff --git a/docs/src/rust/user-guide/transformations/time-series/timezones.rs b/docs/docs/src/rust/user-guide/transformations/time-series/timezones.rs similarity index 100% rename from docs/src/rust/user-guide/transformations/time-series/timezones.rs rename to docs/docs/src/rust/user-guide/transformations/time-series/timezones.rs diff --git a/docs/src/rust/user-guide/transformations/unpivot.rs b/docs/docs/src/rust/user-guide/transformations/unpivot.rs similarity index 100% rename from docs/src/rust/user-guide/transformations/unpivot.rs rename to docs/docs/src/rust/user-guide/transformations/unpivot.rs diff --git a/docs/user-guide/concepts/contexts.md b/docs/docs/user-guide/concepts/contexts.md similarity index 100% rename from docs/user-guide/concepts/contexts.md rename to docs/docs/user-guide/concepts/contexts.md diff --git a/docs/user-guide/concepts/data-structures.md b/docs/docs/user-guide/concepts/data-structures.md similarity index 100% rename from docs/user-guide/concepts/data-structures.md rename to docs/docs/user-guide/concepts/data-structures.md diff --git a/docs/user-guide/concepts/data-types/categoricals.md b/docs/docs/user-guide/concepts/data-types/categoricals.md similarity index 100% rename from docs/user-guide/concepts/data-types/categoricals.md rename to docs/docs/user-guide/concepts/data-types/categoricals.md diff --git a/docs/user-guide/concepts/data-types/overview.md b/docs/docs/user-guide/concepts/data-types/overview.md similarity index 100% rename from docs/user-guide/concepts/data-types/overview.md rename to docs/docs/user-guide/concepts/data-types/overview.md diff --git a/docs/user-guide/concepts/expressions.md b/docs/docs/user-guide/concepts/expressions.md similarity index 100% rename from docs/user-guide/concepts/expressions.md rename to docs/docs/user-guide/concepts/expressions.md diff --git a/docs/user-guide/concepts/index.md b/docs/docs/user-guide/concepts/index.md similarity index 100% rename from docs/user-guide/concepts/index.md rename to docs/docs/user-guide/concepts/index.md diff --git a/docs/user-guide/concepts/lazy-vs-eager.md b/docs/docs/user-guide/concepts/lazy-vs-eager.md similarity index 100% rename from docs/user-guide/concepts/lazy-vs-eager.md rename to docs/docs/user-guide/concepts/lazy-vs-eager.md diff --git a/docs/user-guide/concepts/streaming.md b/docs/docs/user-guide/concepts/streaming.md similarity index 100% rename from docs/user-guide/concepts/streaming.md rename to docs/docs/user-guide/concepts/streaming.md diff --git a/docs/user-guide/ecosystem.md b/docs/docs/user-guide/ecosystem.md similarity index 98% rename from docs/user-guide/ecosystem.md rename to docs/docs/user-guide/ecosystem.md index 21f1dbc2ba60..f1b203705480 100644 --- a/docs/user-guide/ecosystem.md +++ b/docs/docs/user-guide/ecosystem.md @@ -58,7 +58,7 @@ Since [Scikit Learn](https://scikit-learn.org/stable/) 1.4, all transformers sup #### DuckDB -[DuckDB](https://duckdb.org) is a high-performance analytical database system. It is designed to be fast, reliable, portable, and easy to use. DuckDB provides a rich SQL dialect, with support far beyond basic SQL. DuckDB supports arbitrary and nested correlated subqueries, window functions, collations, complex types (arrays, structs), and more. Read about integration with Polars [on the DuckDB website](https://duckdb.org/docs/guides/python/polars). +[DuckDB](https://duckdb.org) is a high-performance analytical database system. It is designed to be fast, reliable, portable, and easy to use. DuckDB provides a rich SQL dialect, with support far beyond basic SQL. DuckDB supports arbitrary and nested correlated subqueries, window functions, collations, complex types (arrays, structs), and more. Read about integration with Polars [on the DuckDB website](https://duckdb.org/docs/docs/guides/python/polars). #### Great Tables diff --git a/docs/user-guide/expressions/aggregation.md b/docs/docs/user-guide/expressions/aggregation.md similarity index 100% rename from docs/user-guide/expressions/aggregation.md rename to docs/docs/user-guide/expressions/aggregation.md diff --git a/docs/user-guide/expressions/casting.md b/docs/docs/user-guide/expressions/casting.md similarity index 100% rename from docs/user-guide/expressions/casting.md rename to docs/docs/user-guide/expressions/casting.md diff --git a/docs/user-guide/expressions/column-selections.md b/docs/docs/user-guide/expressions/column-selections.md similarity index 100% rename from docs/user-guide/expressions/column-selections.md rename to docs/docs/user-guide/expressions/column-selections.md diff --git a/docs/user-guide/expressions/folds.md b/docs/docs/user-guide/expressions/folds.md similarity index 100% rename from docs/user-guide/expressions/folds.md rename to docs/docs/user-guide/expressions/folds.md diff --git a/docs/user-guide/expressions/functions.md b/docs/docs/user-guide/expressions/functions.md similarity index 100% rename from docs/user-guide/expressions/functions.md rename to docs/docs/user-guide/expressions/functions.md diff --git a/docs/user-guide/expressions/index.md b/docs/docs/user-guide/expressions/index.md similarity index 100% rename from docs/user-guide/expressions/index.md rename to docs/docs/user-guide/expressions/index.md diff --git a/docs/user-guide/expressions/lists.md b/docs/docs/user-guide/expressions/lists.md similarity index 100% rename from docs/user-guide/expressions/lists.md rename to docs/docs/user-guide/expressions/lists.md diff --git a/docs/user-guide/expressions/missing-data.md b/docs/docs/user-guide/expressions/missing-data.md similarity index 100% rename from docs/user-guide/expressions/missing-data.md rename to docs/docs/user-guide/expressions/missing-data.md diff --git a/docs/user-guide/expressions/numpy.md b/docs/docs/user-guide/expressions/numpy.md similarity index 100% rename from docs/user-guide/expressions/numpy.md rename to docs/docs/user-guide/expressions/numpy.md diff --git a/docs/user-guide/expressions/operators.md b/docs/docs/user-guide/expressions/operators.md similarity index 100% rename from docs/user-guide/expressions/operators.md rename to docs/docs/user-guide/expressions/operators.md diff --git a/docs/user-guide/expressions/plugins.md b/docs/docs/user-guide/expressions/plugins.md similarity index 100% rename from docs/user-guide/expressions/plugins.md rename to docs/docs/user-guide/expressions/plugins.md diff --git a/docs/user-guide/expressions/strings.md b/docs/docs/user-guide/expressions/strings.md similarity index 100% rename from docs/user-guide/expressions/strings.md rename to docs/docs/user-guide/expressions/strings.md diff --git a/docs/user-guide/expressions/structs.md b/docs/docs/user-guide/expressions/structs.md similarity index 100% rename from docs/user-guide/expressions/structs.md rename to docs/docs/user-guide/expressions/structs.md diff --git a/docs/user-guide/expressions/user-defined-functions.md b/docs/docs/user-guide/expressions/user-defined-functions.md similarity index 100% rename from docs/user-guide/expressions/user-defined-functions.md rename to docs/docs/user-guide/expressions/user-defined-functions.md diff --git a/docs/user-guide/expressions/window.md b/docs/docs/user-guide/expressions/window.md similarity index 100% rename from docs/user-guide/expressions/window.md rename to docs/docs/user-guide/expressions/window.md diff --git a/docs/user-guide/getting-started.md b/docs/docs/user-guide/getting-started.md similarity index 100% rename from docs/user-guide/getting-started.md rename to docs/docs/user-guide/getting-started.md diff --git a/docs/user-guide/gpu-support.md b/docs/docs/user-guide/gpu-support.md similarity index 100% rename from docs/user-guide/gpu-support.md rename to docs/docs/user-guide/gpu-support.md diff --git a/docs/user-guide/installation.md b/docs/docs/user-guide/installation.md similarity index 100% rename from docs/user-guide/installation.md rename to docs/docs/user-guide/installation.md diff --git a/docs/user-guide/io/bigquery.md b/docs/docs/user-guide/io/bigquery.md similarity index 100% rename from docs/user-guide/io/bigquery.md rename to docs/docs/user-guide/io/bigquery.md diff --git a/docs/user-guide/io/cloud-storage.md b/docs/docs/user-guide/io/cloud-storage.md similarity index 100% rename from docs/user-guide/io/cloud-storage.md rename to docs/docs/user-guide/io/cloud-storage.md diff --git a/docs/user-guide/io/csv.md b/docs/docs/user-guide/io/csv.md similarity index 100% rename from docs/user-guide/io/csv.md rename to docs/docs/user-guide/io/csv.md diff --git a/docs/user-guide/io/database.md b/docs/docs/user-guide/io/database.md similarity index 100% rename from docs/user-guide/io/database.md rename to docs/docs/user-guide/io/database.md diff --git a/docs/user-guide/io/excel.md b/docs/docs/user-guide/io/excel.md similarity index 100% rename from docs/user-guide/io/excel.md rename to docs/docs/user-guide/io/excel.md diff --git a/docs/user-guide/io/hive.md b/docs/docs/user-guide/io/hive.md similarity index 100% rename from docs/user-guide/io/hive.md rename to docs/docs/user-guide/io/hive.md diff --git a/docs/user-guide/io/hugging-face.md b/docs/docs/user-guide/io/hugging-face.md similarity index 76% rename from docs/user-guide/io/hugging-face.md rename to docs/docs/user-guide/io/hugging-face.md index 16f705ae75fb..5a563db893d8 100644 --- a/docs/user-guide/io/hugging-face.md +++ b/docs/docs/user-guide/io/hugging-face.md @@ -25,10 +25,10 @@ Example `hf://` paths: | Path | Path components | | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| hf://datasets/nameexhaustion/polars-docs/iris.csv | Bucket: datasets
Repository: nameexhaustion/polars-docs
Branch: main
Path: iris.csv
[Web URL](https://huggingface.co/datasets/nameexhaustion/polars-docs/tree/main/) | -| hf://datasets/nameexhaustion/polars-docs@foods/\*.csv | Bucket: datasets
Repository: nameexhaustion/polars-docs
Branch: foods
Path: \*.csv
[Web URL](https://huggingface.co/datasets/nameexhaustion/polars-docs/tree/foods/) | -| hf://datasets/nameexhaustion/polars-docs/hive_dates/ | Bucket: datasets
Repository: nameexhaustion/polars-docs
Branch: main
Path: hive_dates/
[Web URL](https://huggingface.co/datasets/nameexhaustion/polars-docs/tree/main/hive_dates/) | -| hf://spaces/nameexhaustion/polars-docs/orders.feather | Bucket: spaces
Repository: nameexhaustion/polars-docs
Branch: main
Path: orders.feather
[Web URL](https://huggingface.co/spaces/nameexhaustion/polars-docs/tree/main/) | +| hf://datasets/nameexhaustion/polars-docs/docs/iris.csv | Bucket: datasets
Repository: nameexhaustion/polars-docs
Branch: main
Path: iris.csv
[Web URL](https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/tree/main/) | +| hf://datasets/nameexhaustion/polars-docs@foods/\*.csv | Bucket: datasets
Repository: nameexhaustion/polars-docs
Branch: foods
Path: \*.csv
[Web URL](https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/tree/foods/) | +| hf://datasets/nameexhaustion/polars-docs/docs/hive_dates/ | Bucket: datasets
Repository: nameexhaustion/polars-docs
Branch: main
Path: hive_dates/
[Web URL](https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/tree/main/hive_dates/) | +| hf://spaces/nameexhaustion/polars-docs/docs/orders.feather | Bucket: spaces
Repository: nameexhaustion/polars-docs
Branch: main
Path: orders.feather
[Web URL](https://huggingface.co/spaces/nameexhaustion/polars-docs/docs/tree/main/) | ### Authentication @@ -51,7 +51,7 @@ A Hugging Face API key can be passed to Polars to access private locations using --8<-- "python/user-guide/io/hugging-face.py:scan_iris_repr" ``` -See this file at [https://huggingface.co/datasets/nameexhaustion/polars-docs/blob/main/iris.csv](https://huggingface.co/datasets/nameexhaustion/polars-docs/blob/main/iris.csv) +See this file at [https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/blob/main/iris.csv](https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/blob/main/iris.csv) #### NDJSON @@ -61,7 +61,7 @@ See this file at [https://huggingface.co/datasets/nameexhaustion/polars-docs/blo --8<-- "python/user-guide/io/hugging-face.py:scan_iris_repr" ``` -See this file at [https://huggingface.co/datasets/nameexhaustion/polars-docs/blob/main/iris.jsonl](https://huggingface.co/datasets/nameexhaustion/polars-docs/blob/main/iris.jsonl) +See this file at [https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/blob/main/iris.jsonl](https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/blob/main/iris.jsonl) #### Parquet @@ -71,7 +71,7 @@ See this file at [https://huggingface.co/datasets/nameexhaustion/polars-docs/blo --8<-- "python/user-guide/io/hugging-face.py:scan_parquet_hive_repr" ``` -See this folder at [https://huggingface.co/datasets/nameexhaustion/polars-docs/tree/main/hive_dates/](https://huggingface.co/datasets/nameexhaustion/polars-docs/tree/main/hive_dates/) +See this folder at [https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/tree/main/hive_dates/](https://huggingface.co/datasets/nameexhaustion/polars-docs/docs/tree/main/hive_dates/) #### IPC @@ -81,4 +81,4 @@ See this folder at [https://huggingface.co/datasets/nameexhaustion/polars-docs/t --8<-- "python/user-guide/io/hugging-face.py:scan_ipc_repr" ``` -See this file at [https://huggingface.co/spaces/nameexhaustion/polars-docs/blob/main/orders.feather](https://huggingface.co/spaces/nameexhaustion/polars-docs/blob/main/orders.feather) +See this file at [https://huggingface.co/spaces/nameexhaustion/polars-docs/docs/blob/main/orders.feather](https://huggingface.co/spaces/nameexhaustion/polars-docs/docs/blob/main/orders.feather) diff --git a/docs/user-guide/io/index.md b/docs/docs/user-guide/io/index.md similarity index 100% rename from docs/user-guide/io/index.md rename to docs/docs/user-guide/io/index.md diff --git a/docs/user-guide/io/json.md b/docs/docs/user-guide/io/json.md similarity index 100% rename from docs/user-guide/io/json.md rename to docs/docs/user-guide/io/json.md diff --git a/docs/user-guide/io/multiple.md b/docs/docs/user-guide/io/multiple.md similarity index 100% rename from docs/user-guide/io/multiple.md rename to docs/docs/user-guide/io/multiple.md diff --git a/docs/user-guide/io/parquet.md b/docs/docs/user-guide/io/parquet.md similarity index 100% rename from docs/user-guide/io/parquet.md rename to docs/docs/user-guide/io/parquet.md diff --git a/docs/user-guide/lazy/execution.md b/docs/docs/user-guide/lazy/execution.md similarity index 100% rename from docs/user-guide/lazy/execution.md rename to docs/docs/user-guide/lazy/execution.md diff --git a/docs/user-guide/lazy/gpu.md b/docs/docs/user-guide/lazy/gpu.md similarity index 100% rename from docs/user-guide/lazy/gpu.md rename to docs/docs/user-guide/lazy/gpu.md diff --git a/docs/user-guide/lazy/index.md b/docs/docs/user-guide/lazy/index.md similarity index 100% rename from docs/user-guide/lazy/index.md rename to docs/docs/user-guide/lazy/index.md diff --git a/docs/user-guide/lazy/optimizations.md b/docs/docs/user-guide/lazy/optimizations.md similarity index 100% rename from docs/user-guide/lazy/optimizations.md rename to docs/docs/user-guide/lazy/optimizations.md diff --git a/docs/user-guide/lazy/query-plan.md b/docs/docs/user-guide/lazy/query-plan.md similarity index 100% rename from docs/user-guide/lazy/query-plan.md rename to docs/docs/user-guide/lazy/query-plan.md diff --git a/docs/user-guide/lazy/schemas.md b/docs/docs/user-guide/lazy/schemas.md similarity index 100% rename from docs/user-guide/lazy/schemas.md rename to docs/docs/user-guide/lazy/schemas.md diff --git a/docs/docs/user-guide/lazy/streaming.md b/docs/docs/user-guide/lazy/streaming.md new file mode 100644 index 000000000000..b54a3e6f326f --- /dev/null +++ b/docs/docs/user-guide/lazy/streaming.md @@ -0,0 +1,3 @@ +# Streaming + +--8<-- "docs/docs/_build/snippets/under_construction.md" diff --git a/docs/user-guide/lazy/using.md b/docs/docs/user-guide/lazy/using.md similarity index 100% rename from docs/user-guide/lazy/using.md rename to docs/docs/user-guide/lazy/using.md diff --git a/docs/user-guide/migration/pandas.md b/docs/docs/user-guide/migration/pandas.md similarity index 100% rename from docs/user-guide/migration/pandas.md rename to docs/docs/user-guide/migration/pandas.md diff --git a/docs/user-guide/migration/spark.md b/docs/docs/user-guide/migration/spark.md similarity index 100% rename from docs/user-guide/migration/spark.md rename to docs/docs/user-guide/migration/spark.md diff --git a/docs/user-guide/misc/arrow.md b/docs/docs/user-guide/misc/arrow.md similarity index 100% rename from docs/user-guide/misc/arrow.md rename to docs/docs/user-guide/misc/arrow.md diff --git a/docs/user-guide/misc/comparison.md b/docs/docs/user-guide/misc/comparison.md similarity index 98% rename from docs/user-guide/misc/comparison.md rename to docs/docs/user-guide/misc/comparison.md index 3ae31fe0077d..79e6123e05c0 100644 --- a/docs/user-guide/misc/comparison.md +++ b/docs/docs/user-guide/misc/comparison.md @@ -32,4 +32,4 @@ The choice between Polars and Spark often depends on the scale of data and the s ### DuckDB -Polars and DuckDB have many similarities. However, DuckDB is focused on providing an in-process SQL OLAP database management system, while Polars is focused on providing a scalable `DataFrame` interface to many languages. The different front-ends lead to different optimisation strategies and different algorithm prioritisation. The interoperability between both is zero-copy. DuckDB offers a guide on [how to integrate with Polars](https://duckdb.org/docs/guides/python/polars.html). +Polars and DuckDB have many similarities. However, DuckDB is focused on providing an in-process SQL OLAP database management system, while Polars is focused on providing a scalable `DataFrame` interface to many languages. The different front-ends lead to different optimisation strategies and different algorithm prioritisation. The interoperability between both is zero-copy. DuckDB offers a guide on [how to integrate with Polars](https://duckdb.org/docs/docs/guides/python/polars.html). diff --git a/docs/user-guide/misc/multiprocessing.md b/docs/docs/user-guide/misc/multiprocessing.md similarity index 100% rename from docs/user-guide/misc/multiprocessing.md rename to docs/docs/user-guide/misc/multiprocessing.md diff --git a/docs/user-guide/misc/styling.md b/docs/docs/user-guide/misc/styling.md similarity index 100% rename from docs/user-guide/misc/styling.md rename to docs/docs/user-guide/misc/styling.md diff --git a/docs/user-guide/misc/visualization.md b/docs/docs/user-guide/misc/visualization.md similarity index 100% rename from docs/user-guide/misc/visualization.md rename to docs/docs/user-guide/misc/visualization.md diff --git a/docs/user-guide/sql/create.md b/docs/docs/user-guide/sql/create.md similarity index 100% rename from docs/user-guide/sql/create.md rename to docs/docs/user-guide/sql/create.md diff --git a/docs/user-guide/sql/cte.md b/docs/docs/user-guide/sql/cte.md similarity index 100% rename from docs/user-guide/sql/cte.md rename to docs/docs/user-guide/sql/cte.md diff --git a/docs/user-guide/sql/intro.md b/docs/docs/user-guide/sql/intro.md similarity index 100% rename from docs/user-guide/sql/intro.md rename to docs/docs/user-guide/sql/intro.md diff --git a/docs/user-guide/sql/select.md b/docs/docs/user-guide/sql/select.md similarity index 100% rename from docs/user-guide/sql/select.md rename to docs/docs/user-guide/sql/select.md diff --git a/docs/user-guide/sql/show.md b/docs/docs/user-guide/sql/show.md similarity index 100% rename from docs/user-guide/sql/show.md rename to docs/docs/user-guide/sql/show.md diff --git a/docs/user-guide/transformations/concatenation.md b/docs/docs/user-guide/transformations/concatenation.md similarity index 100% rename from docs/user-guide/transformations/concatenation.md rename to docs/docs/user-guide/transformations/concatenation.md diff --git a/docs/user-guide/transformations/index.md b/docs/docs/user-guide/transformations/index.md similarity index 100% rename from docs/user-guide/transformations/index.md rename to docs/docs/user-guide/transformations/index.md diff --git a/docs/user-guide/transformations/joins.md b/docs/docs/user-guide/transformations/joins.md similarity index 100% rename from docs/user-guide/transformations/joins.md rename to docs/docs/user-guide/transformations/joins.md diff --git a/docs/user-guide/transformations/pivot.md b/docs/docs/user-guide/transformations/pivot.md similarity index 100% rename from docs/user-guide/transformations/pivot.md rename to docs/docs/user-guide/transformations/pivot.md diff --git a/docs/user-guide/transformations/time-series/filter.md b/docs/docs/user-guide/transformations/time-series/filter.md similarity index 100% rename from docs/user-guide/transformations/time-series/filter.md rename to docs/docs/user-guide/transformations/time-series/filter.md diff --git a/docs/user-guide/transformations/time-series/parsing.md b/docs/docs/user-guide/transformations/time-series/parsing.md similarity index 100% rename from docs/user-guide/transformations/time-series/parsing.md rename to docs/docs/user-guide/transformations/time-series/parsing.md diff --git a/docs/user-guide/transformations/time-series/resampling.md b/docs/docs/user-guide/transformations/time-series/resampling.md similarity index 100% rename from docs/user-guide/transformations/time-series/resampling.md rename to docs/docs/user-guide/transformations/time-series/resampling.md diff --git a/docs/user-guide/transformations/time-series/rolling.md b/docs/docs/user-guide/transformations/time-series/rolling.md similarity index 100% rename from docs/user-guide/transformations/time-series/rolling.md rename to docs/docs/user-guide/transformations/time-series/rolling.md diff --git a/docs/user-guide/transformations/time-series/timezones.md b/docs/docs/user-guide/transformations/time-series/timezones.md similarity index 100% rename from docs/user-guide/transformations/time-series/timezones.md rename to docs/docs/user-guide/transformations/time-series/timezones.md diff --git a/docs/user-guide/transformations/unpivot.md b/docs/docs/user-guide/transformations/unpivot.md similarity index 100% rename from docs/user-guide/transformations/unpivot.md rename to docs/docs/user-guide/transformations/unpivot.md diff --git a/docs/images/.gitignore b/docs/images/.gitignore deleted file mode 100644 index 72e8ffc0db8a..000000000000 --- a/docs/images/.gitignore +++ /dev/null @@ -1 +0,0 @@ -* diff --git a/docs/user-guide/lazy/streaming.md b/docs/user-guide/lazy/streaming.md deleted file mode 100644 index 3f9d268443ca..000000000000 --- a/docs/user-guide/lazy/streaming.md +++ /dev/null @@ -1,3 +0,0 @@ -# Streaming - ---8<-- "docs/_build/snippets/under_construction.md" diff --git a/mkdocs.yml b/mkdocs.yml index e178036c9720..dabd7351201a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -6,6 +6,8 @@ site_url: https://docs.pola.rs/ repo_url: https://github.com/pola-rs/polars repo_name: pola-rs/polars +docs_dir: docs/docs + # Documentation layout nav: - User guide: @@ -110,7 +112,6 @@ nav: not_in_nav: | /_build/ - people.md validation: links: # Allow an absolute link to the features page for our code snippets @@ -120,7 +121,7 @@ validation: theme: name: material locale: en - custom_dir: docs/_build/overrides + custom_dir: docs/docs/_build/overrides palette: # Palette toggle for light mode - media: "(prefers-color-scheme: light)" @@ -169,13 +170,13 @@ markdown_extensions: - pymdownx.tabbed: alternate_style: true - pymdownx.snippets: - base_path: ['.','docs/src/'] + base_path: ['.','docs/docs/src/'] check_paths: true dedent_subsections: true - footnotes hooks: - - docs/_build/scripts/people.py + - docs/docs/_build/scripts/people.py plugins: - search: @@ -183,7 +184,7 @@ plugins: - markdown-exec - material-plausible - macros: - module_name: docs/_build/scripts/macro + module_name: docs/docs/_build/scripts/macro - redirects: redirect_maps: 'user-guide/index.md': 'index.md'