Skip to content

Commit 31707ad

Browse files
authored
Merge pull request #128 from Eve-ning/0.2.1
0.2.1 Failing tests are okay, since they are difficult TODOs and coverage changed due to linting
2 parents b84f113 + 3e3c126 commit 31707ad

File tree

520 files changed

+51606
-20795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

520 files changed

+51606
-20795
lines changed

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: ['3.8', '3.9', '3.10', '3.11']
18+
python-version: ['3.9', '3.10', '3.11']
1919
test-type: ['unit_tests', 'algorithm_tests']
2020

2121
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ reamber.egg-info/*
1111
*.mp3
1212
*.pyc
1313
*.ojm
14+
*.zip

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/psf/black
5+
rev: 23.10.0
6+
hooks:
7+
- id: black

CONTRIBUTING.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Contributing
22

3-
This is still in the alpha stage, however, you're free to recommend functions to be implemented via Issues.
3+
## Getting Started
4+
5+
You need `poetry` to get started. Install it via `pip install poetry`.
6+
7+
Then, run `poetry install` to install all dependencies (in pyproject.toml).
8+
9+
## Testing
10+
11+
Run `poetry run pytest` to run all tests, or you can create a PR, GH Actions will run it for you.
412

5-
# Future
613

7-
After this is more stable, I'll open up contributions mainly in the algorithms' package, where you'll be able to implement
8-
functions for the community to use.

Writerside/c.list

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE categories
3+
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
4+
<categories>
5+
<category id="wrs" name="Writerside documentation" order="1"/>
6+
</categories>

Writerside/cfg/buildprofiles.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
5+
<variables></variables>
6+
<build-profile instance="in">
7+
<variables>
8+
<noindex-content>true</noindex-content>
9+
</variables>
10+
</build-profile>
11+
12+
</buildprofiles>

Writerside/in.tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE instance-profile
3+
SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">
4+
5+
<instance-profile id="in"
6+
name="reamberPy" start-page="index.md">
7+
8+
<toc-element topic="index.md"/>
9+
<toc-element toc-title="About">
10+
<toc-element topic="GettingStarted.md"/>
11+
<toc-element topic="Conventions.md"/>
12+
<toc-element topic="ChangeLog.md"/>
13+
<toc-element topic="About.md"/>
14+
</toc-element>
15+
<toc-element toc-title="Learn">
16+
<toc-element topic="WorkingWithMaps.md"/>
17+
<toc-element topic="Stacking.md"/>
18+
<toc-element topic="BuildingBlocks.md"/>
19+
<toc-element topic="Basics.md"/>
20+
</toc-element>
21+
<toc-element toc-title="Objects">
22+
<toc-element topic="SM.md"/>
23+
<toc-element topic="Quaver.md"/>
24+
<toc-element topic="Osu.md"/>
25+
<toc-element topic="O2Jam.md"/>
26+
<toc-element topic="BMS.md"/>
27+
<toc-element toc-title="Algorithms">
28+
<toc-element topic="SvNormalize.md"/>
29+
<toc-element topic="ScrollSpeed.md"/>
30+
<toc-element topic="PlayFieldPattern.md"/>
31+
<toc-element topic="PlayField.md"/>
32+
<toc-element topic="Pattern.md"/>
33+
<toc-element topic="FullLN.md"/>
34+
<toc-element topic="DominantBpm.md"/>
35+
<toc-element topic="Conversions.md"/>
36+
<toc-element toc-title="osu">
37+
<toc-element topic="ParseReplay.md"/>
38+
<toc-element topic="HitsoundCopy.md"/>
39+
</toc-element>
40+
</toc-element>
41+
<toc-element toc-title="Base Objects">
42+
<toc-element topic="MapSet.md"/>
43+
<toc-element topic="Map.md"/>
44+
<toc-element topic="BpmHitHold.md"/>
45+
</toc-element>
46+
<toc-element toc-title="BMS">
47+
<toc-element topic="Channel.md"/>
48+
</toc-element>
49+
</toc-element>
50+
<toc-element toc-title="Dev Info">
51+
<toc-element topic="TypeHinting.md"/>
52+
<toc-element topic="Props.md"/>
53+
<toc-element topic="DevInfo.md"/>
54+
</toc-element>
55+
</instance-profile>

Writerside/redirection-rules.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE rules SYSTEM "https://resources.jetbrains.com/writerside/1.0/redirection-rules.dtd">
3+
<rules>
4+
<!-- format is as follows
5+
<rule id="<unique id>">
6+
<accepts>page.html</accepts>
7+
</rule>
8+
-->
9+
<rule id="472f6315">
10+
<description>
11+
<![CDATA[Created after removal of "<Hold.md>" from reamberPy]]></description>
12+
<accepts>Hold.html</accepts>
13+
</rule>
14+
<rule id="757dd3ba">
15+
<description>
16+
<![CDATA[Created after removal of "<Hit.md>" from reamberPy]]></description>
17+
<accepts>Hit.html</accepts>
18+
</rule>
19+
<rule id="39ac902d">
20+
<description>Created after removal of "Base Lists" from reamberPy
21+
</description>
22+
<accepts>lists.html</accepts>
23+
</rule>
24+
<rule id="717e67d0">
25+
<description>Created after removal of "Base" from reamberPy
26+
</description>
27+
<accepts>Base.html</accepts>
28+
</rule>
29+
<rule id="2f547111">
30+
<description>Created after removal of "Algorithms" from reamberPy
31+
</description>
32+
<accepts>Algorithms.html</accepts>
33+
</rule>
34+
</rules>

Writerside/topics/devInfo/DevInfo.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Development Info
2+
3+
## Base
4+
5+
See also [Building Blocks](BuildingBlocks.md)
6+
7+
Base contains a few **item** classes
8+
9+
- `Timed`
10+
- `Bpm`
11+
- `Note`
12+
- `Hit`
13+
- `Hold`
14+
15+
These are different from the **item list** classes
16+
17+
- `TimedList`
18+
- `BpmList`
19+
- `NoteList`
20+
- `HitList`
21+
- `HoldList`
22+
23+
The reason for separating them is so that we can custom implement list methods that Python `list` class does not
24+
provide.
25+
26+
**Each Item** uses a `pd.Series`. **Each List** uses a `pd.DataFrame`.
27+
28+
`Item.data` will yield a `pd.Series`.
29+
30+
`ItemList.df` will yield a `pd.DataFrame`.
31+
32+
We use `pd` because it helps in optimization and provides abundant functionalities to extend from.
33+
34+
## Item Structure
35+
36+
**Bolded** elements are new properties introduced in the child class.
37+
38+
### Timed
39+
40+
Props: **offset**
41+
42+
### Note(Timed)
43+
44+
Props: **column**, offset
45+
46+
### Hit(Note)
47+
48+
Props: column, offset
49+
50+
### Hold(Note)
51+
52+
Props: **length**, column, offset
53+
54+
### Bpm(Timed)
55+
56+
Props: **bpm**, **metronome**, offset
57+
58+
## Item List Structure
59+
60+
For each corresponding **Item**, there is its list part, which provides additional functionality
61+
62+
- `TimedList`
63+
- `NoteList(TimedList)`
64+
- `HitList(NoteList)`
65+
- `HoldList(NoteList)`
66+
- `BpmList(TimedList)`
67+
68+
## Map Structure
69+
70+
Every map is a `@dataclass`.
71+
72+
For each map, it has an `objs` dictionary of `TimedList` children. This is the default.
73+
74+
```python
75+
from reamber.base.lists.notes.HitList import HitList
76+
from reamber.base.lists.notes.HoldList import HoldList
77+
from reamber.base.lists.BpmList import BpmList
78+
79+
objs = dict(hits=HitList([]), holds=HoldList([]), bpms=BpmList([]))
80+
```
81+
82+
In other words, it always initializes with these classes, but inheriting classes can override `objs`.
83+
84+
Overriding updates the classes, where it should opt for `OsuHoldList` instead of `HoldList`.
85+
86+
## MapSet Structure
87+
88+
A `MapSet` is simply a list of `Map` s.

0 commit comments

Comments
 (0)