[three]Bean
Namespace refactor for tw2.jquery plugins
Feb 04, 2011 | categories: python, toscawidgets, oops View CommentsAfter consulting with Joseph Tate, we came to the decision to refactor the namespace for jquery plugins in ToscaWidgets2. Everything previously known as tw2.jquery.plugins.* is now known as tw2.jqplugins.*.
It all boils down to fighting with the tw2.jquery non-namespace. A jquery plugin package would live in ..../site-packages/tw2/jquery/plugins/someplugin and would have to ship its own file to ..../site-packages/tw2/jquery/__init__.py. However, tw2.jquery's own __init__.py file was non-empty. In order to not break everything, jquery plugin packages would have to mirror tw2.jquery-proper's own content but in the end still break the rule suggested in the second-to-last paragraph of this section of the setuptools documentation.
Apologies to anyone adversely affected who previously depended on any tw2.jquery.plugins.* packages. The following four of mine were affected, renamed, and should no longer be prone to big changes.
- tw2.jquery.plugins.ui moved to tw2.jqplugins.ui
- tw2.jquery.plugins.fg moved to tw2.jqplugins.fg
- tw2.jquery.plugins.jqgrid moved to tw2.jqplugins.jqgrid
- tw2.jquery.plugins.jqplot moved to tw2.jqplugins.jqplot
Lastly, if you do have projects that depend on anything in the tw2.jquery.plugins namespace, the following command should fix you up:
$ find . -name "*.py" -exec sed -i 's/jquery.plugins/jqplugins/g' {} \;