Skip to content

Commit

Permalink
Merge pull request #1611 from cuthbertLab/v9
Browse files Browse the repository at this point in the history
music21 v9
  • Loading branch information
mscuthbert authored Jun 15, 2023
2 parents 0fd80b3 + 50ac13b commit a243454
Show file tree
Hide file tree
Showing 14 changed files with 53 additions and 50 deletions.
43 changes: 23 additions & 20 deletions dist/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@
1. update the VERSION in _version.py and the single test cases in base.py.
2. run `corpus.corpora.CoreCorpus().cacheMetadata()`.
for a major change run corpus.corpora.CoreCorpus().rebuildMetadataCache()
for a major change that affects parsing run corpus.corpora.CoreCorpus().rebuildMetadataCache()
(20 min on IntelMacbook Air) -- either of these MAY change a
lot of tests in corpus, metadata, etc. so don't skip the next step!
3. run test/warningMultiprocessTest.py for lowest and highest Py version -- fix all warnings!
4. run test/testLint.py and fix any lint errors (covered now by CI)
5. commit and then check test/testSingleCoreAll.py or wait for results on GitHub Actions
3. IMPORTANT: run python documentation/testDocumentation.py and afterwards fix errors [*]
[*] you will need pytest, docutils, nbval installed (along with ipython and jupyter),
you cannot check to see if fixed tests work while it is running.
This takes a while and runs single core, and then almost always needs code patches
so allocate time. Start working on the announcement while it's running.
4. run test/warningMultiprocessTest.py for lowest and highest Py version -- fix all warnings!
5. commit and wait for results on GitHub Actions
(normally not necessary, because it's slower and mostly duplicates multiprocessTest,
but should be done before making a release).
6. IMPORTANT: run python documentation/testDocumentation.py and afterwards fix errors [*]
[*] you will need pytest, docutils, nbval installed (along with ipython and jupyter), you cannot check
to see if fixed tests work while it is running.
This takes a while and runs single core, so allocate time. Start working on
the announcement while it's running.
7. run documentation/make.py clean (skip on minor version changes)
8. run documentation/make.py linkcheck [*]
9. run documentation/make.py [*]
6. run documentation/make.py clean (skip on minor version changes)
7. run documentation/make.py linkcheck [*]
8. run documentation/make.py [*]
[*] you will need sphinx, Jupyter (pip or easy_install), markdown, and pandoc (.dmg) installed
Expand All @@ -50,22 +51,24 @@
14. Run this file -- it builds the no-corpus version of music21.
DO NOT RUN THIS ON A PC -- the Mac .tar.gz might have an incorrect permission if you do.
15. COMMIT to GitHub at this point w/ commit comment of the new version,
15. PR and Commit to GitHub at this point w/ commit comment of the new version,
then don't change anything until the next step is done.
(.gitignore will avoid uploading the large files created here...)
16. Tag the commit: git tag -a vX.Y.Z -m "music21 vX.Y.Z"
16. Switch back to master/main branch
17. Tag the commit: git tag -a vX.Y.Z -m "music21 vX.Y.Z"
Don't forget the "v" in the release tag.
Sanity check that the correct commit was tagged: git log
17. Push tags: git push --tags (or git push upstream --tags if not on main branch)
18. Push tags: git push --tags (or git push upstream --tags if not on main branch)
18. Create a new release on GitHub and upload the TWO non-wheel files created here and docs.
19. Create a new release on GitHub and upload the TWO non-wheel files created here and docs.
Drag in this order: .tar.gz, documentation, no-corpus.tar.gz
Finish this before doing the next step, even though it looks like it could be done in parallel.
19. Upload the new file to PyPI with "twine upload music21-7.3.5a2.tar.gz", and same for the
20. Upload the new file to PyPI with "twine upload music21-7.3.5a2.tar.gz", and same for the
whl file (but NOT no corpus) [*]
[*] Requires twine to be installed
Expand All @@ -80,9 +83,9 @@
username:your_username
password:your_password
20. Delete the two .tar.gz files and .whl file in dist...
21. Delete the two .tar.gz files and .whl file in dist...
21. For starting a new major release create a GitHub branch for the old one.
22. For starting a new major release create a GitHub branch for the old one.
22. Immediately increment the number in _version.py and run tests on it here
to prepare for next release.
Expand Down
4 changes: 2 additions & 2 deletions documentation/source/about/applications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ Ariza, C. and Michael Scott Cuthbert. 2011. "The `music21` Stream: A New Object
Model for Representing, Filtering, and Transforming Symbolic Musical
Structures." In *Proceedings of the International Computer Music Conference*.
San Francisco: International Computer Music Association, pp. 61-68.
Available online at http://www.flexatone.org/static/docs/music21Stream.pdf
Available online at https://www.flexatone.net/static/docs/music21Stream.pdf

