Viv
018d09d34c
Fix error when metadata fields have numbers in them (e.g. NOTESDESIGNER0
) ( #61 )
...
Simple fix -- regex for metadata didn't include numbers, but does now.
Fixes #60 .
2023-08-05 11:00:28 -04:00
Viv
b4fb3ba739
Change function signature of parse_tja_course_data
...
Now we actually return the parsed branches, instead of operating on the course in-place.
2023-07-31 09:48:05 -04:00
Viv
c7cb2511ed
parsers.py
: Update outdated docstring
2023-07-31 09:34:55 -04:00
Viv
dd86df83aa
Remove seek
arguments from read/write struct funcs
2023-07-31 09:28:17 -04:00
Viv
15cbb9e62a
Rename measure_tja.data
to measure_tja.notes
2023-07-31 09:21:40 -04:00
Viv
73ad83d621
converters.py
: Minor refactoring tweaks (e.g. comments)
2023-07-31 09:21:16 -04:00
Viv
78379d5143
classes.py
: Inline comment
2023-07-31 09:08:30 -04:00
Viv
31821facf1
classes.py
: Simplify unp
method
...
Optional start/end was a relic from a previous iteration of the class.
2023-07-31 09:08:29 -04:00
Viv
2ad2e639e5
classes.py
: Condense set_hp_bytes
2023-07-31 09:04:20 -04:00
Viv
f805416831
classes.py
: Simplify timing window assignment
...
default_factory is no longer needed, since we use a tuple for this instead of a list
2023-07-31 08:58:41 -04:00
Viv
cbdadcdc33
classes.py
: Fix indentation
2023-07-31 08:56:08 -04:00
Viv
5e52e5c71d
classes.py
: Refactor how raw_bytes
is constructed
2023-07-31 08:55:12 -04:00
Viv
d7a817b9ea
classes.py
: Simplify getattr
calls
2023-07-31 08:52:52 -04:00
Viv
cd519f5a26
classes.py
: Remove outdated _raw_bytes
...
No longer used.
2023-07-31 08:51:40 -04:00
Viv
098fb51a04
converters.py
: Change func sig of process_commands
...
Now, instead of passing an entire TJACourse object, we pass the branch dict. This makes the function signature _much_ clearer, since it's easier to compare the before and after.
2023-07-31 08:49:44 -04:00
Viv
1358fbbca1
Rename types.py
to classes.py
to avoid nuitka error
...
Context: https://stackoverflow.com/questions/43453414/cannot-import-name-mappingproxytype-error-after-importing-functools#comment82066966_46915574
2023-07-30 21:04:02 -04:00
Viv
b380ad7786
Fix additional type issues caught by mypyc
2023-07-30 20:09:04 -04:00
Viv
490c68b86c
.gitignore
: Use GitHub's template
2023-07-30 19:26:41 -04:00
Viv
ade127b026
Fix PyCharm code inspection warnings
2023-07-30 19:20:39 -04:00
Viv
300a58eb14
README.md
: Add badges for code quality tools
2023-07-30 18:50:20 -04:00
Viv
387cbbcdfa
Make project pylint
-compliant (and add pylint
check to test suite) ( #59 )
2023-07-30 18:49:58 -04:00
Viv
5229db4aab
Make project mypy
-compliant (and add mypy
check to test suite) ( #58 )
...
This PR adopts static type hints as per `mypy` recommendations. This
will hopefully clean up the code a little and squash a few type-related
bugs.
Additionally, this will hopefully open up the door to compiling the
project using `mypyc`, which may score us some performance gains without
needing to rewrite the project in an entirely new language.
2023-07-30 16:50:41 -04:00
Viv
d99c7f5984
Convert TJA/Fumen classes into dataclasses ( #57 )
...
This branch was originally used to test out Pydantic. However, after
some profiling, I came to the conclusion that runtime type checking is
overkill for a project like this. So, instead, I'm sticking with static
typing via dataclasses.
Fixes #56 .
2023-07-30 12:56:06 -04:00
Viv
03c8892243
README.md
: Fix table row for A
, B
notes
2023-07-27 18:56:16 -04:00
Viv
4a8c6d8fb4
types.py
: Sped up LUT parsing with iteration
2023-07-27 18:53:58 -04:00
Viv
e126494496
README.md
: Restructure 'notes' part of table
2023-07-27 15:16:09 -04:00
Viv
c0442f3721
Fix behavior for the #LEVELHOLD
command ( #54 )
...
Previously, I had translated the existing levelhold behavior in
WHMHammer's tja parsing code, assuming that it would produce the correct
behavior for fumen charts. However, that is not the case -- the behavior
is completely wrong.
So, this PR takes out all the old `flag_levelhold` behavior and instead
properly sets the `branch_info` bytes whenever #LEVELHOLD is present on
a branch.
This PR also prepares `shoto9.tja` for further testing, but I'm leaving
that for later...
Fixes #52 .
2023-07-27 15:02:19 -04:00
Viv
59046c22ec
Add remaining docstrings/comments
2023-07-27 13:16:44 -04:00
Viv
740ccbcd31
Fix linting issues
2023-07-26 10:17:28 -04:00
Viv
7aead6f8ef
parsers.py
: Simplify convoluted P1 copying logic
2023-07-25 23:30:16 -04:00
Viv
6ea74ae58b
parsers.py
: Simplify BPM/OFFSET logic
2023-07-25 23:21:20 -04:00
Viv
3cb25c23c7
parsers.py
: Rename current_course_cached
to _basename
2023-07-25 23:09:49 -04:00
Viv
24b5828833
parsers.py
: Simplify if/elses in split_tja_lines_into_course()
...
Some highlights:
- Strip comments ahead of time
- _Only_ parse #START in split_tja_lines_into_course()
- Leave all other parsing to parse_tja_course_data()
This makes the function behavior line up with what the docstring suggests, and removes some convoluted parsing in split_tja_lines_into_course().
2023-07-25 23:08:18 -04:00
Viv
fc1b0d1bbc
Start adding docstrings and fixing comments
2023-07-25 21:50:12 -04:00
Viv
09a293e59f
types.py
: Simplify __repr__
using inheritance
2023-07-25 19:20:10 -04:00
Viv
ec72398abe
Simplify #SECTION
/#BRANCHSTART
logic
...
Previous code was unnecessarily convoluted.
2023-07-25 19:11:28 -04:00
Viv
f088e95e02
converters.py
: Move computation into MeasureFumen
class
2023-07-25 18:53:02 -04:00
Viv
79cca3d75e
README.md
: Try adding a Features section
2023-07-24 22:58:22 -04:00
Viv
7baa5ea859
README.md
: Improve table spacing for mobile
2023-07-24 22:47:46 -04:00
Viv
d33562fef7
README.md
: Update tja2bin crash commands
2023-07-24 17:33:24 -04:00
Viv
86f394e8ca
README.md
: Update sim-specific wording
2023-07-24 17:28:04 -04:00
Viv
5ca4f080d3
README.md
: Clarify #LEVELHOLD
status
2023-07-24 17:22:14 -04:00
Viv
a09bfb87d4
Add test for 2P commands
2023-07-24 16:55:52 -04:00
Viv
6eb3676343
Add double Kusudama test
2023-07-24 16:46:21 -04:00
Viv
276bd0b70c
Add semi-support for sim-specific notes
2023-07-24 16:28:49 -04:00
Viv
f1cd73ebb9
README.md
: Add table for file formats
2023-07-24 16:07:38 -04:00
Viv
45535d6fb1
README.md
: Reformat tables using PyCharm
2023-07-24 16:00:04 -04:00
Viv
a4c9fb2b18
Add support for A
/B
notes (hands)
2023-07-24 15:57:58 -04:00
Viv
4f269630a5
Fix note.type
-> note.note_type
2023-07-24 15:50:42 -04:00
Viv
9f71a801ce
Update README.md
2023-07-24 09:21:23 -04:00