46 Commits

Author SHA1 Message Date
tsunyoku 642491f410 attempt to fix macos builds with newer setup-python 2024-09-01 17:20:36 +01:00
Josh Smith c9f1a72dc8 Create CODEOWNERS 2024-06-15 19:30:50 -04:00
tsunyoku d4f712e826 bump akatsuki-pp 2024-06-01 00:43:47 +01:00
tsunyoku a8cd1bc89d bump akatsuki-pp 2024-05-31 23:07:09 +01:00
tsunyoku e5bd157c62 bump akatsuki-pp 2024-05-31 22:44:31 +01:00
James Wilson 63e32758c4 update pp crate (#3)
* update pp crate

* update crate version

* update pyproject version
2024-05-12 01:05:22 +01:00
tsunyoku 4b2f5f5ba7 update pp version 2024-04-14 14:46:28 +01:00
tsunyoku 068f538643 update pyproject file 2023-11-16 20:39:40 +00:00
tsunyoku b1b647d1ea hotfix 2023-11-16 20:24:37 +00:00
James fdd668da2b fix pyproject version 2023-11-16 19:49:39 +00:00
tsunyoku 618c33486d deploy new pp version 2023-11-16 19:36:20 +00:00
tsunyoku cc222094b6 v0.9.8: fix typing pt 2 2023-09-23 23:35:49 +01:00
tsunyoku c881e301a4 v0.9.7: typing fixes 2023-09-23 23:21:18 +01:00
tsunyoku 56d7543627 v0.9.6: improve python typing 2023-09-23 22:53:10 +01:00
James 8b7da57138 Merge pull request #2 from aeongdesu/main
ci: update action packages, support linux aarch64
2023-09-22 08:23:47 +01:00
aeongdesu eb6f8e9946 chore: update actions/setup-python package 2023-09-07 09:38:14 +09:00
aeongdesu 326007bfd0 chore: update action packages 2023-09-07 09:29:00 +09:00
aeongdesu 1908302278 feat: support linux aarch64 2023-09-07 09:22:11 +09:00
James b7793f64c7 feat: update project to 0.9.5 2023-05-14 11:50:20 +01:00
James 3930184b32 feat: include 3.7 and 3.8 in workflow 2023-05-14 11:49:35 +01:00
James 994388be72 feat: update rust project to 0.9.5 2023-05-14 11:48:33 +01:00
James 7a1f968b2b fix: stringify python versions 2023-05-14 11:42:27 +01:00
James 795f95dc0e feat: publish for multiple python versions 2023-05-14 11:40:30 +01:00
tsunyoku 7edcaeeb46 chore: upgrade akatsuki-pp 2023-03-24 21:10:34 +00:00
James a51f2ed966 fix: maturin 2023-02-22 19:12:37 +00:00
James 8f06a746d4 fix: workflow? 2023-02-22 19:10:35 +00:00
James cd344efa9e chore: update pp pkg 2023-01-11 20:08:41 +00:00
James abd33445a4 feat: update akatsuki-pp version 2023-01-09 22:37:06 +00:00
osu!Akatsuki Developer 31ecea34db fix: remove nightly requirement 2022-12-28 00:05:14 +00:00
osu!Akatsuki Developer 5611e888c8 fix: compilation errors 2022-12-27 23:36:28 +00:00
James 43ecf83c15 chore: update README 2022-12-27 23:30:39 +00:00
osu!Akatsuki Developer 74f780897e feat: support osu_2019 for rx pp 2022-12-27 23:27:59 +00:00
James 48390a9e16 Merge pull request #1 from osuAkatsuki/tsunyoku-patch-1
fix: redo imports
2022-12-27 22:49:07 +00:00
James 1b380bc5e8 feat: update publish workflow 2022-12-27 22:48:34 +00:00
James 6abd8da18c feat: fix metadata on pyproject 2022-12-27 22:47:16 +00:00
James be900e54c8 feat: rename pyi file 2022-12-27 22:40:13 +00:00
James fa19a9758c chore: remove lock file 2022-12-27 22:39:42 +00:00
James 470267e4c1 feat: update strain imports 2022-12-27 22:39:07 +00:00
James 15a9574f3d feat: update perf attr imports 2022-12-27 22:38:44 +00:00
James f3c4ea9cb8 feat: update map attr imports 2022-12-27 22:38:18 +00:00
James c6506c7f0b feat: update error imports 2022-12-27 22:37:51 +00:00
James d72b6ecaa4 feat: update diff attr imports 2022-12-27 22:37:23 +00:00
James e40da055b2 feat: update calculator imports 2022-12-27 22:36:47 +00:00
James 13eb39c6fa feat: begin redoing imports 2022-12-27 22:36:05 +00:00
James 238877a632 feat: rename rust lib 2022-12-27 22:35:33 +00:00
James 07121d4779 chore: update metadata 2022-12-27 22:35:04 +00:00
15 changed files with 393 additions and 134 deletions
+39 -39
View File
@@ -9,43 +9,42 @@ 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@v2 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: messense/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
target: x86_64 target: x86_64
args: --release --out dist args: --release --out dist --sdist
- name: Install built wheel - x86_64 - name: Install built wheel - x86_64
run: | run: |
pip install rosu_pp_py --no-index --find-links dist --force-reinstall pip install akatsuki_pp_py --no-index --find-links dist --force-reinstall
python -c "import rosu_pp_py" python -c "import akatsuki_pp_py"
- name: Build wheels - universal2 - name: Build wheels - universal2
uses: messense/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
args: --release --universal2 --out dist --no-sdist args: --release --universal2 --out dist
- name: Install built wheel - universal2 - name: Install built wheel - universal2
run: | run: |
pip install rosu_pp_py --no-index --find-links dist --force-reinstall pip install akatsuki_pp_py --no-index --find-links dist --force-reinstall
python -c "import rosu_pp_py" python -c "import akatsuki_pp_py"
- name: Upload wheels - name: Upload wheels
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -57,34 +56,31 @@ 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@v2 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: messense/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}
args: --release --out dist --no-sdist args: --release --out dist
- name: Install built wheel - name: Install built wheel
run: | run: |
pip install rosu_pp_py --no-index --find-links dist --force-reinstall pip install akatsuki_pp_py --no-index --find-links dist --force-reinstall
python -c "import rosu_pp_py" python -c "import akatsuki_pp_py"
- name: Upload wheels - name: Upload wheels
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -93,32 +89,33 @@ jobs:
path: dist path: dist
linux: linux:
runs-on: ubuntu-latest 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@v2 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
uses: messense/maturin-action@v1 uses: PyO3/maturin-action@v1
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}
manylinux: auto manylinux: auto
args: --release --out dist --no-sdist 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'
run: | run: |
pip install rosu_pp_py --no-index --find-links dist --force-reinstall pip install akatsuki_pp_py --no-index --find-links dist --force-reinstall
python -c "import rosu_pp_py" python -c "import akatsuki_pp_py"
- name: Upload wheels - name: Upload wheels
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -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:
+6
View File
@@ -0,0 +1,6 @@
* @tsunyoku @cmyui
# Infrastructure
/.github/* @cmyui
/tf/* @cmyui
/chart/* @cmyui
Generated
+76 -63
View File
@@ -2,6 +2,19 @@
# It is not intended for manual editing. # It is not intended for manual editing.
version = 3 version = 3
[[package]]
name = "akatsuki-pp"
version = "1.0.1"
source = "git+https://github.com/osuAkatsuki/akatsuki-pp-rs?rev=b96019f50aa7d09bcbde60016481a69df04315e4#b96019f50aa7d09bcbde60016481a69df04315e4"
[[package]]
name = "akatsuki-pp-py"
version = "1.0.5"
dependencies = [
"akatsuki-pp",
"pyo3",
]
[[package]] [[package]]
name = "autocfg" name = "autocfg"
version = "1.1.0" version = "1.1.0"
@@ -22,21 +35,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "indoc" name = "indoc"
version = "1.0.6" version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05a0bd019339e5d968b37855180087b7b9d512c5046fbd244cf8c95687927d6e" checksum = "da2d6f23ffea9d7e76c53eee25dfb67bcd8fde7f1198b0855350698c9f07c780"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.126" version = "0.2.139"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
version = "0.4.7" version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"scopeguard", "scopeguard",
@@ -53,9 +66,9 @@ dependencies = [
[[package]] [[package]]
name = "once_cell" name = "once_cell"
version = "1.13.0" version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
@@ -69,9 +82,9 @@ dependencies = [
[[package]] [[package]]
name = "parking_lot_core" name = "parking_lot_core"
version = "0.9.3" version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" checksum = "7ff9f3fef3968a3ec5945535ed654cb38ff72d7495a25619e2247fb15a2ed9ba"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
@@ -82,18 +95,18 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.40" version = "1.0.49"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
[[package]] [[package]]
name = "pyo3" name = "pyo3"
version = "0.17.2" version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "201b6887e5576bf2f945fe65172c1fcbf3fcf285b23e4d71eb171d9736e38d32" checksum = "268be0c73583c183f2b14052337465768c07726936a260f480f0857cb95ba543"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"indoc", "indoc",
@@ -108,9 +121,9 @@ dependencies = [
[[package]] [[package]]
name = "pyo3-build-config" name = "pyo3-build-config"
version = "0.17.2" version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf0708c9ed01692635cbf056e286008e5a2927ab1a5e48cdd3aeb1ba5a6fef47" checksum = "28fcd1e73f06ec85bf3280c48c67e731d8290ad3d730f8be9dc07946923005c8"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"target-lexicon", "target-lexicon",
@@ -118,9 +131,9 @@ dependencies = [
[[package]] [[package]]
name = "pyo3-ffi" name = "pyo3-ffi"
version = "0.17.2" version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90352dea4f486932b72ddf776264d293f85b79a1d214de1d023927b41461132d" checksum = "0f6cb136e222e49115b3c51c32792886defbfb0adead26a688142b346a0b9ffc"
dependencies = [ dependencies = [
"libc", "libc",
"pyo3-build-config", "pyo3-build-config",
@@ -128,9 +141,9 @@ dependencies = [
[[package]] [[package]]
name = "pyo3-macros" name = "pyo3-macros"
version = "0.17.2" version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7eb24b804a2d9e88bfcc480a5a6dd76f006c1e3edaf064e8250423336e2cd79d" checksum = "94144a1266e236b1c932682136dc35a9dee8d3589728f68130c7c3861ef96b28"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"pyo3-macros-backend", "pyo3-macros-backend",
@@ -140,9 +153,9 @@ dependencies = [
[[package]] [[package]]
name = "pyo3-macros-backend" name = "pyo3-macros-backend"
version = "0.17.2" version = "0.17.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f22bb49f6a7348c253d7ac67a6875f2dc65f36c2ae64a82c381d528972bea6d6" checksum = "c8df9be978a2d2f0cdebabb03206ed73b11314701a5bfe71b0d753b81997777f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -151,36 +164,22 @@ dependencies = [
[[package]] [[package]]
name = "quote" name = "quote"
version = "1.0.20" version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804" checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
] ]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.2.13" version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [ dependencies = [
"bitflags", "bitflags",
] ]
[[package]]
name = "rosu-pp"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70c4f12b757391bb233619b0bb267e424bc7395dcbfa1f85212f16b734784a07"
[[package]]
name = "rosu-pp-py"
version = "0.9.1"
dependencies = [
"pyo3",
"rosu-pp",
]
[[package]] [[package]]
name = "scopeguard" name = "scopeguard"
version = "1.1.0" version = "1.1.0"
@@ -189,15 +188,15 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]] [[package]]
name = "smallvec" name = "smallvec"
version = "1.9.0" version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.98" version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -206,61 +205,75 @@ dependencies = [
[[package]] [[package]]
name = "target-lexicon" name = "target-lexicon"
version = "0.12.4" version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1" checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.1" version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
[[package]] [[package]]
name = "unindent" name = "unindent"
version = "0.1.9" version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52fee519a3e570f7df377a06a1a7775cdbfb7aa460be7e08de2b1f0e69973a44" checksum = "e1766d682d402817b5ac4490b3c3002d91dfa0d22812f341609f97b08757359c"
[[package]] [[package]]
name = "windows-sys" name = "windows-sys"
version = "0.36.1" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
dependencies = [ dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc", "windows_aarch64_msvc",
"windows_i686_gnu", "windows_i686_gnu",
"windows_i686_msvc", "windows_i686_msvc",
"windows_x86_64_gnu", "windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc", "windows_x86_64_msvc",
] ]
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_gnullvm"
version = "0.36.1" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e"
[[package]]
name = "windows_aarch64_msvc"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.36.1" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.36.1" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.36.1" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.36.1" version = "0.42.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5"
+5 -5
View File
@@ -1,18 +1,18 @@
[package] [package]
name = "rosu-pp-py" name = "akatsuki-pp-py"
version = "0.9.1" 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>"] authors = ["Max Ohn <ohn.m@hotmail.de>", "tsunyoku <tsunyoku@gmail.com>"]
license = "MIT" license = "MIT"
edition = "2021" edition = "2021"
[lib] [lib]
name = "rosu_pp_py" name = "akatsuki_pp_py"
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
pyo3 = { version = "0.17", features = ["extension-module", "macros"] } pyo3 = { version = "0.17", features = ["extension-module", "macros"] }
rosu-pp = { version = "0.9.1" } akatsuki-pp = { git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "b96019f50aa7d09bcbde60016481a69df04315e4" }
[profile.release] [profile.release]
lto = "fat" lto = "fat"
+5 -6
View File
@@ -1,4 +1,4 @@
# rosu-pp-py # akatsuki-pp-py
Difficulty and performance calculation for all [osu!](https://osu.ppy.sh/) modes. Difficulty and performance calculation for all [osu!](https://osu.ppy.sh/) modes.
@@ -21,7 +21,7 @@ Additionally, the following error types are exposed:
- `ParseError`: Failed to parse a beatmap - `ParseError`: Failed to parse a beatmap
- `KwargsError`: Invalid kwargs were provided - `KwargsError`: Invalid kwargs were provided
## How to use rosu-pp-py ## How to use akatsuki-pp-py
1) The first step is to create a new `Beatmap` instance by providing appropriate kwargs. 1) The first step is to create a new `Beatmap` instance by providing appropriate kwargs.
Either of the kwargs `path`, `content`, or `bytes` **must** be given. The kwargs `ar`, `cs`, `hp`, and `od` are optional. Either of the kwargs `path`, `content`, or `bytes` **must** be given. The kwargs `ar`, `cs`, `hp`, and `od` are optional.
@@ -50,7 +50,7 @@ calc.set_mods(8 + 64) # HDDT
## Example ## Example
```py ```py
from rosu_pp_py import Beatmap, Calculator from akatsuki_pp_py import Beatmap, Calculator
map = Beatmap(path = "./maps/100.osu") map = Beatmap(path = "./maps/100.osu")
calc = Calculator(mods = 8) calc = Calculator(mods = 8)
@@ -87,15 +87,14 @@ Installing rosu-pp-py requires a [supported version of Python and Rust](https://
Once [Python](https://www.python.org/downloads/) and [Rust](https://www.rust-lang.org/learn/get-started) and ready to go, you can install the project with pip: Once [Python](https://www.python.org/downloads/) and [Rust](https://www.rust-lang.org/learn/get-started) and ready to go, you can install the project with pip:
```sh ```sh
$ pip install rosu-pp-py $ pip install akatsuki-pp-py
``` ```
or or
``` ```
$ pip install git+https://github.com/MaxOhn/rosu-pp-py $ pip install git+https://github.com/osuAkatsuki/akatsuki-pp-py
``` ```
## Learn More ## Learn More
- [rosu-pp documentation](https://docs.rs/rosu-pp/latest/rosu_pp/)
- [Rust documentation](https://www.rust-lang.org). - [Rust documentation](https://www.rust-lang.org).
- [PyO3 documentation](https://pyo3.rs/). - [PyO3 documentation](https://pyo3.rs/).
- [Python documentation](https://docs.python.org/3/). - [Python documentation](https://docs.python.org/3/).
+167 -1
View File
@@ -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]]: ...
+9 -6
View File
@@ -1,10 +1,10 @@
[build-system] [build-system]
requires = ["maturin>=0.12,<0.13", "setuptools", "setuptools-rust", "wheel"] requires = ["maturin>=0.14,<0.15"]
build-backend = "maturin" build-backend = "maturin"
[project] [project]
name = "rosu-pp-py" name = "akatsuki-pp-py"
version = "0.9.1" 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 = [
@@ -16,9 +16,12 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: PyPy",
] ]
packages = [{ include = "rosu_pp_py" }] packages = [{ include = "akatsuki_pp_py" }]
authors = [{ name = "Max Ohn", email = "ohn.m@hotmail.de" }] 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/MaxOhn/rosu-pp-py" repository = "https://github.com/osuAkatsuki/akatsuki-pp-py"
keywords = ["osu", "pp", "stars", "performance", "difficulty"] keywords = ["osu", "pp", "stars", "performance", "difficulty"]
+1 -1
View File
@@ -1,5 +1,5 @@
use pyo3::{exceptions::PyTypeError, pyclass, pymethods, types::PyDict, PyResult}; use pyo3::{exceptions::PyTypeError, pyclass, pymethods, types::PyDict, PyResult};
use rosu_pp::Beatmap; use akatsuki_pp::Beatmap;
use crate::error::{ErrorExt, KwargsError, ParseError}; use crate::error::{ErrorExt, KwargsError, ParseError};
+67 -1
View File
@@ -1,10 +1,14 @@
use akatsuki_pp::{
osu::{OsuDifficultyAttributes, OsuPerformanceAttributes},
osu_2019::OsuPP,
AnyPP, AnyStars, DifficultyAttributes, GameMode, Mods, PerformanceAttributes,
};
use pyo3::{ use pyo3::{
exceptions::{PyTypeError, PyValueError}, exceptions::{PyTypeError, PyValueError},
pyclass, pymethods, pyclass, pymethods,
types::PyDict, types::PyDict,
PyResult, PyResult,
}; };
use rosu_pp::{AnyPP, AnyStars, DifficultyAttributes, GameMode};
use crate::{ use crate::{
beatmap::PyBeatmap, diff_attrs::PyDifficultyAttributes, error::KwargsError, beatmap::PyBeatmap, diff_attrs::PyDifficultyAttributes, error::KwargsError,
@@ -227,7 +231,69 @@ impl PyCalculator {
Ok(calc.calculate().into()) Ok(calc.calculate().into())
} }
fn performance_2019(&self, map: &PyBeatmap) -> PyResult<PyPerformanceAttributes> {
let mut calc = OsuPP::new(&map.inner);
set_calc! { calc, self:
mods,
combo,
n300,
n100,
n50,
passed_objects,
};
if let Some(n_misses) = self.n_misses {
calc = calc.misses(n_misses);
}
if let Some(acc) = self.acc {
calc = calc.accuracy(acc as f32);
}
let attrs = calc.calculate();
let new_attrs = OsuPerformanceAttributes {
difficulty: OsuDifficultyAttributes {
aim: attrs.difficulty.aim_strain,
speed: attrs.difficulty.speed_strain,
flashlight: 0.0,
slider_factor: 0.0,
speed_note_count: 0.0,
ar: attrs.difficulty.ar,
od: attrs.difficulty.od,
hp: attrs.difficulty.hp,
n_circles: attrs.difficulty.n_circles,
n_sliders: attrs.difficulty.n_sliders,
n_spinners: attrs.difficulty.n_spinners,
stars: attrs.difficulty.stars,
max_combo: attrs.difficulty.max_combo,
aim_difficult_strain_count: 0.0,
speed_difficult_strain_count: 0.0,
},
pp: attrs.pp,
pp_acc: attrs.pp_acc,
pp_aim: attrs.pp_aim,
pp_flashlight: attrs.pp_flashlight,
pp_speed: attrs.pp_speed,
effective_miss_count: attrs.effective_miss_count,
};
Ok(PerformanceAttributes::Osu(new_attrs).into())
}
fn performance(&self, map: &PyBeatmap) -> PyResult<PyPerformanceAttributes> { fn performance(&self, map: &PyBeatmap) -> PyResult<PyPerformanceAttributes> {
// criteria:
// - is relax
// - is osu!standard
// or mode is not specified and map is osu!standard, as that will be the inferred mode
if (self.mods.is_some() && self.mods.unwrap().rx())
&& ((self.mode.is_none() && map.inner.mode == GameMode::Osu)
|| self.mode == Some(GameMode::Osu))
{
return self.performance_2019(map);
}
let mut calc = AnyPP::new(&map.inner); let mut calc = AnyPP::new(&map.inner);
set_calc! { calc, self: set_calc! { calc, self:
+8 -2
View File
@@ -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 rosu_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),
} }
+2 -2
View File
@@ -2,8 +2,8 @@ use std::{error::Error, fmt::Write};
use pyo3::{create_exception, exceptions::PyException}; use pyo3::{create_exception, exceptions::PyException};
create_exception!(rosu_pp_py, KwargsError, PyException); create_exception!(akatsuki_pp_py, KwargsError, PyException);
create_exception!(rosu_pp_py, ParseError, PyException); create_exception!(akatsuki_pp_py, ParseError, PyException);
pub trait ErrorExt { pub trait ErrorExt {
fn unwind(&self, cause: &str) -> String; fn unwind(&self, cause: &str) -> String;
+1 -1
View File
@@ -21,7 +21,7 @@ mod perf_attrs;
mod strains; mod strains;
#[pymodule] #[pymodule]
fn rosu_pp_py(py: Python<'_>, m: &PyModule) -> PyResult<()> { fn akatsuki_pp_py(py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_class::<PyBeatmap>()?; m.add_class::<PyBeatmap>()?;
m.add_class::<PyCalculator>()?; m.add_class::<PyCalculator>()?;
+1 -1
View File
@@ -1,7 +1,7 @@
use std::fmt::{Display, Formatter, Result as FmtResult}; use std::fmt::{Display, Formatter, Result as FmtResult};
use pyo3::{pyclass, pymethods}; use pyo3::{pyclass, pymethods};
use rosu_pp::{beatmap::BeatmapAttributes, Beatmap}; use akatsuki_pp::{beatmap::BeatmapAttributes, Beatmap};
#[pyclass(name = "BeatmapAttributes")] #[pyclass(name = "BeatmapAttributes")]
pub struct PyBeatmapAttributes { pub struct PyBeatmapAttributes {
+1 -1
View File
@@ -1,7 +1,7 @@
use std::fmt::{Debug, Display, Formatter, Result as FmtResult}; use std::fmt::{Debug, Display, Formatter, Result as FmtResult};
use pyo3::{pyclass, pymethods}; use pyo3::{pyclass, pymethods};
use rosu_pp::{ use akatsuki_pp::{
catch::CatchPerformanceAttributes, mania::ManiaPerformanceAttributes, catch::CatchPerformanceAttributes, mania::ManiaPerformanceAttributes,
osu::OsuPerformanceAttributes, taiko::TaikoPerformanceAttributes, PerformanceAttributes, osu::OsuPerformanceAttributes, taiko::TaikoPerformanceAttributes, PerformanceAttributes,
}; };
+1 -1
View File
@@ -1,7 +1,7 @@
use std::fmt::{Debug, Display, Formatter, Result as FmtResult}; use std::fmt::{Debug, Display, Formatter, Result as FmtResult};
use pyo3::{ffi, pyclass, pymethods, types::PyList, IntoPy, IntoPyPointer, Py, PyObject, Python}; use pyo3::{ffi, pyclass, pymethods, types::PyList, IntoPy, IntoPyPointer, Py, PyObject, Python};
use rosu_pp::{ use akatsuki_pp::{
catch::CatchStrains, mania::ManiaStrains, osu::OsuStrains, taiko::TaikoStrains, Strains, catch::CatchStrains, mania::ManiaStrains, osu::OsuStrains, taiko::TaikoStrains, Strains,
}; };