Skip to content

Commit

Permalink
Merge pull request #816 from Abjad/release/2.20
Browse files Browse the repository at this point in the history
Abjad 2.20 Release PR
  • Loading branch information
josiah-wolf-oberholtzer authored May 4, 2017
2 parents d25b0c4 + bb05ebe commit 80a1d57
Show file tree
Hide file tree
Showing 20 changed files with 446 additions and 407 deletions.
7 changes: 3 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Once you have Abjad installed, fire up Python and import it:
Type "help", "copyright", "credits" or "license" for more information.
>>> import abjad
>>> abjad.__version__
'2.20'
'2.19'
Congratulations!

Expand All @@ -107,7 +107,7 @@ command-line by running the following command:
.. code-block:: bash
~$ lilypond --version
GNU LilyPond 2.19.44
GNU LilyPond 2.19.20
Copyright (c) 1996--2015 by
Han-Wen Nienhuys <hanwen@xs4all.nl>
Expand Down Expand Up @@ -166,8 +166,7 @@ command-line by running the following command:
dot - graphviz version 2.38.0 (20140413.2041)
All of the graph images in Abjad's API documentation were created via
`graphviz`_. See `topleveltools.graph()` for more
details.
`graphviz`_. See `topleveltools.graph()` for more details.

Development installation
------------------------
Expand Down
2 changes: 1 addition & 1 deletion abjad/docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,4 @@ Miscellaneous information
.. _Sphinx: http://sphinx-doc.org/
.. _Trevor Bača: http://www.trevorbaca.com/
.. _pip: https://pip.pypa.io/en/stable/
.. _CCRMA Summer Workshop: https://ccrma.stanford.edu/workshops/abjad
.. _CCRMA Summer Workshop: https://ccrma.stanford.edu/workshops/abjad-2017
40 changes: 40 additions & 0 deletions abjad/etc/packaging/packaging_transcript.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
Abjad 2.20
Build start date: 2017-05-03
Build complete date:

Packaging environment:
0. workstation description:
1. uname -v: Darwin Kernel Version 16.5.0
2. git --version: git version 2.6.3
3. python --version: Python 3.5.2
4. pip --version: pip 8.1.2
5. py.test --version: This is pytest version 3.0.7
6. sphinx-build --version: Sphinx (sphinx-build) 1.5.5
7. lilypond --version: GNU LilyPond 2.19.44
8. convert --version: ImageMagick 7.0.2-1 Q16 x86_64 2016-06-12 http://www.imagemagick.org
9. dot -V: graphviz version 2.38.0 (20140413.2041)

Python 3.5.2 (OSX) test results:
1. mainline py.test test results: 9666 passed, 518 skipped
2. mainline doctest test results: 15110 passed in 843 modules
3. experimental py.test test results: 3 passed, 0 skipped
4. experimental doctest test results: 120 passed, 0 failed
5. sanity check test results: OK
6. experimental HTML build results: OK
7. mainline HTML build results: OK

Python 3.5.2 (Windows) test results:
1. mainline py.test test results: 9664 passed, 520 skipped
2. mainline doctest test results: 15110 passed in 843 modules
3. experimental py.test test results: 3 passed, 0 skipped
4. experimental doctest test results: 120 passed, 0 failed
5. sanity check test results: OK

Python 2.7.12 (OSX) test results:
1. mainline py.test test results: 9651 passed, 519 skipped
2. mainline doctest test results: 15110 passed in 843 modules
3. experimental py.test test results: 3 passed, 0 skipped
4. experimental doctest test results: 120 passed, 0 failed
5. sanity check test results: OK


Abjad 2.19
Build start date: 2016-10-21
Build complete date: 2016-10-22
Expand Down
40 changes: 20 additions & 20 deletions abjad/tools/agenttools/LabelAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,25 @@ def client(self):

### PUBLIC METHODS ###

def color_alternating(self, colors=['red', 'blue']):
r'''Colors client items in alternating `colors`.
Returns none.
'''
import abjad
colors = abjad.CyclicTuple(colors)
if isinstance(self._client, abjad.Component):
target = [self._client]
elif isinstance(self._client, abjad.selectiontools.LogicalTie):
target = [self._client]
elif isinstance(self._client, abjad.Selection):
target = self._client
else:
raise TypeError(self._client)
for i, item in enumerate(target):
color = colors[i]
abjad.label(item).color_leaves(color=color)

