1
0
mirror of synced 2025-02-23 21:43:41 +01:00

Code Style

This commit is contained in:
Stepland 2021-04-26 20:41:54 +02:00
parent b64685e73d
commit 254922c699
5 changed files with 32 additions and 16 deletions

View File

@ -1,6 +1,7 @@
"""
Module containing all the load/dump code for all file formats
"""
from typing import IO, Any, Callable, Dict
from path import Path

View File

@ -0,0 +1,3 @@
"""
.eve is the file format used in arcade releases of jubeat
"""

View File

@ -1,9 +1,9 @@
"""
Formats read by jubeat analyser
This module contains code for the different formats read by jubeat analyser
memo is a vague term refering to several legacy formats.
"memo" is a vague term that refers to several legacy formats.
They were originally derived from the (somewhat) human-readable format choosen
by websites storing official jubeat charts in text form as a memory aid.
by websites gathering official jubeat charts in text form as a memory aid.
The machine-readable variants are partially documented (in japanese)
on these pages :

View File

@ -16,7 +16,8 @@ def compare_chart_notes(chart: str, expected: Iterable[Union[TapNote, LongNote]]
def test_simple_section():
chart = """
chart = \
"""
@ -24,13 +25,15 @@ def test_simple_section():
-------
"""
expected = [
TapNote(time=BeatsTime(i), position=NotePosition(i, i)) for i in range(4)
TapNote(time=BeatsTime(i), position=NotePosition(i, i))
for i in range(4)
]
compare_chart_notes(chart, expected)
def test_compound_section():
chart = """
chart = \
"""
@ -69,7 +72,8 @@ def test_compound_section():
def test_symbol_definition():
chart = """
chart = \
"""
*:2 //と同タイミング
*:2.125
*:2.25 //と同じ
@ -112,7 +116,8 @@ def test_symbol_definition():
def test_half_width_symbols():
chart = """
chart = \
"""
b=7
*:4.5
*21:5
@ -156,7 +161,8 @@ def test_half_width_symbols():
def test_irregular_beats_per_frame_1():
chart = """
chart = \
"""
b=2.75
@ -189,7 +195,8 @@ def test_irregular_beats_per_frame_1():
def test_irregular_beats_per_frame_2():
chart = """
chart = \
"""
b=1
@ -223,7 +230,8 @@ def test_irregular_beats_per_frame_2():
def test_long_notes():
chart = """
chart = \
"""
#holdbyarrow=1
@ -248,7 +256,8 @@ def test_long_notes():
def test_long_notes_ambiguous_case():
chart = """
chart = \
"""
#holdbyarrow=1
@ -271,7 +280,8 @@ def test_long_notes_ambiguous_case():
@pytest.mark.filterwarnings("error")
def test_long_notes_simple_solution_no_warning():
chart = """
chart = \
"""
#holdbyarrow=1
@ -292,7 +302,8 @@ def test_long_notes_simple_solution_no_warning():
def test_long_notes_complex_case():
chart = """
chart = \
"""
#holdbyarrow=1
@ -313,7 +324,8 @@ def test_long_notes_complex_case():
def test_circle_free():
chart = """
chart = \
"""
#holdbyarrow=1
#circlefree=1

View File

@ -448,4 +448,4 @@ def dump_memon_0_2_0(song: Song, path: Path) -> Dict[Path, bytes]:
else:
filepath = path
return {filepath: _dump_to_json(memon)}
return {filepath: _dump_to_json(memon)}