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

chore(rust): fix docs build and add to CI #9904

Merged
merged 3 commits into from
Jul 15, 2023
Merged

chore(rust): fix docs build and add to CI #9904

merged 3 commits into from
Jul 15, 2023

Conversation

ritchie46
Copy link
Member

No description provided.

@github-actions github-actions bot added chore Maintenance work that does not impact the user rust Related to Rust Polars labels Jul 15, 2023
@stinodego
Copy link
Member

stinodego commented Jul 15, 2023

There's already a workflow for this - docs-rust.yml. But it only builds for the polars package. We could do all the docs checks there?

@ritchie46
Copy link
Member Author

There's already a workflow for this - docs-rust.yml

Doesn't that one build and publishes the docs?

This one tests them and fails CI if they fail. The release today failed building docs.

@stinodego
Copy link
Member

stinodego commented Jul 15, 2023

Doesn't that one build and publishes the docs?

It's a combination. The workflow builds the docs and fails if they cannot be built. Then if it's on the main branch, it publishes the result.

I guess we should add the full make doctest command there, instead of just the polars package.

@ritchie46
Copy link
Member Author

ritchie46 commented Jul 15, 2023

The point is, it should not fail on main, but on the PR. If a PR introduces a failing doctest, it should not be merged.

The docstest on main, doesn't have to run. At that point, we should be certain the docs are correct and just publish them.

@stinodego
Copy link
Member

The point is, it should not fail on main, but on the PR.

That's what it does. Just change this:

- name: Build Rust documentation
env:
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: cargo doc --features=docs-selection --package polars

To:

      - name: Build Rust documentation
        env:
          RUSTDOCFLAGS: --cfg docsrs -D warnings
        working-directory: polars
        run: make doctest

@ritchie46
Copy link
Member Author

Ok, will do!

@stinodego
Copy link
Member

You'll probably have to fix a few warnings though - mostly links that need to be proper hyperlinks, and a few feature gates. I was just looking at that locally 😄

@stinodego stinodego added internal An internal refactor or improvement and removed chore Maintenance work that does not impact the user labels Jul 15, 2023
@ritchie46 ritchie46 merged commit e51326f into main Jul 15, 2023
@ritchie46 ritchie46 deleted the doctest branch July 15, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants