Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 642491f410 | |||
| c9f1a72dc8 | |||
| d4f712e826 | |||
| a8cd1bc89d | |||
| e5bd157c62 | |||
| 63e32758c4 | |||
| 4b2f5f5ba7 | |||
| 068f538643 | |||
| b1b647d1ea | |||
| fdd668da2b | |||
| 618c33486d | |||
| cc222094b6 | |||
| c881e301a4 | |||
| 56d7543627 | |||
| 8b7da57138 | |||
| eb6f8e9946 | |||
| 326007bfd0 | |||
| 1908302278 | |||
| b7793f64c7 | |||
| 3930184b32 | |||
| 994388be72 | |||
| 7a1f968b2b | |||
| 795f95dc0e |
@@ -9,22 +9,21 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
macos:
|
macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Python setup
|
- name: Python setup
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5.1.1
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: ${{ matrix.python_version }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
|
||||||
- name: Rust setup
|
- name: Rust setup
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
default: true
|
|
||||||
|
|
||||||
- name: Build wheels - x86_64
|
- name: Build wheels - x86_64
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
@@ -57,23 +56,20 @@ jobs:
|
|||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||||
target: [x64, x86]
|
target: [x64, x86]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Python setup
|
- name: Python setup
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5.1.1
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: ${{ matrix.python_version }}
|
||||||
architecture: ${{ matrix.target }}
|
architecture: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Rust setup
|
- name: Rust setup
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
default: true
|
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
@@ -96,15 +92,16 @@ jobs:
|
|||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [x86_64, i686]
|
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||||
|
target: [x86_64, i686, aarch64]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout project
|
- name: Checkout project
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Python setup
|
- name: Python setup
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5.1.1
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: ${{ matrix.python_version }}
|
||||||
architecture: x64
|
architecture: x64
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
@@ -112,7 +109,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
manylinux: auto
|
manylinux: auto
|
||||||
args: --release --out dist -i 3.9
|
args: --release --out dist -i ${{ matrix.python_version }}
|
||||||
|
|
||||||
- name: Install built wheel
|
- name: Install built wheel
|
||||||
if: matrix.target == 'x86_64'
|
if: matrix.target == 'x86_64'
|
||||||
@@ -129,6 +126,9 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python_version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
||||||
needs: [ macos, windows, linux ]
|
needs: [ macos, windows, linux ]
|
||||||
steps:
|
steps:
|
||||||
- name: Get artifacts
|
- name: Get artifacts
|
||||||
@@ -137,9 +137,9 @@ jobs:
|
|||||||
name: wheels
|
name: wheels
|
||||||
|
|
||||||
- name: Python setup
|
- name: Python setup
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v5.1.1
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
- name: Publish to PyPi
|
- name: Publish to PyPi
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
* @tsunyoku @cmyui
|
||||||
|
|
||||||
|
# Infrastructure
|
||||||
|
/.github/* @cmyui
|
||||||
|
/tf/* @cmyui
|
||||||
|
/chart/* @cmyui
|
||||||
Generated
+3
-3
@@ -4,12 +4,12 @@ version = 3
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "akatsuki-pp"
|
name = "akatsuki-pp"
|
||||||
version = "0.9.4"
|
version = "1.0.1"
|
||||||
source = "git+https://github.com/osuAkatsuki/akatsuki-pp-rs?rev=764da0dbf42ed80441acf99d070aaedabaed4b75#764da0dbf42ed80441acf99d070aaedabaed4b75"
|
source = "git+https://github.com/osuAkatsuki/akatsuki-pp-rs?rev=b96019f50aa7d09bcbde60016481a69df04315e4#b96019f50aa7d09bcbde60016481a69df04315e4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "akatsuki-pp-py"
|
name = "akatsuki-pp-py"
|
||||||
version = "0.9.4"
|
version = "1.0.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"akatsuki-pp",
|
"akatsuki-pp",
|
||||||
"pyo3",
|
"pyo3",
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "akatsuki-pp-py"
|
name = "akatsuki-pp-py"
|
||||||
version = "0.9.4"
|
version = "1.0.5"
|
||||||
description = "osu! difficulty and pp calculation for all modes"
|
description = "osu! difficulty and pp calculation for all modes"
|
||||||
authors = ["Max Ohn <ohn.m@hotmail.de>", "tsunyoku <tsunyoku@gmail.com>"]
|
authors = ["Max Ohn <ohn.m@hotmail.de>", "tsunyoku <tsunyoku@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@@ -12,7 +12,7 @@ crate-type = ["cdylib"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
pyo3 = { version = "0.17", features = ["extension-module", "macros"] }
|
pyo3 = { version = "0.17", features = ["extension-module", "macros"] }
|
||||||
akatsuki-pp = { git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "764da0dbf42ed80441acf99d070aaedabaed4b75" }
|
akatsuki-pp = { git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "b96019f50aa7d09bcbde60016481a69df04315e4" }
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "fat"
|
lto = "fat"
|
||||||
|
|||||||
+167
-1
@@ -1,3 +1,6 @@
|
|||||||
|
from typing import Optional
|
||||||
|
from typing import List
|
||||||
|
|
||||||
class Beatmap:
|
class Beatmap:
|
||||||
"""
|
"""
|
||||||
A class containing a parsed beatmap.
|
A class containing a parsed beatmap.
|
||||||
@@ -25,7 +28,8 @@ class Beatmap:
|
|||||||
Throws an exception if the map could not be parsed or an invalid kwarg was given
|
Throws an exception if the map could not be parsed or an invalid kwarg was given
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, **kwargs) -> None: ...
|
def __init__(self, **kwargs) -> None:
|
||||||
|
...
|
||||||
|
|
||||||
def set_ar(self, ar: float) -> None:
|
def set_ar(self, ar: float) -> None:
|
||||||
"""
|
"""
|
||||||
@@ -230,6 +234,45 @@ class BeatmapAttributes:
|
|||||||
Amount of spinners
|
Amount of spinners
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def ar(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def cs(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hp(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def od(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def ar_hit_window(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def od_hit_window(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def clock_rate(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def bpm(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def mode(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def version(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_circles(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_sliders(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_spinners(self) -> int: ...
|
||||||
|
|
||||||
|
|
||||||
class DifficultyAttributes:
|
class DifficultyAttributes:
|
||||||
"""
|
"""
|
||||||
@@ -283,6 +326,69 @@ class DifficultyAttributes:
|
|||||||
Amount of tiny droplets (C)
|
Amount of tiny droplets (C)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def mode(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def stars(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def max_combo(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def aim(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def speed(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def flashlight(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def slider_factor(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def speed_note_count(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def ar(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def od(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_circles(self) -> Optional[int]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_sliders(self) -> Optional[int]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_spinners(self) -> Optional[int]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def stamina(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def color(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def rhythm(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def peak(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def hit_window(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_fruits(self) -> Optional[int]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_droplets(self) -> Optional[int]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def n_tiny_droplets(self) -> Optional[int]: ...
|
||||||
|
|
||||||
|
|
||||||
class PerformanceAttributes:
|
class PerformanceAttributes:
|
||||||
"""
|
"""
|
||||||
@@ -312,6 +418,33 @@ class PerformanceAttributes:
|
|||||||
Difficulty based portion of the performance points (T, M)
|
Difficulty based portion of the performance points (T, M)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def mode(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pp(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def difficulty(self) -> DifficultyAttributes: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pp_acc(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pp_aim(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pp_speed(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pp_flashlight(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def effective_miss_count(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def pp_difficulty(self) -> Optional[float]: ...
|
||||||
|
|
||||||
|
|
||||||
class Strains:
|
class Strains:
|
||||||
"""
|
"""
|
||||||
@@ -344,3 +477,36 @@ class Strains:
|
|||||||
`'strains': Optional[List[float]]`
|
`'strains': Optional[List[float]]`
|
||||||
Strain values (M)
|
Strain values (M)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def mode(self) -> int: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def section_len(self) -> float: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def aim(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def aim_no_sliders(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def speed(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def flashlight(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def color(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def stamina(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def rhythm(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def movement(self) -> Optional[List[float]]: ...
|
||||||
|
|
||||||
|
@property
|
||||||
|
def strains(self) -> Optional[List[float]]: ...
|
||||||
|
|||||||
+5
-2
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "akatsuki-pp-py"
|
name = "akatsuki-pp-py"
|
||||||
version = "0.9.3"
|
version = "1.0.5"
|
||||||
requires-python = ">=3.7"
|
requires-python = ">=3.7"
|
||||||
description = "osu! difficulty and pp calculation for all modes"
|
description = "osu! difficulty and pp calculation for all modes"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
@@ -17,7 +17,10 @@ classifiers = [
|
|||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
"Programming Language :: Python :: Implementation :: PyPy",
|
||||||
]
|
]
|
||||||
packages = [{ include = "akatsuki_pp_py" }]
|
packages = [{ include = "akatsuki_pp_py" }]
|
||||||
authors = [{ name = "Max Ohn", email = "ohn.m@hotmail.de" }, { name = "tsunyoku", email = "tsunyoku@gmail.com" }]
|
authors = [
|
||||||
|
{ name = "Max Ohn", email = "ohn.m@hotmail.de" },
|
||||||
|
{ name = "tsunyoku", email = "tsunyoku@gmail.com" },
|
||||||
|
]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = { file = "LICENSE" }
|
license = { file = "LICENSE" }
|
||||||
repository = "https://github.com/osuAkatsuki/akatsuki-pp-py"
|
repository = "https://github.com/osuAkatsuki/akatsuki-pp-py"
|
||||||
|
|||||||
@@ -268,6 +268,8 @@ impl PyCalculator {
|
|||||||
n_spinners: attrs.difficulty.n_spinners,
|
n_spinners: attrs.difficulty.n_spinners,
|
||||||
stars: attrs.difficulty.stars,
|
stars: attrs.difficulty.stars,
|
||||||
max_combo: attrs.difficulty.max_combo,
|
max_combo: attrs.difficulty.max_combo,
|
||||||
|
aim_difficult_strain_count: 0.0,
|
||||||
|
speed_difficult_strain_count: 0.0,
|
||||||
},
|
},
|
||||||
pp: attrs.pp,
|
pp: attrs.pp,
|
||||||
pp_acc: attrs.pp_acc,
|
pp_acc: attrs.pp_acc,
|
||||||
|
|||||||
+7
-1
@@ -1,10 +1,10 @@
|
|||||||
use std::fmt::{Debug, Display, Formatter, Result as FmtResult};
|
use std::fmt::{Debug, Display, Formatter, Result as FmtResult};
|
||||||
|
|
||||||
use pyo3::{pyclass, pymethods};
|
|
||||||
use akatsuki_pp::{
|
use akatsuki_pp::{
|
||||||
catch::CatchDifficultyAttributes, mania::ManiaDifficultyAttributes,
|
catch::CatchDifficultyAttributes, mania::ManiaDifficultyAttributes,
|
||||||
osu::OsuDifficultyAttributes, taiko::TaikoDifficultyAttributes, DifficultyAttributes,
|
osu::OsuDifficultyAttributes, taiko::TaikoDifficultyAttributes, DifficultyAttributes,
|
||||||
};
|
};
|
||||||
|
use pyo3::{pyclass, pymethods};
|
||||||
|
|
||||||
#[pyclass(name = "DifficultyAttributes")]
|
#[pyclass(name = "DifficultyAttributes")]
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
@@ -91,6 +91,8 @@ impl Debug for BorrowedDifficultyAttributes<'_> {
|
|||||||
n_spinners,
|
n_spinners,
|
||||||
stars,
|
stars,
|
||||||
max_combo,
|
max_combo,
|
||||||
|
aim_difficult_strain_count,
|
||||||
|
speed_difficult_strain_count,
|
||||||
} = attrs;
|
} = attrs;
|
||||||
|
|
||||||
debug.field("mode", &0_u8);
|
debug.field("mode", &0_u8);
|
||||||
@@ -109,6 +111,8 @@ impl Debug for BorrowedDifficultyAttributes<'_> {
|
|||||||
n_spinners,
|
n_spinners,
|
||||||
stars,
|
stars,
|
||||||
max_combo,
|
max_combo,
|
||||||
|
aim_difficult_strain_count,
|
||||||
|
speed_difficult_strain_count,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Self::Taiko(attrs) => {
|
Self::Taiko(attrs) => {
|
||||||
@@ -230,4 +234,6 @@ getters! {
|
|||||||
n_tiny_droplets as usize: (Catch),
|
n_tiny_droplets as usize: (Catch),
|
||||||
ar as f64: (Osu, Catch),
|
ar as f64: (Osu, Catch),
|
||||||
hit_window as f64: (Taiko, Mania),
|
hit_window as f64: (Taiko, Mania),
|
||||||
|
aim_difficult_strain_count as f64: (Osu),
|
||||||
|
speed_difficult_strain_count as f64: (Osu),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user