Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace form_to_db_schema(), form_to_db_schema_options(), form_to_db_schema_api_create(), form_to_db_schema_api_update(), form_to_db_package_schema() with just two schemas: create and update. Then get the tests passing. schema.py: - Delete _base_package_schema() - Delete already deprecated package_form_schema() - Delete form_to_db_package_schema() - Tweak default_create_package_schema() and default_update_package_schema() to get tests passing DefaultDatasetForm: - Delete form_to_db_schema_options() - Delete form_to_db_schema() - Delete form_to_db_schema_api_create() - Delete form_to_db_schema_api_update() - Add create_package_schema(), returns None - Add update_package_schema(), returns None Note that by deleting form_to_db_schema() and form_to_db_schema_options(), _api_create() and _api_update(), we're breaking backwards compatibility with any plugins that were using these. package_create(): - Don't call form_to_db_schema_options() or form_to_db_schema(). - Instead call the package plugin's create_package_schema(), if that doesn't exist or if it returns None then call default_create_package_schema() instead package_update(): - Don't call form_to_db_schema_options() or form_to_db_schema(). - Instead call the package plugin's update_package_schema(), if that doesn't exist or if it returns None then call default_update_package_schema() instead Note that by no longer calling the form_to_db_schema_options() or form_to_db_schema() methods of IDatasetForm plugins, we're breaking backward compatibility with those plugins. Note this makes IDatasetForm less flexible - plugins can return different schemas for creating, updating or showing packages, but they can no longer return different schemas depending on whether we're using the API or web UI, or on other parameters from the Pylons context. test_tag_vocab.py: - Update MockVocabTagsPlugin to work with the new interface Also update some other tests.
- Loading branch information
Sean Hammond
committed
Mar 19, 2013
1 parent
4abebbc
commit 3c677cf
Showing
7 changed files
with
55 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters