Skip to content

Commit

Permalink
Merge pull request #775 from Abjad/release/2.19
Browse files Browse the repository at this point in the history
2.19 Release PR
  • Loading branch information
josiah-wolf-oberholtzer authored Oct 23, 2016
2 parents 5a15d9f + cf19c40 commit f6b135e
Show file tree
Hide file tree
Showing 10 changed files with 153 additions and 82 deletions.
13 changes: 7 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##########
Abjad 2.18
Abjad 2.19
##########

Abjad helps composers build up complex pieces of music notation in an iterative
Expand Down Expand Up @@ -79,13 +79,13 @@ Once you have Abjad installed, fire up Python and import it:

.. code-block:: bash
$ python
Python 2.7.9 (default, Nov 9 2015, 10:50:36)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
~$ python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import abjad
>>> abjad.__version__
'2.16'
'2.19'
Congratulations!

Expand Down Expand Up @@ -166,7 +166,8 @@ 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 the API entry for `topleveltools.graph()` for more details.
`graphviz`_. See `topleveltools.graph()` for more
details.

Development installation
------------------------
Expand Down
6 changes: 5 additions & 1 deletion abjad/docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import sys
import sphinx_rtd_theme
from sphinx.highlighting import PygmentsBridge
from pygments.formatters.latex import LatexFormatter
Expand Down Expand Up @@ -105,5 +106,8 @@ def __init__(self, **options):
autodoc_member_order = 'groupwise'
graphviz_dot_args = ['-s32']
graphviz_output_format = 'svg'
intersphinx_mapping = {'python': ('http://docs.python.org/3.4', None)}
intersphinx_mapping = {
'python': (
'http://docs.python.org/{}.{}'.format(*sys.version_info[:2]), None),
}
todo_include_todos = True
8 changes: 4 additions & 4 deletions abjad/docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ Once you have Abjad installed, fire up Python and import it:

.. code-block:: bash
$ python
Python 2.7.9 (default, Nov 9 2015, 10:50:36)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
~$ python
Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import abjad
>>> abjad.__version__
'2.16'
'2.19'
Congratulations!

Expand Down
69 changes: 35 additions & 34 deletions abjad/etc/packaging/packaging_checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,21 @@ Abjad packaging checklist:
systemtools.IOManager.open_last_log()
systemtools.IOManager.open_last_pdf()
Then run '''play(Note("c'4"))'''.
Then run '''graph(Staff("c'4"))'''.
If any test fails, fix, commit and go back to (7.)
Record sanity check test results in the packaging transcript.

11. Change to the abjad/etc/optimization directory.
Create a v2.x optimization transcript by copying the most recent such file.
Record memory usage and profiling test results in the
optimization transcript.
#11. Change to the abjad/etc/optimization directory.
# Create a v2.x optimization transcript by copying the most recent such file.
# Record memory usage and profiling test results in the
# optimization transcript.

12. Run "svn info".
Note the current revision of the working copy you are packaging.
Open docs/source/start_here/versions/index.rst again.
Check the release date indicated there.
Check the revision number indicated there.
Make sure the revision number equals current revision + 1.
#12. Run "svn info".
# Note the current revision of the working copy you are packaging.
# Open docs/source/start_here/versions/index.rst again.
# Check the release date indicated there.
# Check the revision number indicated there.
# Make sure the revision number equals current revision + 1.

13. Author release notes:
Open docs/source/start_here/versions/index.rst.
Expand Down Expand Up @@ -156,44 +157,44 @@ Abjad packaging checklist:
Run "ajv api -M". If any errors occur, fix, commit and go back to (7.)
Record mainline HTML build results in the packaging transcript.

17. Run "make latex".
If any errors occur, fix, commit and go back to (7.)
Record LaTeX build results in the packaging transcript.
#17. Run "make latex".
# If any errors occur, fix, commit and go back to (7.)
# Record LaTeX build results in the packaging transcript.

18. Run "make latexpdf".
If any errors occur, fix, commit and go back to (7.)
Open the docs/build/latex/Abjad.pdf file that results.
Click around some to make sure everything looks OK.
Record Abjad.pdf build results in the packaging transcript.
Open the docs/build/latex/AbjadAPI.pdf file that also results.
Click around some to make sure everything looks OK.
Record AbjadAPI.pdf build results in the packaging transcript.
#18. Run "make latexpdf".
# If any errors occur, fix, commit and go back to (7.)
# Open the docs/build/latex/Abjad.pdf file that results.
# Click around some to make sure everything looks OK.
# Record Abjad.pdf build results in the packaging transcript.
# Open the docs/build/latex/AbjadAPI.pdf file that also results.
# Click around some to make sure everything looks OK.
# Record AbjadAPI.pdf build results in the packaging transcript.

