diff --git a/dist/dist.py b/dist/dist.py index cce8d8ee8f..d9b9d16a0e 100644 --- a/dist/dist.py +++ b/dist/dist.py @@ -23,7 +23,7 @@ (normally not necessary, because it's slower and mostly duplicates multiprocessTest, but should be done before making a release). Done automatically by Travis-CI on GitHub commit 5. then python3 test/testDocumentation.py # only designed for Python 3... -6. then test/testSerialization +6. WAS test/testSerialization -- covered in "all" 7. run documentation/make.py clean 8. run documentation/make.py [*] @@ -37,9 +37,9 @@ then don't change anything until the next step is done. (.gitignore SHOULD avoid uploading the large files created here...) -12. Create a new release on GitHub and upload the FIVE files created here. Use tag v2.0.1 (etc.). +12. Create a new release on GitHub and upload the THREE files created here. Use tag v2.0.1 (etc.). Don't forget the "v" in the release tag. - Drag in this order: .egg, .tar.gz, .exe, no-corpus.egg, no-corpus.tar.gz + Drag in this order: .tar.gz, .exe, no-corpus.tar.gz Finish this before doing the next step, even though it looks like it could be done in parallel. @@ -71,7 +71,7 @@ ''' -Build and upload music21 in three formats: egg, exe, and tar. +Build and upload music21 in two formats: exe, and tar. Simply call from the command line. ''' @@ -81,12 +81,12 @@ class Distributor(object): def __init__(self): - self.fpEgg = None + #self.fpEgg = None self.fpWin = None self.fpTar = None self.buildNoCorpus = True - self.fpEggNoCorpus = None + #self.fpEggNoCorpus = None self.fpTarNoCorpus = None self.version = base.VERSION_STR @@ -107,7 +107,7 @@ def _initPaths(self): self.fpDistDir = directory self.fpPackageDir = parentDir # dir with setup.py self.fpBuildDir = os.path.join(self.fpPackageDir, 'build') - self.fpEggInfo = os.path.join(self.fpPackageDir, 'music21.egg-info') + #self.fpEggInfo = os.path.join(self.fpPackageDir, 'music21.egg-info') sys.path.insert(0, parentDir) # to get setup in as a possibility. @@ -122,9 +122,9 @@ def updatePaths(self): contents = os.listdir(self.fpDistDir) for fn in contents: fp = os.path.join(self.fpDistDir, fn) - if self.version in fn and fn.endswith('.egg'): - self.fpEgg = fp - elif self.version in fn and fn.endswith('.exe'): + #if self.version in fn and fn.endswith('.egg'): + # self.fpEgg = fp + if self.version in fn and fn.endswith('.exe'): fpNew = fp.replace('.macosx-10.8-intel.exe', '.win32.exe') fpNew = fpNew.replace('.macosx-10.8-x86_64.exe', '.win32.exe') fpNew = fpNew.replace('.macosx-10.5-x86_64.exe', '.win32.exe') @@ -143,8 +143,8 @@ def updatePaths(self): elif self.version in fn and fn.endswith('.tar.gz'): self.fpTar = fp - environLocal.warn('giving paths for egg, exe, and tar.gz/zip, respectively:') - for fn in [self.fpEgg, self.fpWin, self.fpTar]: + environLocal.warn('giving paths for exe, and tar.gz/zip, respectively:') + for fn in [self.fpWin, self.fpTar]: if fn == None: environLocal.warn('missing fn path') else: @@ -152,7 +152,7 @@ def updatePaths(self): def removeCorpus(self, fp): ''' - Remove the corpus from a compressed file (.tar.gz or .egg) and + Remove the corpus from a compressed file (.tar.gz) and create a new music21-noCorpus version. Return the completed file path of the newly created edition. @@ -160,13 +160,13 @@ def removeCorpus(self, fp): NOTE: this function works only with Posix systems. ''' TAR = 'TAR' - EGG = 'EGG' + #EGG = 'EGG' if fp.endswith('.tar.gz'): mode = TAR modeExt = '.tar.gz' - elif fp.endswith('.egg'): - mode = EGG - modeExt = '.egg' + #elif fp.endswith('.egg'): + # mode = EGG + # modeExt = '.egg' else: raise Exception('incorrect source file path') @@ -197,11 +197,11 @@ def removeCorpus(self, fp): tf.extractall(path=fpDir) os.system('mv %s %s' % (fpSrcDir, fpDstDir)) - elif mode == EGG: - os.system('mkdir %s' % fpDstDir) - # need to create dst dir to unzip into - tf = zipfile.ZipFile(fp, 'r') - tf.extractall(path=fpDstDir) + #elif mode == EGG: + # os.system('mkdir %s' % fpDstDir) + # # need to create dst dir to unzip into + # tf = zipfile.ZipFile(fp, 'r') + # tf.extractall(path=fpDstDir) tf.close() # done after extraction @@ -210,15 +210,15 @@ def removeCorpus(self, fp): fp = os.path.join(fpDstDir, 'music21', 'corpus', fn) os.system('rm -r %s' % fp) - fp = os.path.join(fpDstDir, 'music21', 'corpus', 'metadataCache') + fp = os.path.join(fpDstDir, 'music21', 'corpus', '_metadataCache') os.system('rm -r %s' % fp) # adjust the sources Txt file if mode == TAR: sourcesTxt = os.path.join(fpDstDir, 'music21.egg-info', 'SOURCES.txt') - elif mode == EGG: - sourcesTxt = os.path.join(fpDstDir, 'EGG-INFO', 'SOURCES.txt') + #elif mode == EGG: + # sourcesTxt = os.path.join(fpDstDir, 'EGG-INFO', 'SOURCES.txt') # files will look like 'music21/corpus/haydn' in SOURCES.txt post = [] @@ -246,10 +246,10 @@ def removeCorpus(self, fp): # just name of dir cmd = 'tar -C %s -czf %s %s/' % (fpDir, fpDst, fnDstDir) os.system(cmd) - elif mode == EGG: - # zip and name with egg: give dst, then source - cmd = 'cd %s; zip -r %s %s' % (fpDir, fnDst, fnDstDir) - os.system(cmd) + #elif mode == EGG: + # # zip and name with egg: give dst, then source + # cmd = 'cd %s; zip -r %s %s' % (fpDir, fnDst, fnDstDir) + # os.system(cmd) # remove directory that was compressed if os.path.exists(fpDstDir): @@ -267,7 +267,7 @@ def build(self): ''' # call setup.py #import setup # -- for some reason does not work unless called from command line - for buildType in ['bdist_egg', + for buildType in [#'bdist_egg', 'bdist_wininst', 'sdist --formats=gztar' ]: @@ -291,26 +291,26 @@ def build(self): self.updatePaths() #exit() # remove build dir, egg-info dir - environLocal.warn('removing %s (except on windows...do it yourself)' % self.fpEggInfo) - os.system('rm -r %s' % self.fpEggInfo) + #environLocal.warn('removing %s (except on windows...do it yourself)' % self.fpEggInfo) + #os.system('rm -r %s' % self.fpEggInfo) environLocal.warn('removing %s (except on windows...do it yourself)' % self.fpBuildDir) os.system('rm -r %s' % self.fpBuildDir) if self.buildNoCorpus is True: # create no corpus versions self.fpTarNoCorpus = self.removeCorpus(fp=self.fpTar) - self.fpEggNoCorpus = self.removeCorpus(fp=self.fpEgg) - - - def uploadPyPi(self): - ''' - Upload source package to PyPI -- currently source file is too big for PyPi...sigh... - ''' - environLocal.warn('putting bdist_egg on pypi -- looks redundant, but we have to do it again') - savePath = os.getcwd() - os.chdir(self.fpPackageDir) - os.system('%s setup.py bdist_egg upload' % PY) - os.chdir(savePath) + #self.fpEggNoCorpus = self.removeCorpus(fp=self.fpEgg) + + +# def uploadPyPi(self): +# ''' +# Upload source package to PyPI -- currently source file is too big for PyPi...sigh... +# ''' +# environLocal.warn('putting bdist_egg on pypi -- looks redundant, but we have to do it again') +# savePath = os.getcwd() +# os.chdir(self.fpPackageDir) +# os.system('%s setup.py bdist_egg upload' % PY) +# os.chdir(savePath) #os.system('cd %s; %s setup.py bdist_egg upload' % # (self.fpPackageDir, PY)) diff --git a/music21/_version.py b/music21/_version.py index 7ffdc047e7..727819c251 100644 --- a/music21/_version.py +++ b/music21/_version.py @@ -44,6 +44,6 @@ Changing this number invalidates old pickles -- do it if the old pickles create a problem. ''' -__version_info__ = (2, 0, 12) +__version_info__ = (2, 1, 0) __version__ = '.'.join(str(x) for x in __version_info__) diff --git a/music21/analysis/correlate.py b/music21/analysis/correlate.py index 2f7ea0972e..9aa81bd91a 100644 --- a/music21/analysis/correlate.py +++ b/music21/analysis/correlate.py @@ -10,9 +10,6 @@ #------------------------------------------------------------------------------- ''' Various tools and utilities to find correlations between disparate objects in a Stream. - -See the chapter :ref:`overviewFormats` for more information and examples of -converting formats into and out of music21. ''' diff --git a/music21/analysis/metrical.py b/music21/analysis/metrical.py index b1b327e92c..42efc51d35 100644 --- a/music21/analysis/metrical.py +++ b/music21/analysis/metrical.py @@ -12,7 +12,8 @@ ''' Various tools and utilities for doing metrical or rhythmic analysis. -See the chapter :ref:`overviewMeters` for more information on defining +See the chapter :ref:`User's Guide Chapter 14: Time Signatures ` +for more information on defining metrical structures in music21. ''' from music21 import stream diff --git a/music21/base.py b/music21/base.py index a31b6f7e65..67514f039d 100644 --- a/music21/base.py +++ b/music21/base.py @@ -28,7 +28,7 @@ >>> music21.VERSION_STR -'2.0.12' +'2.1.0' Alternatively, after doing a complete import, these classes are available under the module "base": diff --git a/music21/documentation/make.py b/music21/documentation/make.py index c91bf0f845..0f8fa0d044 100644 --- a/music21/documentation/make.py +++ b/music21/documentation/make.py @@ -31,7 +31,7 @@ def __init__(self, command='html'): self.cpus_to_use = max(1, multiprocessing.cpu_count() - 1) # @UndefinedVariable if self.cpus_to_use == 1: self.useMultiprocessing = False - + self.useMultiprocessing = False # too unstable still self.documentationDirectoryPath = None self.autogenDirectoryPath = None self.buildDirectoryPath = None diff --git a/music21/documentation/source/about/faq.rst b/music21/documentation/source/about/faq.rst index 02f63389df..ed1c61a89c 100644 --- a/music21/documentation/source/about/faq.rst +++ b/music21/documentation/source/about/faq.rst @@ -59,7 +59,8 @@ Can I synthesize new sounds with music21? I'm ready to give it a try, but how do I install `music21`? - Please see the complete install instructions: :ref:`install`. + Please see the complete install instructions: + :ref:`Installing music21 `. `Music21` doesn't have some feature that I need, how do I get it added? diff --git a/music21/documentation/source/developerReference/usingGit.rst b/music21/documentation/source/developerReference/usingGit.rst index bdc9bb454e..d06b025f4f 100644 --- a/music21/documentation/source/developerReference/usingGit.rst +++ b/music21/documentation/source/developerReference/usingGit.rst @@ -329,7 +329,7 @@ packages, type ``no`` and press Enter. :width: 650 See :ref:`environment` for more information on configuring user settings. -Otherwise, head to: :ref:`usersGuide_00_introduction` for further demos and +Otherwise, head to: :ref:`What is Music21? ` for further demos and tutorials on using music21. diff --git a/music21/documentation/source/installing/installAdditional.rst b/music21/documentation/source/installing/installAdditional.rst index 05ae793fd9..071539ccf4 100644 --- a/music21/documentation/source/installing/installAdditional.rst +++ b/music21/documentation/source/installing/installAdditional.rst @@ -164,4 +164,4 @@ as well. In addition, the SVN features of Eclipse let you stay updated with the latest versions of music21. Eclipse + PyDev + Git is the only supported method for developers to contribute to music21. -Details are at :ref:`usingEclipse` and :ref:`usingGit` +Details are at :ref:`usingGit` diff --git a/music21/documentation/source/installing/installLinux.rst b/music21/documentation/source/installing/installLinux.rst index f83289b007..4e07c2c48e 100644 --- a/music21/documentation/source/installing/installLinux.rst +++ b/music21/documentation/source/installing/installLinux.rst @@ -12,14 +12,6 @@ maintainers can only help with music21-specific problems post installation or Mac/PC problems. -Alternative Installation Methods ----------------------------------------------- - -The following instructions are for general users. If you are an advanced user -and have installed other Python packages before, or want to use an EGG, SVN, PIP3, -or setuptools, you should read :ref:`installAdvanced`. - - Check Your Version of Python ---------------------------------------------- @@ -61,7 +53,8 @@ Installing Music21 with setup.py First, uncompress the .tar.gz file. -Open a shell or terminal, enter the outer-most music21 directory, and use `python` to execute the setup.py file with the 'install' argument: :: +Open a shell or terminal, enter the outer-most music21 directory, and use `python` +to execute the setup.py file with the 'install' argument: :: $ cd /path/to/dir/music21-version $ python setup.py install @@ -93,7 +86,7 @@ http://docs.python.org/using/cmdline.html#envvar-PYTHONPATH After Installation ------------------------------- -After a successful installation, you may proceed to :ref:`usersGuide_01_Installing` to +After a successful installation, you may proceed to :ref:`Notes usersGuide_02_notes` to begin using `music21`. diff --git a/music21/documentation/source/installing/installMac.rst b/music21/documentation/source/installing/installMac.rst index 950f441b67..fb71c50e0f 100644 --- a/music21/documentation/source/installing/installMac.rst +++ b/music21/documentation/source/installing/installMac.rst @@ -25,6 +25,11 @@ comes up, just follow the instructions below *carefully* and you shouldn't have any problems. +To upgrade later, just do + + sudo pip install --upgrade music21 + + Starting Python and Checking the Version ---------------------------------------------- @@ -179,7 +184,7 @@ and `music21-2.0.0` folder from your desktop now. Open up the Mac Terminal (under Applications/Utilities/Terminal). You might want to drag it to the dock. You'll use it often. -After a successful installation, you may proceed to :ref:`usersGuide_01_Installing` to +After a successful installation, you may proceed to :ref:`Notes ` to begin using music21. diff --git a/music21/documentation/source/installing/installWindows.rst b/music21/documentation/source/installing/installWindows.rst index 029222f624..bd453c8878 100644 --- a/music21/documentation/source/installing/installWindows.rst +++ b/music21/documentation/source/installing/installWindows.rst @@ -78,8 +78,8 @@ and then restarting from scratch). After Installation ------------------------------- -After a successful installation, you may proceed to :ref:`usersGuide_01_Installing` to -begin using music21. +After a successful installation, you may proceed to :ref:`Notes ` +to begin using music21. diff --git a/music21/documentation/source/tutorials/graphing.rst b/music21/documentation/source/tutorials/graphing.rst index 770db3ccf0..45e85ecb94 100644 --- a/music21/documentation/source/tutorials/graphing.rst +++ b/music21/documentation/source/tutorials/graphing.rst @@ -321,8 +321,8 @@ and which notes are not:: >>> majorScale = [0, 2, 4, 5, 7, 9, 11] >>> for pitchClass in range(12): ... n = note.Note() - ... n.pitchClass = pitchClass - ... frequency = n.frequency + ... n.pitch.pitchClass = pitchClass + ... frequency = n.pitch.frequency ... for scale in data.keys(): ... if (pitchClass - scale) % 12 in majorScale: ... data[scale].append((pitchClass, frequency)) diff --git a/music21/mei/base.py b/music21/mei/base.py index 86e927c687..c0f6506694 100644 --- a/music21/mei/base.py +++ b/music21/mei/base.py @@ -344,10 +344,11 @@ def safePitch(name, accidental=None, octave=''): def makeDuration(base=0.0, dots=0): ''' - Given a ``base`` duration and a number of ``dots``, create a :class:`Duration` instance with the + Given a ``base`` duration and a number of ``dots``, create a :class:`~music21.duration.Duration` + instance with the appropriate ``quarterLength`` value. - :param number base: The base duration that will be augmented. + :param float base: The base duration that will be augmented. :param int dots: The number of dots with which to augment the ``base`` duration. :returns: A :class:`Duration` corresponding to the fully-augmented value. :rtype: :class:`music21.duration.Duration` @@ -2706,8 +2707,8 @@ def measureFromElement(elem, backupNum, expectedNs, slurBundle=None, activeMeter :param elem: The ```` element to process. :type elem: :class:`~xml.etree.ElementTree.Element` - :param int backupNum: A fallback value for the resulting :class:`Measure` objects' ``number`` - attribute. + :param int backupNum: A fallback value for the resulting :class:`~music21.measure.Measure` objects' + number attribute. :param expectedNs: A list of the expected @n attributes for the tags in this . If an expected isn't in the , it will be created with a full-measure rest. :type expectedNs: iterable of str diff --git a/music21/meter.py b/music21/meter.py index 4806d00dc1..aabf0cc775 100644 --- a/music21/meter.py +++ b/music21/meter.py @@ -2655,7 +2655,10 @@ class TimeSignature(base.Music21Object): >>> tsCut.symbol 'cut' - For complete details on using this object, see :ref:`overviewMeters`. + For complete details on using this object, see + :ref:`User's Guide Chapter 14: Time Signatures ` and + :ref:`User's Guide Chapter 55: Advanced Meter ` and + That's it for the simple aspects of `TimeSignature` objects. You know enough to get started now!