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

add doc check #266

Merged
merged 3 commits into from
Dec 26, 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
8 changes: 3 additions & 5 deletions .github/workflows/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

set -eux -o pipefail

cargo fmt --check || (
echo
echo "Please run 'cargo fmt' to format the code."
exit 1
)
cargo fmt --check

cargo clippy -- -Dwarnings

Expand All @@ -15,5 +11,7 @@ pushd tests/data/
wget https://github.com/open-spaced-repetition/fsrs-optimizer-burn/files/12394182/collection.anki21.zip
unzip *.zip

RUSTDOCFLAGS="-D warnings" cargo doc --release

cargo install cargo-llvm-cov --locked
SKIP_TRAINING=1 cargo llvm-cov --release
2 changes: 1 addition & 1 deletion src/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct FSRSReview {
pub rating: u32,
/// The number of days that passed
/// # Warning
/// [`delta_t`] for item first(initial) review must be 0
/// `delta_t` for item first(initial) review must be 0
pub delta_t: u32,
}

Expand Down
2 changes: 1 addition & 1 deletion src/inference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn next_interval(stability: f32, desired_retention: f32) -> f32 {

impl<B: Backend> FSRS<B> {
/// Calculate the current memory state for a given card's history of reviews.
/// In the case of truncated reviews, [starting_state] can be set to the value of
/// In the case of truncated reviews, `starting_state` can be set to the value of
/// [FSRS::memory_state_from_sm2] for the first review (which should not be included
/// in FSRSItem). If not provided, the card starts as new.
/// Parameters must have been provided when calling FSRS::new().
Expand Down
Loading