Skip to content

Commit

Permalink
Merge branch 'pola-rs:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco authored Jul 29, 2023
2 parents 4b3b86a + 868f6e5 commit ac3e5d6
Show file tree
Hide file tree
Showing 1,072 changed files with 9,812 additions and 4,298 deletions.
2 changes: 1 addition & 1 deletion .github/deploy_manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ls -la
rm py-polars/README.md
cp README.md py-polars/README.md
cd py-polars
rustup override set nightly-2023-06-23
rustup override set nightly-2023-07-27
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'

# first the default release
Expand Down
7 changes: 7 additions & 0 deletions .github/release-drafter-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ tag-prefix: py-

include-labels:
- python

version-resolver:
minor:
labels:
- breaking
- breaking python
default: patch
7 changes: 7 additions & 0 deletions .github/release-drafter-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ tag-prefix: rs-

include-labels:
- rust

version-resolver:
minor:
labels:
- breaking
- breaking rust
default: patch
31 changes: 19 additions & 12 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,47 @@ categories:
- internal

exclude-labels:
- skip-changelog
- skip changelog
- release

change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&'
replacers:
# Remove conventional commits from titles
- search: '/- (build|chore|depr|docs|feat|fix|perf|release)(\(.*\))?(\!)?\: /g'
- search: '/- (build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?(\!)?\: /g'
replace: '- '

version-resolver:
minor:
labels: breaking
default: patch

