diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6e6e9d..e1fbff2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,24 +8,14 @@ env: CARGO_TERM_COLOR: always jobs: - Publish: + Release: + name: Glicko2 Release runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v2 - - - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: cargo test --verbose - run: | export VERSION=${{ github.event.release.tag_name }} sed -i "s/0.0.0/$VERSION/g" Cargo.toml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 89ff235..8e3683a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,19 +11,11 @@ env: jobs: Test: + name: Glicko2 Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Lint - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true - - name: Test - uses: actions-rs/cargo@v1 - with: - command: test + - uses: actions/checkout@v4 + - run: rustup update stable && rustup default stable + - run: cargo clippy + - run: cargo test --verbose diff --git a/.gitignore b/.gitignore index dd24cc4..9ae0953 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ Cargo.lock # Dev environment .vscode/ +.DS_Store diff --git a/Cargo.toml b/Cargo.toml index 1e53649..cbfffc4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,16 +2,10 @@ name = "glicko_2" version = "0.0.0" authors = ["Christopher Sardegna "] -edition = "2021" +edition = "2024" description = "Glicko2 is an iterative algorithm for ranking opponents or teams in 1v1 games." readme = "readme.md" repository = "https://github.com/ReagentX/glicko2" -license-file = "LICENSE" +license = "GPL-3.0-or-later" keywords = ["rating", "gamedev", "glicko", "trueskill", "elo"] categories = ["algorithms", "game-development", "mathematics"] - -[profile.release] -# Remove symbols from release -strip = true -# Perform Link Time Optimization -lto = true diff --git a/src/glicko2/tuning.rs b/src/glicko2/tuning.rs index 6445d56..53f0030 100644 --- a/src/glicko2/tuning.rs +++ b/src/glicko2/tuning.rs @@ -5,7 +5,7 @@ Tuning parameters used for rating and algorithm calculations use crate::constants; /// Container for algorithm tuning parameters. More details available in the readme. -/// +/// /// - `mu`: Default mean rating /// - `phi`: Default confidence interval size /// - `sigma`: Default Performance volatility @@ -19,15 +19,14 @@ pub struct Tuning { } impl Tuning { - #[allow(clippy::too_many_arguments)] /// Create custom tuning parameters for the Glicko2 algorithm. /// The default option uses the values provided by the paper. - /// + /// /// # Example - /// + /// /// ``` /// use glicko_2::Tuning; - /// + /// /// let default_tuning = Tuning::default(); /// let custom_tuning = Tuning::new(1200.0, 200.0, 0.05, 0.6); /// ```