19. Copy docs/build/latex/Abjad.pdf to docs/pdf/Abjad-x-y.pdf.
Copy docs/build/latex/AbjadAPI.pdf to docs/pdf/AbjadAPI-x-y.pdf.
Do both of these with 'cp' and not with 'svn cp'.
#19. Copy docs/build/latex/Abjad.pdf to docs/pdf/Abjad-x-y.pdf.
# Copy docs/build/latex/AbjadAPI.pdf to docs/pdf/AbjadAPI-x-y.pdf.
# Do both of these with 'cp' and not with 'svn cp'.

20. Add docs/pdf/Abajd-x-y.pdf to svn.
Add docs/pdf/AbjadAPI-x-y.pdf to svn.
#20. Add docs/pdf/Abajd-x-y.pdf to svn.
# Add docs/pdf/AbjadAPI-x-y.pdf to svn.

21. Remove docs/pdf/Abjad-x-(y-1).pdf from svn.
Remove docs/pdf/AbjadAPI-x-(y-1).pdf from svn.
#21. Remove docs/pdf/Abjad-x-(y-1).pdf from svn.
# Remove docs/pdf/AbjadAPI-x-(y-1).pdf from svn.

22. Commit.
All tests have now passed in the packaging environment.
All documentation has now built in the packaging environment.

23. For each additional test environment, repeat the following steps:
[2] documenting the test environment.
[5], [6], [7] recording py.test, doctest and sanity check test results.
[12], [13], [14] recording HTML, LaTeX & PDF build results.
#23. For each additional test environment, repeat the following steps:
# [2] documenting the test environment.
# [5], [6], [7] recording py.test, doctest and sanity check test results.
# [12], [13], [14] recording HTML, LaTeX & PDF build results.

24. Complete all addition platform testing.
Close and save the packaging transcript.
Commit.

25. Change to abjad/trunk.
Upgrade setuptools with "sudo pip install --upgrade setuptools".
#25. Change to abjad/trunk.
# Upgrade setuptools with "sudo pip install --upgrade setuptools".

26. Run 'python setup.py register sdist upload'
Follow the login instructions provided by PyPI.
Expand Down
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.19
Build start date: 2016-10-21
Build complete date: 2016-10-22

Packaging environment:
0. workstation description:
1. uname -v: Darwin Kernel Version 15.6.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.1
6. sphinx-build --version: Sphinx (sphinx-build) 1.4.4
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: 10193 passed, 527 skipped
2. mainline doctest test results: 12096 passed in 911 modules
3. experimental py.test test results: 3 passed, 0 skipped
4. experimental doctest test results: 120 passed in 43 modules
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: 10191 passed, 529 skipped
2. mainline doctest test results: 12096 passed in 911 modules
3. experimental py.test test results: 3 passed, 0 skipped
4. experimental doctest test results: 120 passed in 43 modules
5. sanity check test results:

Python 2.7.12 (OSX) test results:
1. mainline py.test test results: 10181 passed, 525 skipped
2. mainline doctest test results: 12096 passed in 911 modules
3. experimental py.test test results: 3 passed, 0 skipped
4. experimental doctest test results: 120 passed in 43 modules
5. sanity check test results: OK