autolabeler:
- label: rust
title:
- '/^(build|chore|depr|docs|feat|fix|perf|release)(\(.*rust.*\))?\!?\: /'
# Example: feat(rust): ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*rust.*\))?\!?\: /'
- label: python
title:
- '/^(build|chore|depr|docs|feat|fix|perf|release)(\(.*python.*\))?\!?\: /'
# Example: feat(python): ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*python.*\))?\!?\: /'
- label: cli
title:
- '/^(build|chore|depr|docs|feat|fix|perf|release)\(.*cli.*\)\!?\: /' # CLI tag not in global scope
# Example: feat(cli): ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)\(.*cli.*\)\!?\: /' # CLI tag not in global scope
- label: breaking
title:
- '/^(build|chore|depr|docs|feat|fix|perf|release)(\(.*\))?\!\: /'
# Example: feat!: ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)(\(.*\))?\!\: /'
- label: breaking rust
title:
# Example: feat(rust!, python): ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)\(.*rust\!.*\)\: /'
- label: breaking python
title:
# Example: feat(python!): ...
- '/^(build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test)\(.*python\!.*\)\: /'
- label: build
title:
- '/^build/'
- label: internal
title:
- '/^chore/'
- '/^(chore|ci|refactor|test)/'
- label: deprecation
title:
- '/^depr/'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Benchmark
on:
pull_request:
paths:
- polars/**
- crates/**
- Cargo.toml
- py-polars/tests/benchmark/**
- .github/workflows/benchmark.yml
push:
branches:
- main
paths:
- polars/**
- crates/**
- Cargo.toml
- py-polars/tests/benchmark/**
- .github/workflows/benchmark.yml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ name: Build Rust documentation
on:
pull_request:
paths:
- polars/**
- crates/**
- .github/workflows/docs-rust.yml
push:
branches:
- main
paths:
- polars/**
- crates/**
- .github/workflows/docs-rust.yml

concurrency:
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Build Rust documentation
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings
working-directory: polars
working-directory: crates
run: make doctest

- name: Create redirect to Polars crate and set no-jekyll
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Lint Markdown and TOML
uses: dprint/[email protected]
- name: Spell Check with Typos
uses: crate-ci/typos@v1.15.9
uses: crate-ci/typos@v1.16.1
4 changes: 2 additions & 2 deletions .github/workflows/lint-py-polars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Lint py-polars crate
on:
pull_request:
paths:
- polars/**
- crates/**
- py-polars/src/**
- py-polars/Cargo.toml
- .github/workflows/lint-py-polars.yml
push:
branches:
- main
paths:
- polars/**
- crates/**
- py-polars/src/**
- py-polars/Cargo.toml
- .github/workflows/lint-py-polars.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:

- name: Lint Python
run: |
ruff --exit-non-zero-on-fix .
black --check .
blackdoc --check .
ruff . --exit-non-zero-on-fix
mypy:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint Rust
on:
pull_request:
paths:
- polars/**
- crates/**
- polars-cli/**
- examples/**
- Cargo.toml
Expand All @@ -12,7 +12,7 @@ on:
branches:
- main
paths:
- polars/**
- crates/**
- polars-cli/**
- examples/**
- Cargo.toml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- py-*

env:
RUST_TOOLCHAIN: nightly-2023-06-23
RUST_TOOLCHAIN: nightly-2023-07-27
PYTHON_VERSION: '3.8'
MATURIN_VERSION: '1.1.0'
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/test-bytecode-parser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test Bytecode Parser

on:
pull_request:
paths:
- py-polars/**
- .github/workflows/test-bytecode-parser.yml
push:
branches:
- main
paths:
- py-polars/**
- .github/workflows/test-bytecode-parser.yml

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
working-directory: py-polars

jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Create virtual environment
run: |
python -m venv .venv
echo "$GITHUB_WORKSPACE/py-polars/.venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: pip install numpy pytest

- name: Run tests
if: github.ref_name != 'main'
run: PYTHONPATH=polars/utils pytest tests/test_udfs.py
4 changes: 2 additions & 2 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on:
pull_request:
paths:
- py-polars/**
- polars/**
- crates/**
- .github/workflows/test-python.yml
push:
branches:
- main
paths:
- polars/**
- crates/**
- py-polars/**
- .github/workflows/test-python.yml

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: Test Rust
on:
pull_request:
paths:
- polars/**
- crates/**
- examples/**
- Cargo.toml
- .github/workflows/test-rust.yml
push:
branches:
- main
paths:
- polars/**
- crates/**
- examples/**
- Cargo.toml
- .github/workflows/test-rust.yml
Expand All @@ -27,7 +27,7 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Please describe the behavior you want and why, and provide examples of how Polar
### Picking an issue

Pick an issue by going through the [issue tracker](https://github.com/pola-rs/polars/issues) and finding an issue you would like to work on.
Feel free to pick any issue that is not already assigned.
Feel free to pick any issue with an [accepted](https://github.com/pola-rs/polars/issues?q=is%3Aopen+is%3Aissue+label%3Aaccepted) label that is not already assigned.
We use the [help wanted](https://github.com/pola-rs/polars/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label to indicate issues that are high on our wishlist.

If you are a first time contributor, you might want to look for issues labeled [good first issue](https://github.com/pola-rs/polars/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).
Expand Down Expand Up @@ -114,7 +114,7 @@ If this all runs correctly, you're ready to start contributing to the Polars cod

Create a new git branch from the `main` branch in your local repository, and start coding!

The Rust codebase is located in the `polars` directory, while the Python codebase is located in the `py-polars` directory.
The Rust code is located in the `crates` directory, while the Python codebase is located in the `py-polars` directory.
Both directories contain a `Makefile` with helpful commands. Most notably:

- `make test` to run the test suite (see the [test suite docs](/py-polars/tests/README.md) for more info)
Expand Down
11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[workspace]
resolver = "2"
members = [
"polars",
"crates/*",
"polars-cli",
"polars/polars-*",
"polars/polars-lazy/polars-*",
"contribution/*",
"examples/*",
]
exclude = [
Expand Down Expand Up @@ -32,11 +31,11 @@ strum_macros = "0.25"

[workspace.dependencies.arrow]
package = "arrow2"
# git = "https://github.com/jorgecarleitao/arrow2"
git = "https://github.com/jorgecarleitao/arrow2"
# git = "https://github.com/ritchie46/arrow2"
# rev = "2d2e7053f9a50810bfe9cecff25ab39089aef98e"
rev = "d5c78e7ba45fcebfbafd55a82ba2601ee3ea9617"
# path = "../arrow2"
# branch = "polars_2023-06-26"
# branch = "duration_json"
version = "0.17.2"
default-features = false
features = [
Expand Down
1 change: 1 addition & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ width_strat = "width_strat"
[default.extend-words]
iif = "iif"
'"r0ot"' = "r0ot"
wee = "wee"

[type.csv]
extend-glob = ["*.csv"]
Expand Down
14 changes: 14 additions & 0 deletions contribution/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contribution guideline examples

This subdirectory is intended to provide examples that guide contributors.

Naming conventions for variables:

```rust
let s: Series = ...
let ca: ChunkedArray = ...
let arr: ArrayRef = ...
let arr: PrimitiveArray = ...
let dtype: DataType = ...
let data_type: ArrowDataType = ...
```
10 changes: 10 additions & 0 deletions contribution/polars_ops_multiple_arguments/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "polars_ops_multiple_arguments"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
polars = { path = "../../crates/polars" }
polars-core = { path = "../../crates/polars-core" }
Loading

0 comments on commit ac3e5d6

Please sign in to comment.