Skip to content
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
20 changes: 5 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Cargo.lock

# Dev environment
.vscode/
.DS_Store
10 changes: 2 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@
name = "glicko_2"
version = "0.0.0"
authors = ["Christopher Sardegna <[email protected]>"]
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
9 changes: 4 additions & 5 deletions src/glicko2/tuning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
/// ```
Expand Down