Skip to content

Clean up persist.py #1601

@trevorbaca

Description

@trevorbaca

For LilyPond file persistence:

OLD: abjad.persist.ly(..., tags=False)
NEW: abjad.persist.ly(..., keep_tags=False)
OLD: abjad.persist.ly(..., **keywords)
NEW: abjad.persist.ly(..., **illustrate_keywords)
OLD: abjad.persist.ly() returned pair of ly_file_path and Abjad format time in seconds
NEW: abjad.persist.ly() returns only Abjad format time in seconds

For MIDI persistence:

OLD: abjad.persist.as_midi(..., flags="")
NEW: abjad.persist.as_midi(..., lilypond_flags="")
OLD: abjad.persist.as_midi(..., **keywords)
NEW: abjad.persist.as_midi(..., **illustrate_keywords)
OLD: abjad.persist.as_midi() returned 4-tuple:
    * pdf_file_path to which PDF was written
    * Abjad format time in seconds
    * LilyPond render time in seconds
    * abjad.io.run_lilypond() exit code
NEW: abjad.persist.as_midi() returns triple:
    * Abjad format time in seconds
    * LilyPond render time in seconds
    * abjad.io.run_lilypond() exit code

For PDF persistence:

OLD: abjad.persist.as_pdf(..., flags="")
NEW: abjad.persist.as_pdf(..., lilypond_flags="")
OLD: abjad.persist.pdf(..., tags=False)
NEW: abjad.persist.pdf(..., keep_tags=False)
OLD: abjad.persist.pdf(argument, "/path/to/file") wrote /path/to/file.pdf with (implicitly added) .pdf extension
NEW: abjad.persist.pdf(argument, "/path/to/file") raises an exception; use "/path/to/file.pdf" instead
OLD: abjad.persist.pdf(..., **keywords)
NEW: abjad.persist.pdf(..., **illustrate_keywords)
OLD: abjad.persist.as_pdf() returned 4-tuple:
    * pdf_file_path to which PDF was written
    * Abjad format time in seconds
    * LilyPond render time in seconds
    * abjad.io.run_lilypond() exit code
NEW: abjad.persist.as_pdf() returns triple:
    * Abjad format time in seconds
    * LilyPond render time in seconds
    * abjad.io.run_lilypond() exit code

For PNG persistence:

OLD: abjad.persist.as_png(..., flags="")
NEW: abjad.persist.as_png(..., lilypond_flags="")
OLD: abjad.persist.png(..., tags=False)
NEW: abjad.persist.png(..., keep_tags=False)
OLD: abjad.persist.png(..., **keywords)
NEW: abjad.persist.png(..., **illustrate_keywords)

In other modules:

OLD: abjad.lilypond(..., site_comments=False)
NEW: abjad.lilypond(..., keep_site_comments=False)
OLD: abjad.lilypond(..., tags=False)
NEW: abjad.lilypond(..., keep_tags=False)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions