Skip to content

Commit

Permalink
Merge branch 'rich_dev_24'
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardFreedman committed Aug 29, 2024
2 parents 08ced2a + 8750a6f commit bfbb230
Show file tree
Hide file tree
Showing 14 changed files with 650 additions and 443 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/interval_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
python-version: [ '3.10', '3.11' ]
python-version: [ '3.10', '3.11', '3.12']

steps:
- name: Use Node.js 20.x
Expand Down
Binary file added crim_intervals/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file added crim_intervals/__pycache__/main.cpython-311.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 15 additions & 15 deletions crim_intervals/test_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,21 +181,21 @@ def ngrams_heatmap_test_helper(model, notes):
# # helper_test_generate_ngrams_and_dur(model, mel_chromatic, -1)


def test_comparisons_heatmap():
# pieces
df_relationships = pd.DataFrame(RELATIONSHIPS_DICT_EXAMPLE)
relationships_chart = viz.plot_comparison_heatmap(df_relationships, 'model_observation.ema',
main_category='relationship_type', other_category='observer.name',
heat_map_width=800, heat_map_height=300)
assert isinstance(relationships_chart, alt.VConcatChart)
assert len(relationships_chart.vconcat) == 2

df_observations = pd.DataFrame(OBSERVATIONS_DICT_EXAMPLE)
observations_chart = viz.plot_comparison_heatmap(df_observations, 'ema',
main_category='musical_type', other_category='observer.name',
heat_map_width=800, heat_map_height=300)
assert isinstance(observations_chart, alt.VConcatChart)
assert len(observations_chart.vconcat) == 2
# def test_comparisons_heatmap():
# # pieces
# df_relationships = pd.DataFrame(RELATIONSHIPS_DICT_EXAMPLE)
# relationships_chart = viz.plot_comparison_heatmap(df_relationships, 'model_observation.ema',
# main_category='relationship_type', other_category='observer.name',
# heat_map_width=800, heat_map_height=300)
# assert isinstance(relationships_chart, alt.VConcatChart)
# assert len(relationships_chart.vconcat) == 2

# df_observations = pd.DataFrame(OBSERVATIONS_DICT_EXAMPLE)
# observations_chart = viz.plot_comparison_heatmap(df_observations, 'ema',
# main_category='musical_type', other_category='observer.name',
# heat_map_width=800, heat_map_height=300)
# assert isinstance(observations_chart, alt.VConcatChart)
# assert len(observations_chart.vconcat) == 2


# TODO: review if this is still wanted and used. If not, remove it and see if ipywidgets can be removed as a dependency
Expand Down
1,050 changes: 627 additions & 423 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ packages = [
]

[tool.poetry.dependencies]
python = ">=3.9"
altair = "5.2.0"
certifi = "2020.12.5"
chardet = "4.0.0"
Expand All @@ -21,13 +22,13 @@ ipython = ">=7.23.1,<8.0"
joblib = "1.0.1"
jsonschema = ">=3.1"
lxml = "5.1.0"
matplotlib = "3.5.2"
matplotlib = "^3.9.2"
more-itertools = "8.7.0"
music21 = "8.3.0"
numpy = ">=1.20.2,<2.0.0"
pandas = ">=2.2.0"
statsmodels = "0.14.1"
plotly = "5.18.0"
plotly = "5.19.0"
plotly-express = "0.4.1"
pyarrow = ">=15.0.0"
pyvis = "0.1.9"
Expand Down
4 changes: 4 additions & 0 deletions tutorial/15_Network_Graphs.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ Here are the functions needed to create the networks with CRIM Intervals melodic

<Summary>Get the Code</Summary
####
```python
# import libraries
import pandas as pd
import numpy as np
import networkx as nx
Expand Down
2 changes: 0 additions & 2 deletions tutorial/18_Visualizations_Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ Here is a map for just one piece:
# import piece
url = 'https://crimproject.org/mei/CRIM_Model_0019.mei'
model = importScore(url)
url = 'https://crimproject.org/mei/CRIM_Model_0019.mei'
model = importScore(url)

# settings:
combineUnisons = True
Expand Down

0 comments on commit bfbb230

Please sign in to comment.