Skip to content

Commit

Permalink
Merge branch 'main' of github.com:HCDigitalScholarship/intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermorgan committed Jan 30, 2024
2 parents 396c06c + b125380 commit cd7befa
Show file tree
Hide file tree
Showing 31 changed files with 3,834 additions and 646 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: write

strategy:
matrix:
python-version: [ 3.8, 3.9 ]
Expand All @@ -20,28 +23,39 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --cov visualizations --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report term-missing --cov-report=html
pytest --cov main_objs --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report term-missing --cov-report=html
- name: Install poetry and twine
- name: Install poetry and "patch" the build
run: |
python -m pip install --upgrade pip
pip install poetry
pip install twine
- name: Build and publish to PyPI
env:
TWINE_USERNAME: __token__ # Replace with your PyPI username or token
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} # Add this token as a GitHub repository secret
poetry self add poetry-bumpversion
poetry version patch
- name: Publish to Pypi
if: ${{ matrix.python-version == 3.9 }}
run: |
poetry build
ls
pwd
twine upload *
poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}"
poetry publish --build
- uses: actions/checkout@v3
- uses: stefanzweifel/git-auto-commit-action@v4




# - name: Build and publish to PyPI
# env:
# TWINE_USERNAME: __token__ # Replace with your PyPI username or token
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} # Add this token as a GitHub repository secret
# run: |
# poetry build
# twine upload ./crim_intervals
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# CRIM Intervals: Python Tools for the Analysis of Encoded Music Scores

### Current Version: 2.0.3
### Current Version: 2.0.12

[CRIM Intervals on github](https://github.com/HCDigitalScholarship/intervals/tree/main)

## Install CRIM Intervals and its Dependencies

Install with pypi package manager: `pip install crim_intervals`

## About CRIM Intervals

Based on [**Python**](https://www.python.org/) and [**Pandas**](https://pandas.pydata.org/), and Mike Cuthbert's excellent **music21** (https://web.mit.edu/music21/), **CRIM Intervals** is a pattern finding engine for musical scores, with an emphasis on the kinds of melodic, harmonic, and contrapuntal patterns found in Renaissance polyphony. It has been developed as a primary data analysis tool for **Citations: The Renaissance Imitation Mass** (http://crimproject.org and https://sites.google.com/haverford.edu/crim-project/home), directed by Professor Richard Freedman (Haverford College, USA), in partnership with dozens of researchers and students around the world. Contact rfreedma at haverford.edu to learn more about the project, and how you can take part.
Expand Down Expand Up @@ -119,4 +123,4 @@ All CRIM intervals tools are available via a **Creative Commons** license (Attri
* [15_Network_Graphs](https://github.com/HCDigitalScholarship/intervals/blob/main/tutorial/15_Network_Graphs.md)
* [16_Python_Basics](https://github.com/HCDigitalScholarship/intervals/blob/main/tutorial/16_Python_Basics.md)
* [17_Pandas_Basics](https://github.com/HCDigitalScholarship/intervals/blob/main/tutorial/17_Pandas_Basics.md)
* [18_Music21_Basics](https://github.com/HCDigitalScholarship/intervals/blob/main/tutorial/18_Music21_Basics.md)
* [18_Music21_Basics](https://github.com/HCDigitalScholarship/intervals/blob/main/tutorial/18_Music21_Basics.md)
1 change: 1 addition & 0 deletions crim_intervals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# from .classify import *
#from .main_objs import *
from .visualizations import *
__version__ = "2.0.12"
Binary file modified crim_intervals/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file modified crim_intervals/__pycache__/main.cpython-39.pyc
Binary file not shown.
Binary file modified crim_intervals/__pycache__/main_objs.cpython-39.pyc
Binary file not shown.
Binary file modified crim_intervals/__pycache__/visualizations.cpython-39.pyc
Binary file not shown.
10 changes: 5 additions & 5 deletions crim_intervals/main_objs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os
import re
import requests
import intervals
import crim_intervals
import collections
import verovio
import seaborn as sns
Expand All @@ -22,7 +22,7 @@
import plotly.express as px
from glob import glob
from IPython.display import SVG, HTML
cwd = os.path.dirname(intervals.__file__)
cwd = os.path.dirname(crim_intervals.__file__)

MEINSURI = 'http://www.music-encoding.org/ns/mei'
MEINS = '{%s}' % MEINSURI
Expand Down Expand Up @@ -2175,7 +2175,7 @@ def cadenceProgressPlot(self, includeType=False, cadTone=None, cadType=None, cus
if renderer == "streamlit":
return plt
else:
plt.show(renderer=renderer)
plt.show()

def markFourths(self):
'''
Expand Down Expand Up @@ -3752,7 +3752,7 @@ def moduleFinder(self, models=None, masses=None, n=4, ic=False):

return res

def compareCadenceRadarPlots(self, combinedType=False, sounding=None, displayAll=True, customOrder=None, renderer="iframe"):
def compareCadenceRadarPlots(self, combinedType=False, sounding=None, displayAll=True, customOrder=None, renderer=""):

'''
Parameters Overview:
Expand Down Expand Up @@ -3835,7 +3835,7 @@ def compareCadenceRadarPlots(self, combinedType=False, sounding=None, displayAll
if renderer == "streamlit":
return fig
else:
fig.show(renderer=renderer)
fig.show()

# setting up the figure size:
def _plot_default(self):
Expand Down
Loading

0 comments on commit cd7befa

Please sign in to comment.