def color_container(self, color='red'):
r'''Colors contents of `container`.
Expand Down Expand Up @@ -659,25 +678,6 @@ def color_note_heads(self, color_map=None):
if color is not None:
override(leaf).note_head.color = color

def color_alternating(self, colors=['red', 'blue']):
r'''Colors client items in alternating `colors`.
Returns none.
'''
import abjad
colors = abjad.CyclicTuple(colors)
if isinstance(self._client, abjad.Component):
target = [self._client]
elif isinstance(self._client, abjad.selectiontools.LogicalTie):
target = [self._client]
elif isinstance(self._client, abjad.Selection):
target = self._client
else:
raise TypeError(self._client)
for i, item in enumerate(target):
color = colors[i]
abjad.label(item).color_leaves(color=color)

def remove_markup(self):
r'''Removes markup from leaves.
Expand Down Expand Up @@ -3801,7 +3801,7 @@ def with_set_classes(self, direction=Up, prototype=None):
}
.. container:: example expression
::
>>> string = "df''8 c''8 bf'8 a'8 f'4. fs'8 g'8 b'8 d''2."
Expand Down
90 changes: 45 additions & 45 deletions abjad/tools/expressiontools/Expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,14 @@ def _make___radd___markup_expression(argument):
def _make___radd___string_template(argument):
return str(argument) + ' + {}'

def _make_evaluable_keywords(self, keywords):
result = {}
for key, value in keywords.items():
if isinstance(value, type):
value = self._to_evaluable_string(value)
result[key] = value
return result

