Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add non-equi joins to, and revise, joins docs page #19127

Merged
merged 11 commits into from
Oct 10, 2024

Conversation

rodrigogiraoserrao
Copy link
Collaborator

@rodrigogiraoserrao rodrigogiraoserrao commented Oct 7, 2024

Fixes #18749

@github-actions github-actions bot added documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars labels Oct 7, 2024
Copy link
Member

@ritchie46 ritchie46 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good overview. Nice read, I've left a few comments.

docs/assets/data/monopoly_props_groups.csv Outdated Show resolved Hide resolved
docs/assets/data/monopoly_props_prices.csv Outdated Show resolved Hide resolved
docs/source/user-guide/transformations/joins.md Outdated Show resolved Hide resolved
docs/source/user-guide/transformations/joins.md Outdated Show resolved Hide resolved
Without these two flags the Rust API documentation is being built and not including the related join variants.
The macro 'code_block' was updated so that we can specify Python-only or Rust-only API links that may be relevant when the two APIs differ.
We do this once as a macro so that downloading only happens when we start serving the docs instead of downloading the data every time the server reloads, which would happen if we were downloading the data in the Python snippets inside /src/python.
@rodrigogiraoserrao rodrigogiraoserrao marked this pull request as ready for review October 9, 2024 14:23
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.79%. Comparing base (9dada18) to head (95c6b99).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19127      +/-   ##
==========================================
+ Coverage   79.78%   79.79%   +0.01%     
==========================================
  Files        1531     1532       +1     
  Lines      208445   208500      +55     
  Branches     2913     2418     -495     
==========================================
+ Hits       166301   166380      +79     
+ Misses      41593    41573      -20     
+ Partials      551      547       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46
Copy link
Member

The benchmarks fail because of files missing in the docs. Can we run the prepare script beforehand?

I was downloading the data in a separate hook but there is a test that just runs all of the Python scripts in src/python and apparently it's not trivial to get the data download to trigger just once, when the appropriate Python script test is running, so it's just easier to move the data download to the script that actually uses it. We also add a comment to the Rust script to direct users to the Python script for the data location.
@rodrigogiraoserrao
Copy link
Collaborator Author

The benchmarks fail because of files missing in the docs. Can we run the prepare script beforehand?

I was looking at it already.
This was working fine for building the docs, not so fine for running the tests that just run the scripts included in the docs.
I couldn't get the prep_data.py hook to run just once before the tests in test_user_guide.py so I moved the data download to the actual Python script.

I don't love it but it works.

@ritchie46 ritchie46 merged commit 4344d21 into pola-rs:main Oct 10, 2024
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a non-equi joins and join_where to joins section of the user guide
2 participants