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

Improved stack! implementation, tests #1375

Merged
merged 38 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7ca1540
Add macro for concatenating matrices
birktj Feb 15, 2022
1a3954d
Replace DimUnify with DimEq::representative
birktj Feb 22, 2022
b05aaf7
Add some simple cat macro output generation tests
birktj Mar 3, 2022
1e7ef47
Fix formatting in cat macro code
birktj Feb 2, 2023
78698d3
Add random prefix to cat macro output
birktj Feb 2, 2023
61fd5c7
Add simple quote_spanned for cat macro
birktj Feb 2, 2023
30c3ba6
Use `generic_view_mut` in cat macro
birktj Feb 2, 2023
db034cc
Fix clippy lints in cat macro
birktj Feb 2, 2023
bb1b307
Clean up documentation for cat macro
birktj Feb 2, 2023
2fabc37
Remove identity literal from cat macro
birktj Apr 22, 2023
2b51b98
Allow references in input to cat macro
birktj Apr 22, 2023
cb4544f
Rename cat macro to stack
birktj Apr 22, 2023
47bd392
Add more stack macro tests
birktj Apr 22, 2023
b6a88cf
Add comment to explain reason for prefix in stack! macro
Andlon Mar 18, 2024
611cc84
Refactor matrix!, stack! macros into separate modules
Andlon Mar 19, 2024
a9f23fe
Take all blocks by reference in stack! macro
Andlon Mar 20, 2024
bbfa71b
Make empty stack![] invocation well-defined
Andlon Mar 20, 2024
bea2776
Fix stack! macro incorrect reference to data
Andlon Mar 25, 2024
a5531d0
More extensive tests for stack! macro
Andlon Mar 26, 2024
5c735aa
Move nalgebra-macros tests to nalgebra tests
Andlon Mar 29, 2024
88d60a5
Fix stack! code generation tests
Andlon Mar 29, 2024
20bed13
Add back nalgebra as dev-dependency of nalgebra-macros
Andlon Mar 29, 2024
30a183b
Fix accidental wrong matrix! macro references in docs
Andlon Mar 29, 2024
10ff56c
Rewrite stack! documentation for clarity
Andlon Mar 30, 2024
47568a0
Formatting
Andlon Mar 30, 2024
7ec2ffa
Skip formatting of macro, rustfmt messes it up
Andlon Mar 31, 2024
f2505e5
Rewrite stack! impl for improved clarity, Span behavior
Andlon Apr 1, 2024
f5ba6de
Use SameNumberOfRows/Columns instead of DimEq in stack! macro
Andlon Apr 1, 2024
b2ea326
Check that stack! panics at runtime for basic dimension mismatch
Andlon Apr 1, 2024
cff03ae
Add suggested edge cases from initial PR to tests
Andlon Apr 1, 2024
4229d4a
stack! impl: use fixed prefix everywhere
Andlon Apr 1, 2024
6f78813
nalgebra-macros: Remove clippy pedantic, fix clippy complaints
Andlon Apr 1, 2024
2d39770
Add stack! sanity tests for built-ins and Complex
Andlon Apr 3, 2024
cf59bc9
Fix formatting in test
Andlon May 1, 2024
5b05ed5
Improve readability of format_ident! calls in stack! impl
Andlon May 1, 2024
b6650da
fix trybuild tests
sebcrozet Jun 23, 2024
44f97dd
chore: run tests with a specific rust version
sebcrozet Jun 23, 2024
5e3391e
More trybuild fixes
sebcrozet Jun 23, 2024
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
73 changes: 41 additions & 32 deletions .github/workflows/nalgebra-ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@ jobs:
check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check formatting
run: cargo fmt -- --check
- uses: actions/checkout@v2
- name: Check formatting
run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install clippy
run: rustup component add clippy
- name: Run clippy
run: cargo clippy
- uses: actions/checkout@v2
- name: Install clippy
run: rustup component add clippy
- name: Run clippy
run: cargo clippy
build-nalgebra:
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -D warnings
# env:
# RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- name: Build --no-default-feature
run: cargo build --no-default-features;
- name: Build (default features)
run: cargo build;
- name: Build --features serde-serialize
run: cargo build --features serde-serialize
- name: Build nalgebra-lapack
run: cd nalgebra-lapack; cargo build;
- name: Build nalgebra-sparse --no-default-features
run: cd nalgebra-sparse; cargo build --no-default-features;
- name: Build nalgebra-sparse (default features)
run: cd nalgebra-sparse; cargo build;
- name: Build nalgebra-sparse --all-features
run: cd nalgebra-sparse; cargo build --all-features;
- uses: actions/checkout@v2
- name: Build --no-default-feature
run: cargo build --no-default-features;
- name: Build (default features)
run: cargo build;
- name: Build --features serde-serialize
run: cargo build --features serde-serialize
- name: Build nalgebra-lapack
run: cd nalgebra-lapack; cargo build;
- name: Build nalgebra-sparse --no-default-features
run: cd nalgebra-sparse; cargo build --no-default-features;
- name: Build nalgebra-sparse (default features)
run: cd nalgebra-sparse; cargo build;
- name: Build nalgebra-sparse --all-features
run: cd nalgebra-sparse; cargo build --all-features;
# Run this on it’s own job because it alone takes a lot of time.
# So it’s best to let it run in parallel to the other jobs.
build-nalgebra-all-features:
Expand All @@ -54,9 +54,18 @@ jobs:
- run: cargo build -p nalgebra-glm --all-features;
test-nalgebra:
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -D warnings
# env:
# RUSTFLAGS: -D warnings
steps:
# Tests are run with a specific version of the compiler to avoid
# trybuild errors when a new compiler version is out. This can be
# bumped as needed after running the tests with TRYBUILD=overwrite
# to re-generate the error reference.
- name: Select rustc version
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79.0
override: true
- uses: actions/checkout@v2
- name: test
run: cargo test --features arbitrary,rand,serde-serialize,sparse,debug,io,compare,libm,proptest-support,slow-tests,rkyv-safe-deser,rayon;
Expand Down Expand Up @@ -85,8 +94,8 @@ jobs:
run: cargo test -p nalgebra-macros
build-wasm:
runs-on: ubuntu-latest
# env:
# RUSTFLAGS: -D warnings
# env:
# RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v2
- run: rustup target add wasm32-unknown-unknown
Expand Down Expand Up @@ -121,6 +130,6 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate documentation
run: cargo doc
- uses: actions/checkout@v2
- name: Generate documentation
run: cargo doc
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ libm = ["simba/libm"]
libm-force = ["simba/libm_force"]
macros = ["nalgebra-macros"]


# Conversion
convert-mint = ["mint"]
convert-bytemuck = ["bytemuck"]
Expand Down Expand Up @@ -122,6 +121,11 @@ nalgebra = { path = ".", features = ["debug", "compare", "rand", "macros"] }
matrixcompare = "0.3.0"
itertools = "0.13"

# For macro testing
trybuild = "1.0.90"

cool_asserts = "2.0.3"

[workspace]
members = ["nalgebra-lapack", "nalgebra-glm", "nalgebra-sparse", "nalgebra-macros"]
resolver = "2"
Expand Down
3 changes: 1 addition & 2 deletions nalgebra-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ quote = "1.0"
proc-macro2 = "1.0"

[dev-dependencies]
nalgebra = { version = "0.32.0", path = ".." }
trybuild = "1.0.42"
nalgebra = { version = "0.32.1", path = ".." }
Loading
Loading