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

Use PR check instead of Merge Queue, and check rustdoc #1420

Merged
merged 4 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
on:
pull_request:
merge_group:
push:
branches:
- master

name: Continuous integration

Expand Down Expand Up @@ -86,7 +89,7 @@ jobs:
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}

cross_test:
if: ${{ github.event_name == 'merge_group' }}
#if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -110,7 +113,7 @@ jobs:
- run: ./scripts/cross-tests.sh "docs" ${{ matrix.rust }} ${{ matrix.target }}

cargo-careful:
if: ${{ github.event_name == 'merge_group' }}
#if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
name: cargo-careful
steps:
Expand All @@ -124,19 +127,21 @@ jobs:
- run: cargo careful test -Zcareful-sanitizer --features="$FEATURES"

docs:
if: ${{ github.event_name == 'merge_group' }}
#if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
name: docs/${{ matrix.rust }}
env:
RUSTDOCFLAGS: "-Dwarnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo doc
- run: cargo doc --no-deps --all-features

conclusion:
needs:
Expand Down
2 changes: 2 additions & 0 deletions crates/blas-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ edition = "2018"

[lib]
test = false
doc = false
doctest = false

[dependencies]
ndarray = { workspace = true, features = ["approx"] }
Expand Down
2 changes: 2 additions & 0 deletions crates/numeric-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ edition = "2018"

[lib]
test = false
doc = false
doctest = false

[dependencies]
ndarray = { workspace = true, features = ["approx"] }
Expand Down
2 changes: 2 additions & 0 deletions crates/serialization-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ edition = "2018"

[lib]
test = false
doc = false
doctest = false

[dependencies]
ndarray = { workspace = true, features = ["serde"] }
Expand Down
4 changes: 2 additions & 2 deletions src/dimension/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ pub trait DimMax<Other: Dimension>
}

/// Dimensions of the same type remain unchanged when co_broadcast.
/// So you can directly use D as the resulting type.
/// (Instead of <D as DimMax<D>>::BroadcastOutput)
/// So you can directly use `D` as the resulting type.
/// (Instead of `<D as DimMax<D>>::BroadcastOutput`)
impl<D: Dimension> DimMax<D> for D
{
type Output = D;
Expand Down
3 changes: 3 additions & 0 deletions src/doc/crate_feature_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
//! - Enable the ``threading`` feature in the matrixmultiply package
//!
//! [`parallel`]: crate::parallel

#[cfg(doc)]
use crate::parallel::par_azip;
4 changes: 3 additions & 1 deletion src/doc/ndarray_for_numpy_users/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@
//! convert `f32` array to `i32` array with ["saturating" conversion][sat_conv]; care needed because it can be a lossy conversion or result in non-finite values! See [the reference for information][as_typecast].
//!
//! </td></tr>
//! <table>
//! </table>
//!
//! [as_conv]: https://doc.rust-lang.org/rust-by-example/types/cast.html
//! [sat_conv]: https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html#fixing-unsoundness-in-casts
Expand All @@ -677,6 +677,8 @@
//! [.column()]: ArrayBase::column
//! [.column_mut()]: ArrayBase::column_mut
//! [concatenate()]: crate::concatenate()
//! [concatenate!]: crate::concatenate!
//! [stack!]: crate::stack!
//! [::default()]: ArrayBase::default
//! [.diag()]: ArrayBase::diag
//! [.dim()]: ArrayBase::dim
Expand Down
1 change: 1 addition & 0 deletions src/doc/ndarray_for_numpy_users/rk_step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
//! ```
//!
//! [`.scaled_add()`]: crate::ArrayBase::scaled_add
//! [`azip!()`]: crate::azip!
//!
//! ### SciPy license
//!
Expand Down
3 changes: 3 additions & 0 deletions src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
// except according to those terms.
use crate::dimension::slices_intersect;
use crate::error::{ErrorKind, ShapeError};
#[cfg(doc)]
use crate::s;
use crate::{ArrayViewMut, DimAdd, Dimension, Ix0, Ix1, Ix2, Ix3, Ix4, Ix5, Ix6, IxDyn};

#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
use std::convert::TryFrom;
Expand Down