# TODO: eventually do not pass frame
@staticmethod
def _make_function_markup_expression(
Expand Down Expand Up @@ -975,51 +983,6 @@ def _make_function_string_template(
template = method_name + '({})'
return template

@staticmethod
def _make_operator_markup_expression(
method_name=None,
subscript=None,
superscript=None,
):
from abjad.tools import markuptools
expression = Expression()
expression = expression.markup()
expression = expression.wrap_in_list()
expression = expression.markup_list()
expression = expression.insert(0, method_name)
if superscript is not None:
superscript = markuptools.Markup(str(superscript))
superscript = superscript.super()
expression = expression.insert(1, superscript)
if subscript is not None:
subscript = markuptools.Markup(str(subscript))
subscript = subscript.sub()
expression = expression.insert(1, subscript)
expression = expression.concat()
return expression

@staticmethod
def _make_operator_string_template(
method_name=None,
subscript=None,
superscript=None,
):
template = method_name
if superscript is not None:
template += str(superscript)
if subscript is not None:
template += str(subscript)
template += '({})'
return template

def _make_evaluable_keywords(self, keywords):
result = {}
for key, value in keywords.items():
if isinstance(value, type):
value = self._to_evaluable_string(value)
result[key] = value
return result

def _make_globals(self):
import abjad
globals_ = {'abjad': abjad}
Expand Down Expand Up @@ -1063,6 +1026,43 @@ def _make_initializer_callback(
string_template=string_template,
)

@staticmethod
def _make_operator_markup_expression(
method_name=None,
subscript=None,
superscript=None,
):
from abjad.tools import markuptools
expression = Expression()
expression = expression.markup()
expression = expression.wrap_in_list()
expression = expression.markup_list()
expression = expression.insert(0, method_name)
if superscript is not None:
superscript = markuptools.Markup(str(superscript))
superscript = superscript.super()
expression = expression.insert(1, superscript)
if subscript is not None:
subscript = markuptools.Markup(str(subscript))
subscript = subscript.sub()
expression = expression.insert(1, subscript)
expression = expression.concat()
return expression

@staticmethod
def _make_operator_string_template(
method_name=None,
subscript=None,
superscript=None,
):
template = method_name
if superscript is not None:
template += str(superscript)
if subscript is not None:
template += str(subscript)
template += '({})'
return template

@staticmethod
def _make_subscript_string(i, markup=False):
if isinstance(i, int):
Expand Down
22 changes: 11 additions & 11 deletions abjad/tools/indicatortools/LilyPondCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,17 @@ def _contents_repr_string(self):

### PRIVATE METHODS ###

def _get_format_specification(self):
names = []
if not self.format_slot == 'opening':
names.append('format_slot')
return systemtools.FormatSpecification(
client=self,
storage_format_args_values=[self.name],
storage_format_kwargs_names=names,
storage_format_is_indented=False,
)

def _get_lilypond_format(self):
command = self._name
if command.startswith('#'):
Expand All @@ -106,17 +117,6 @@ def _get_lilypond_format_bundle(self, component=None):
format_slot.commands.append(self._get_lilypond_format())
return lilypond_format_bundle

def _get_format_specification(self):
names = []
if not self.format_slot == 'opening':
names.append('format_slot')
return systemtools.FormatSpecification(
client=self,
storage_format_args_values=[self.name],
storage_format_kwargs_names=names,
storage_format_is_indented=False,
)

### PUBLIC METHODS ###

@staticmethod
Expand Down
20 changes: 10 additions & 10 deletions abjad/tools/indicatortools/LilyPondLiteral.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ def _contents_repr_string(self):

### PRIVATE METHODS ###

def _get_lilypond_format(self):
return self._name

def _get_lilypond_format_bundle(self, component=None):
from abjad.tools import systemtools
lilypond_format_bundle = systemtools.LilyPondFormatBundle()
format_slot = lilypond_format_bundle.get(self.format_slot)
format_slot.commands.append(self._get_lilypond_format())
return lilypond_format_bundle

def _get_format_specification(self):
names = []
if not self.format_slot == 'opening':
Expand All @@ -105,6 +95,16 @@ def _get_format_specification(self):
storage_format_is_indented=False,
)

def _get_lilypond_format(self):
return self._name

def _get_lilypond_format_bundle(self, component=None):
from abjad.tools import systemtools
lilypond_format_bundle = systemtools.LilyPondFormatBundle()
format_slot = lilypond_format_bundle.get(self.format_slot)
format_slot.commands.append(self._get_lilypond_format())
return lilypond_format_bundle

### PUBLIC METHODS ###

@staticmethod
Expand Down
24 changes: 12 additions & 12 deletions abjad/tools/indicatortools/TimeSignature.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,18 @@ def _contents_repr_string(self):

### PRIVATE METHODS ###

def _get_format_specification(self):
storage_format_is_indented = False
if self.partial is not None or self.suppress is not None:
storage_format_is_indented = True
return systemtools.FormatSpecification(
client=self,
repr_is_indented=False,
storage_format_args_values=[self.pair],
storage_format_kwargs_names=['partial', 'suppress'],
storage_format_is_indented=storage_format_is_indented,
)

def _get_lilypond_format(self):
if self.suppress:
return []
Expand All @@ -374,18 +386,6 @@ def _get_lilypond_format(self):
result.append(string)
return result

def _get_format_specification(self):
storage_format_is_indented = False
if self.partial is not None or self.suppress is not None:
storage_format_is_indented = True
return systemtools.FormatSpecification(
client=self,
repr_is_indented=False,
storage_format_args_values=[self.pair],
storage_format_kwargs_names=['partial', 'suppress'],
storage_format_is_indented=storage_format_is_indented,
)

### PUBLIC PROPERTIES ###

@property
Expand Down
24 changes: 12 additions & 12 deletions abjad/tools/ipythontools/Play.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ def __call__(self, argument):

### PRIVATE METHODS ###

def _check_for_vorbis(self):
has_vorbis = False
output = subprocess.check_output('timidity --help', shell=True)
if sys.version_info[0] == 3:
output = output.decode('utf-8')
for line in output.splitlines():
for part in line.split():
if part == '-Ov':
has_vorbis = True
break
return has_vorbis

def _display_audio_tag(self, encoded_audio, has_vorbis):
from IPython.core.display import display_html
if has_vorbis:
Expand Down Expand Up @@ -86,15 +98,3 @@ def _get_base64_from_file(self, file_name):
with open(file_name, 'rb') as file_pointer:
data = file_pointer.read()
return base64.b64encode(data).decode('utf-8')

def _check_for_vorbis(self):
has_vorbis = False
output = subprocess.check_output('timidity --help', shell=True)
if sys.version_info[0] == 3:
output = output.decode('utf-8')
for line in output.splitlines():
for part in line.split():
if part == '-Ov':
has_vorbis = True
break
return has_vorbis
Loading

0 comments on commit 80a1d57

Please sign in to comment.