We love your input! We want to make contributing to this project as easy and transparent as possible, whether it is:
- Reporting a bug.
- Discussing the current state of the code.
- Submitting a fix.
- Adding/proposing new features.
We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
- Fork the repo in your own GitHub account.
- Clone your own version of the repo locally, and
cd
into it. - Add the upstream remote with
git remote add upstream https://github.com/pola-rs/polars-book.git
- All branches should derive from
main
, you cangit checkout -b <YOUR-BRANCH>
and write away. - Commit/push to your own repo.
- Open a pull request as you would usually do, making sure the "base repository" is the upstream repo (
main
branch) and the "head repository" your own (<YOUR-BRANCH>
branch).
To update your own repo with code pushed on the upstream repo:
git checkout <BRANCH>
git pull upstream <BRANCH>
git push origin <BRANCH>
To build the documentation locally you will need to install the python libraries defined in the requirements.txt
file.
When these steps are done run mkdocs serve
to run the server. You can then view the docs at http://localhost:8000/
Some questions will not fit an issue. For those we have the Discord server.
When contributing any content your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that is a concern.
Do not hesitate to open a new issue. Great Issues tend to have:
- A quick summary and/or background.
- Steps to reproduce.
- What you expected would happen.
- What actually happens.
- Notes (possibly including why you think this might be happening, or stuff you tried that did not work).
The Python
code is checked and linted using black
. The recommended way is to run the black before committing:
$ black .
Each time the User Guide is built, all examples are run against the latest release of Polars
(as defined in the requirements.txt
file found at the root of this repo).
To document a new functionality:
Find the correct placement for the functionality. Is it an expression add it to the user-guide under the docs/user-guide/expressions
folder, it is related to input / output than put it under the docs/user-guide/IO
folder
The Markdown
file should roughly match the following structure:
- A clear short title (for example: "Interact with an AWS bucket").
- A one-ish-liner to introduce the code snippet.
- The code example itself under the corresponding folder (e.g. `docs/src/user-guide/expressions/...py), using the Snippets syntax.
- The output of the example, using markdown-exec
- A longer explanation if required.
- If applicable, provide both eager and lazy examples.