1. 15 Aug, 2012 4 commits
    • Clément Schreiner's avatar
      Move plugins/__init__.py into plugins/api.py. · 3a4fe08e
      Clément Schreiner authored
      And allow plugins to do 'from debexpo.plugins.api import *' (with a
      properly defined __all__) instead of importing everything explicitely.
      3a4fe08e
    • Clément Schreiner's avatar
      Cosmetic/trivial changes. · 96ba6d19
      Clément Schreiner authored
       - Comments, debug messages, cleanup imports, better variable names.
      
       - nicer code in the ``nb_results`` property (BasePlugin)
      96ba6d19
    • Clément Schreiner's avatar
      Interactions between the database and a plugin now done in the plugin itself. · ac06ba53
      Clément Schreiner authored
      BasePlugin:
      
       - new methods: ``load`` and ``save`` for loading the data and
         committing the sqlalchemy session
      
       - ``_load_result``, allowing easy overridding in specific plugins' classes (e.g. QAPlugin)
      
       - ``db_objects`` attribute replaced by ``results``
      
      Plugins class now simpler.
      ac06ba53
    • Clément Schreiner's avatar
      Further improvements in the plugin API. · 6062ebf7
      Clément Schreiner authored
      Changes visible in plugins:
      
       - new decorator: importercmd, for BasePlugin subclasses' method. Make
         the method runnable by the importer for adding new data to the DB.
      
       - add a module-level variable in the plugin, ``models``, with the
         list of the plugin's models
      
       - the name of the plugin is passed as an argument to the BasePlugin
         subclass; it is no longer needed to add a 'plugin' class attribute
         in each model and the plugin class
      
       - new method for QAPlugin subclasses: ``new_test_result``, returning
         an instance of the ``test_model`` class
      
       - small detail: ``_new_result`` now ``new_result``, since the method
         is called in subclasses
      
      Implementation details:
      
       - nicer ``run`` method, using the above-described decorator and the
         ``inspect`` module instead of the former ugly ``test_*`` method
         discovery
      
       - new methods, ``_load_model`` and ``_load_models`` for processing
         the model list defined in the plugins. Easily derived in specific
         plugin classes (for example, in QAPlugin)
      6062ebf7
  2. 13 Aug, 2012 1 commit
  3. 10 Aug, 2012 1 commit
  4. 09 Aug, 2012 1 commit
  5. 08 Aug, 2012 2 commits
  6. 06 Aug, 2012 6 commits
  7. 05 Aug, 2012 1 commit
  8. 03 Aug, 2012 2 commits
  9. 30 Jul, 2012 1 commit
  10. 23 Jul, 2012 1 commit
  11. 11 Jul, 2012 1 commit
  12. 06 Jul, 2012 1 commit
  13. 03 Jul, 2012 4 commits
  14. 02 Jul, 2012 1 commit
  15. 30 Jun, 2012 3 commits
  16. 07 Mar, 2012 2 commits
  17. 14 Feb, 2012 1 commit
  18. 25 Jul, 2011 1 commit
  19. 14 Feb, 2009 1 commit
  20. 19 Sep, 2008 1 commit
  21. 25 Jun, 2008 4 commits