diff --git a/.github/workflows/test2.yml b/.github/workflows/test2.yml index 50ecefd..5035886 100644 --- a/.github/workflows/test2.yml +++ b/.github/workflows/test2.yml @@ -81,9 +81,12 @@ jobs: python test-rec.py -o test-rec--windows-${{ matrix.install-method }}.wav python test-dependencies.py python test-notation.py -o 'test-notation-${{ matrix.os }}-${{ matrix.install-method }}-${{ matrix.python-version }}.pdf' + python test-notation.py -o 'test-notation-${{ matrix.os }}-${{ matrix.install-method }}-${{ matrix.python-version }}.png' + cp *.wav ../artifacts cp *.pdf ../artifacts - + cp *.png ../artifacts + # new tests python test-clip-chords.py python rosita-centroid.py diff --git a/maelzel/scoring/renderlily.py b/maelzel/scoring/renderlily.py index 2e27cb6..9602f75 100644 --- a/maelzel/scoring/renderlily.py +++ b/maelzel/scoring/renderlily.py @@ -21,6 +21,7 @@ from maelzel.textstyle import TextStyle from maelzel._indentedwriter import IndentedWriter from maelzel import _util +from maelzel import _imgtools from .common import * from . import attachment from . import definitions @@ -147,7 +148,7 @@ def lyNote(pitch: pitch_t, baseduration: int, dots: int = 0, tied=False, caution def markConsecutiveGracenotes(root: Node) -> None: - """ + r""" Marks consecutive gracenotes by setting their 'graceGroup' attribute inplace This is needed in lilypond since groups of gracenotes need to @@ -191,7 +192,7 @@ def lyArticulation(articulation: attachment.Articulation) -> str: def lyNotehead(notehead: definitions.Notehead, insideChord=False) -> str: - """ + r""" Convert a scoring Notehead to its lilypond representation This uses ``\override`` so it can't be placed inside a chord @@ -947,7 +948,7 @@ def makeScore(score: quant.QuantizedScore, options: RenderOptions, midi=False ) -> str: - """ + r""" Convert a list of QuantizedParts to a lilypond score (as str) Args: @@ -1151,14 +1152,14 @@ def write(self, outfile: str, fmt: str = None, removeTemporaryFiles=False) -> No elif options.cropToContent: cropfile = f"{tempbase}.cropped.{fmt}" if os.path.exists(cropfile): - logger.debug(f"Found crop file {cropfile}, using that as output") + logger.debug(f"Found crop file '{cropfile}', using that as output") tempout = cropfile else: - logger.debug(f"Asked to generate a crop file, but the file {cropfile} " - f"was not found.") + logger.debug(f"Asked to generate a crop file, but the file '{cropfile}' " + f"was not found. Outfile: {outfile}") if fmt == 'png': logger.debug("Trying to generate cropped file via pillow") - _util.imagefileAutocrop(tempout, cropfile, bgcolor="#ffffff") + _imgtools.imagefileAutocrop(tempout, cropfile, bgcolor="#ffffff") if not os.path.exists(cropfile): logger.debug("Faild to generate crop file, aborting")