Ariza, C. and Michael Scott Cuthbert. 2011. "Analytical and Compositional
Applications of a Network-Based Scale Model in `music21`." In *Proceedings of the
International Computer Music Conference*. San Francisco: International Computer
Music Association, pp. 701-708. Available online at
http://www.flexatone.org/static/docs/scaleNetwork.pdf
https://www.flexatone.net/static/docs/scaleNetwork.pdf

Ariza, C. and Michael Scott Cuthbert. 2010. "Modeling Beats, Accents, Beams, and
Time Signatures Hierarchically with `music21` Meter Objects." In *Proceedings of the
Expand Down
2 changes: 1 addition & 1 deletion documentation/source/about/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,6 @@ And this Humdrum about which you speak?
Information on Humdrum can be found here at the following links:

* https://www.humdrum.org
* http://kern.humdrum.org
* https://kern.humdrum.org


2 changes: 1 addition & 1 deletion documentation/source/developerReference/musicxmlTest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"http://lilypond.org/doc/v2.18/input/regression/musicxml/collated-files\n",
"\n",
"The test suite is licensed under the MIT license\n",
"(https://opensource.org/licenses/mit-license.php)\n",
"(https://opensource.org/license/mit/)\n",
"and copyrighted by the Lilypond project.\n",
"\n"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
}
],
"source": [
"url = 'http://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello&file=bwv1007-01.krn&f=xml'\n",
"url = 'https://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello&file=bwv1007-01.krn&f=xml'\n",
"sAlt = converter.parse(url)\n",
"sAlt.measures(1, 5).show() # show first 5 measures"
]
Expand Down Expand Up @@ -363,7 +363,7 @@
"metadata": {},
"outputs": [],
"source": [
"sBach = converter.parse('http://kern.ccarh.org/cgi-bin/ksdata?' +\n",
"sBach = converter.parse('https://kern.ccarh.org/cgi-bin/ksdata?' +\n",
" 'l=users/craig/classical/bach/cello&file=bwv1007-01.krn&f=kern')"
]
},
Expand All @@ -373,7 +373,7 @@
"source": [
"Over one hundred thousand Kern files can be found at the following URL.\n",
"\n",
"http://kern.humdrum.org/"
"https://kern.humdrum.org/"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion music21/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'''
from __future__ import annotations

__version__ = '9.0.0b1'
__version__ = '9.1.0'

def get_version_tuple(vv):
v = vv.split('.')
Expand Down
2 changes: 1 addition & 1 deletion music21/abcFormat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
For users who will be editing ABC extensively or need a way to have music21 output ABC
(which it doesn't do natively), we suggest using the open source EasyABC package:
http://easyabc.sourceforge.net . You can set it up as a MusicXML reader through:
https://easyabc.sourceforge.net . You can set it up as a MusicXML reader through:
>>> #_DOCS_SHOW us = environment.UserSettings()
>>> #_DOCS_SHOW us['musicxmlPath'] = '/Applications/EasyABC.app'
Expand Down
10 changes: 5 additions & 5 deletions music21/analysis/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ class KrumhanslSchmuckler(KeyWeightKeyAnalysis):
Implementation of Krumhansl-Schmuckler/Kessler weightings for
Krumhansl-Schmuckler key determination algorithm.
Values from from http://extras.humdrum.org/man/keycor/, which describes these
Values from from https://extras.humdrum.org/man/keycor/, which describes these
weightings as "Strong tendency to identify the dominant key as the tonic."
* Changed in v6.3: it used to be that these were different from the
Expand Down Expand Up @@ -771,7 +771,7 @@ class AardenEssen(KeyWeightKeyAnalysis):
'''
Implementation of Aarden-Essen weightings for Krumhansl-Schmuckler key determination algorithm.
Values from from http://extras.humdrum.org/man/keycor/, which
Values from from https://extras.humdrum.org/man/keycor/, which
describes these weightings as "Weak tendency to identify the subdominant key as the tonic."
(N.B. -- we are not sure exactly where the minor weightings come from, and recommend
Expand Down Expand Up @@ -816,7 +816,7 @@ class SimpleWeights(KeyWeightKeyAnalysis):
Implementation of simple weights by Craig Sapp for Krumhansl-Schmuckler
key determination algorithm.
Values from from http://extras.humdrum.org/man/keycor/, which describes
Values from from https://extras.humdrum.org/man/keycor/, which describes
these weightings as "Performs most consistently with large regions of music,
becomes noisier with smaller regions of music."
'''
Expand Down Expand Up @@ -853,7 +853,7 @@ class BellmanBudge(KeyWeightKeyAnalysis):
'''
Implementation of Bellman-Budge weightings for Krumhansl-Schmuckler key determination algorithm.
Values from from http://extras.humdrum.org/man/keycor/, which describes these
Values from from https://extras.humdrum.org/man/keycor/, which describes these
weightings as "No particular tendencies for confusions with neighboring keys."
'''
_DOC_ALL_INHERITED = False
Expand Down Expand Up @@ -893,7 +893,7 @@ class TemperleyKostkaPayne(KeyWeightKeyAnalysis):
Implementation of Temperley-Kostka-Payne weightings for Krumhansl-Schmuckler
key determination algorithm.
Values from from http://extras.humdrum.org/man/keycor/, which describes
Values from from https://extras.humdrum.org/man/keycor/, which describes
these weightings as "Strong tendency to identify the relative major as the tonic
in minor keys. Well-balanced for major keys."
'''
Expand Down
2 changes: 1 addition & 1 deletion music21/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<class 'music21.base.Music21Object'>
>>> music21.VERSION_STR
'9.0.0b1'
'9.1.0'
Alternatively, after doing a complete import, these classes are available
under the module "base":
Expand Down
Binary file modified music21/corpus/_metadataCache/core.p.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion music21/corpus/corpora.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ def name(self):
#
# >>> virtualCorpus = corpus.corpora.VirtualCorpus()
# >>> virtualCorpus.getWorkList('bach/bwv1007/prelude')
# ['http://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello&file=bwv1007-01.krn&f=xml']
# ['https://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello&file=bwv1007-01.krn&f=xml']
#
# >>> virtualCorpus.getWorkList('junk')
# []
Expand Down
18 changes: 9 additions & 9 deletions music21/corpus/virtual.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class BachBWV1007Prelude(VirtualWork):
>>> a = corpus.virtual.BachBWV1007Prelude()
>>> a.getUrlByExt('.xml')
['http://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello&file=bwv1007-01.krn&f=xml']
['https://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello&file=bwv1007-01.krn&f=xml']
'''

def __init__(self):
Expand All @@ -90,7 +90,7 @@ def __init__(self):
self.composer = 'Johann Sebastian Bach'
self.title = 'Prelude from Cello Suite No. 1 in G Major, BWV 1007'
self.corpusPath = 'bach/bwv1007/prelude'
cello = 'http://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello'
cello = 'https://kern.ccarh.org/cgi-bin/ksdata?l=cc/bach/cello'
self.urlList.append(cello + '&file=bwv1007-01.krn&f=xml')
self.urlList.append(cello + '&file=bwv1007-01.krn&f=kern')

Expand All @@ -102,7 +102,7 @@ def __init__(self):
self.composer = 'Johann Sebastian Bach'
self.title = 'Invention No. 1 in C Major, BWV 772'
self.corpusPath = 'bach/bwv772'
invention = 'http://kern.ccarh.org/cgi-bin/ksdata?l=osu/classical/bach/inventions'
invention = 'https://kern.ccarh.org/cgi-bin/ksdata?l=osu/classical/bach/inventions'
self.urlList.append(invention + '&file=inven01.krn&f=xml')


Expand All @@ -113,7 +113,7 @@ def __init__(self):
self.composer = 'Johann Sebastian Bach'
self.title = 'Invention No. 2 in C Minor, BWV 773'
self.corpusPath = 'bach/bwv773'
invention = 'http://kern.ccarh.org/cgi-bin/ksdata?l=osu/classical/bach/inventions'
invention = 'https://kern.ccarh.org/cgi-bin/ksdata?l=osu/classical/bach/inventions'
self.urlList.append(invention + '&file=inven02.krn&f=xml')
self.urlList.append(invention + '&file=inven02.krn&f=kern')

Expand All @@ -137,7 +137,7 @@ def __init__(self):
self.composer = 'Franz Schubert'
self.title = '13 Variations on a Theme by Anselm Hüttenbrenner'
self.corpusPath = 'schubert/d576-1'
self.urlList.append('http://kern.ccarh.org/cgi-bin/ksdata?l=cc/schubert/piano/'
self.urlList.append('https://kern.ccarh.org/cgi-bin/ksdata?l=cc/schubert/piano/'
'd0576&file=d0576-06.krn&f=xml')


Expand All @@ -148,7 +148,7 @@ def __init__(self):
self.composer = 'Franz Schubert'
self.title = '13 Variations on a Theme by Anselm Hüttenbrenner'
self.corpusPath = 'schubert/d576-2'
self.urlList.append('http://kern.ccarh.org/cgi-bin/ksdata?l=users/'
self.urlList.append('https://kern.ccarh.org/cgi-bin/ksdata?l=users/'
'craig/classical/schubert/piano/d0576&file=d0576-02.krn&f=xml')


Expand All @@ -159,7 +159,7 @@ def __init__(self):
self.composer = 'Franz Schubert'
self.title = '13 Variations on a Theme by Anselm Hüttenbrenner'
self.corpusPath = 'schubert/d576-3'
self.urlList.append('http://kern.ccarh.org/cgi-bin/ksdata?l=users/craig/classical/'
self.urlList.append('https://kern.ccarh.org/cgi-bin/ksdata?l=users/craig/classical/'
'schubert/piano/d0576&file=d0576-03.krn&f=xml')


Expand All @@ -170,7 +170,7 @@ def __init__(self):
self.composer = 'Franz Schubert'
self.title = '13 Variations on a Theme by Anselm Hüttenbrenner'
self.corpusPath = 'schubert/d576-4'
self.urlList.append('http://kern.ccarh.org/cgi-bin/ksdata?l=users/craig/classical/'
self.urlList.append('https://kern.ccarh.org/cgi-bin/ksdata?l=users/craig/classical/'
'schubert/piano/d0576&file=d0576-04.krn&f=xml')


Expand All @@ -181,7 +181,7 @@ def __init__(self):
self.composer = 'Johann Pachelbel'
self.title = 'Canon in D Major'
self.corpusPath = 'pachelbel/canon'
self.urlList.append('http://kern.ccarh.org/cgi-bin/ksdata?l=cc/'
self.urlList.append('https://kern.ccarh.org/cgi-bin/ksdata?l=cc/'
'pachelbel&file=canon.krn&f=xml')


Expand Down
8 changes: 4 additions & 4 deletions music21/humdrum/spineParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ def hdStringToNote(contents):
New rhythmic extensions formerly defined in
`wiki.humdrum.org/index.php/Rational_rhythms`
and now at http://extras.humdrum.org/man/rscale/
and now at https://extras.humdrum.org/man/rscale/
are fully implemented:
Expand Down Expand Up @@ -2159,7 +2159,7 @@ def hdStringToNote(contents):
double-dotted quarter not a double-dotted quarter-note triplet.
I believe that the latter definition, though used in
http://kern.ccarh.org/cgi-bin/ksdata?l=musedata/mozart/quartet&file=k421-01.krn&f=kern
https://kern.ccarh.org/cgi-bin/ksdata?l=musedata/mozart/quartet&file=k421-01.krn&f=kern
and the Josquin Research Project [JRP] is incorrect, seeing as it
contradicts the specification in
https://web.archive.org/web/20100203144730/http://www.music-cog.ohio-state.edu/Humdrum/representations/kern.html#N-Tuplets
Expand Down Expand Up @@ -2337,12 +2337,12 @@ def hdStringToNote(contents):
if durationType == 0:
durationString = foundNumber.group(1)
if durationString == '000':
# for larger values, see http://extras.humdrum.org/man/rscale/
# for larger values, see https://extras.humdrum.org/man/rscale/
thisObject.duration.type = 'maxima'
if contents.count('.'):
thisObject.duration.dots = contents.count('.')
elif durationString == '00':
# for larger values, see http://extras.humdrum.org/man/rscale/
# for larger values, see https://extras.humdrum.org/man/rscale/
thisObject.duration.type = 'longa'
if contents.count('.'):
thisObject.duration.dots = contents.count('.')
Expand Down
2 changes: 1 addition & 1 deletion music21/musicxml/lilypondTestSuite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
http://lilypond.org/doc/v2.18/input/regression/musicxml/collated-files
The test suite is licensed under the MIT license
(https://opensource.org/licenses/mit-license.php)
(https://opensource.org/license/mit/)
and copyrighted by the Lilypond project.
'''
import unittest
Expand Down

0 comments on commit a243454

Please sign in to comment.