Abjad 2.18
Build start date: 2016-07-04
Build complete date:
Expand Down
31 changes: 16 additions & 15 deletions abjad/scr/devel/make-packaging-transcript.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,30 @@
8. convert --version: {imagemagick_version}
9. dot -V: {graphviz_version}
Python 3.4.3 test results:
Python 3.5.2 (OSX) test results:
1. mainline py.test test results:
2. mainline doctest test results:
3. experimental py.test test results:
4. experimental doctest test results:
5. ide py.test test results:
6. ide doctest test results:
7. sanity check test results:
8. experimental HTML build results:
9. mainline HTML build results:
10. ide HTML build results:
11. LaTeX build results:
12. Abjad.pdf build results:
13. AbjadAPI.pdf build results:
Python 2.7.9 test results:
5. sanity check test results:
6. experimental HTML build results:
7. mainline HTML build results:
Python 3.5.2 (Windows) test results:
1. mainline py.test test results:
2. mainline doctest test results:
3. experimental py.test test results:
4. experimental doctest test results:
5. sanity check test results:
Python 2.7.12 (OSX) test results:
1. mainline py.test test results:
2. mainline doctest test results:
3. experimental py.test test results:
4. experimental doctest test results:
5. ide py.test test results:
6. ide doctest test results:
7. sanity check test results:
5. sanity check test results:
"""


Expand Down
9 changes: 6 additions & 3 deletions abjad/tools/expressiontools/Callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,13 @@ def __call__(self, *args, **kwargs):
Returns object.
'''
import abjad
import experimental
globals_ = {}
globals_.update(abjad.__dict__.copy())
globals_.update(experimental.__dict__.copy())
try:
import experimental
globals_.update(experimental.__dict__.copy())
except ImportError:
pass
globals_['functools'] = functools
module_names = self.module_names or ()
for module_name in module_names:
Expand Down Expand Up @@ -181,4 +184,4 @@ def name(self):
Returns string.
'''
return self._name
return self._name
41 changes: 24 additions & 17 deletions abjad/tools/systemtools/IOManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
from StringIO import StringIO
except ImportError:
from io import StringIO
try:
input = raw_input
except NameError:
pass


class IOManager(AbjadObject):
Expand All @@ -35,7 +39,7 @@ def _ensure_directory_existence(directory):
lines.append('Abjad will now create it to store all output files.')
lines.append('Press any key to continue.')
message = '\n'.join(lines)
raw_input(message)
input(message)
os.makedirs(directory)

@staticmethod
Expand Down Expand Up @@ -253,9 +257,10 @@ def get_last_output_file_name(
return
all_file_names = os.listdir(output_directory)
if extension:
all_output = [x for x in all_file_names
if pattern.match(x)
and x.endswith(extension)]
all_output = [
x for x in all_file_names
if pattern.match(x) and x.endswith(extension)
]
else:
all_output = [x for x in all_file_names if pattern.match(x)]
if all_output == []:
Expand Down Expand Up @@ -354,19 +359,25 @@ def open_file(file_path, application=None, line_number=None):
Returns none.
'''
from abjad import abjad_configuration
if os.name == 'nt':
if sys.platform.lower().startswith('win'):
os.startfile(file_path)
return
viewer = None
if sys.platform.lower().startswith('linux'):
viewer = application or 'xdg-open'
elif file_path.endswith('.pdf'):
viewer = application or abjad_configuration['pdf_viewer']
elif file_path.endswith('.py'):
viewer = application or abjad_configuration['text_editor']
elif file_path.endswith('.txt'):
elif file_path.endswith((
'.log',
'.py',
'.rst',
'.txt',
)):
viewer = application or abjad_configuration['text_editor']
elif file_path.endswith('.midi'):
elif file_path.endswith((
'.mid',
'.midi',
)):
viewer = application or abjad_configuration['midi_player']
viewer = viewer or 'open'
if line_number:
Expand All @@ -384,11 +395,8 @@ def open_last_log():
'''
from abjad import abjad_configuration
text_editor = abjad_configuration.get_text_editor()
command = '{} {}'.format(
text_editor,
abjad_configuration.lilypond_log_file_path,
)
IOManager.spawn_subprocess(command)
file_path = abjad_configuration.lilypond_log_file_path
IOManager.open_file(file_path, application=text_editor)

@staticmethod
def open_last_ly(target=-1):
Expand Down Expand Up @@ -432,9 +440,8 @@ def open_last_ly(target=-1):
message = 'can not get target LilyPond input from {}.'
message = message.format(target)
raise ValueError(message)
if os.stat(target_ly):
command = '{} {}'.format(text_editor, target_ly)
IOManager.spawn_subprocess(command)
if os.path.exists(target_ly):
IOManager.open_file(target_ly, application=text_editor)
else:
message = 'Target LilyPond input file {} does not exist.'
message = message.format(target_ly)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from abjad.tools import systemtools
import pytest
import unittest
try:
from unittest import mock
except ImportError:
Expand Down Expand Up @@ -90,7 +89,7 @@ def test_systemtools_IOManager__open_file_02(spawn_subprocess_mock,
spawn_subprocess_mock.assert_called_with(command)


@mock.patch('os.name', 'nt')
@mock.patch('sys.platform', 'win32')
@mock.patch('os.startfile', create=True)
@pytest.mark.parametrize('configuration', abjad_configurations)
@pytest.mark.parametrize('file_path', test_files)
Expand Down
Loading

0 comments on commit f6b135e

Please sign in to comment.