lp:relrdf

Created by Martin Soto and last modified
Get this branch:
bzr branch lp:relrdf
Only Martin Soto can upload to this branch. If you are Martin Soto please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Martin Soto
Project:
RelRDF
Status:
Development

Recent revisions

445. By Martin Soto

Convert the modelimport command into a new-style, command-line operation

* relrdf/cmdline/importfile.py: Renamed from bin/modelimport. Converted
  to a new-style, command-line operation. Errors during parsing are now
  trapped and properly converted into CommandLineError.

* relrdf/cmdline/maincmd.py (HelpOperation.operationNames, getOperation):
  Register the 'import' command.

* unit/cmdline.py (BasicTestCase.setUp, BasicTestCase._runCommand): Add
  support for passing a predefined set of object-selection options to
  every command that is run by the tests.
  (ModelMbDefSetDefaultTestCase): Test case for the import operation.

444. By Martin Soto

Assorted fixes to the model import modules

* relrdf/modelimport/redlandparse.py (RedlandParser._transValue): Fix
  assertion message.
  (RedlandParser.parse): Fix conversion of file names into file: URLs, so
  that it can handle arbitrary paths.

* relrdf/modelimport/vmodellparse.py (VModellParser.__init__): Get rid of
  PrintSink hack. This can be done now properly from the command line.

* relrdf/modelimport/xmiparse.py: Fix ElemenTree import and get rid of
  spurious PrintSink import.

443. By Martin Soto

Update the debug modelbase and sinks to the new creation interface

* relrdf/debug/__init__.py: Export getModelbase.

* relrdf/debug/basesinks.py: Renamed from relrdf/basesinks.py.
  (NullSink, PrintSink, ListSink, DictSink): Inherit from Sink.
  (DebugModelbase): Inherit from Modelbase.
  (DebugModelbase.getSink): Rewrite for the new model creation
  interface.
  (getModelbase): New function to instantiate the modelbase.

* relrdf/debug/cmdline.py (NullSinkCmdLineObj, PrintSinkCmdLineObj): New
  command-line objects for the base sinks.
  (getCmdLineObject): Allow for accessing the new command-line
  objects. Fix the error message. Raise CommandLineError instead of
  InstantiationError.

* relrdf/debug/config.py (DebugModelConfiguration): NEw base class for
  all debug-related configurations.
  (NullSinkConfiguration, PrintSinkConfiguration, ListSinkConfiguration)
  (DictSinkConfiguration): New configuration classes for the base sinks.
  (getConfigClass): Allow for accessing the new configuration
  classes. Fix the error message.

* unit/basesinks.py: New test module for the base sinks.

* unit/test.py: Register the new test module.

442. By Martin Soto

New interface for creating modelbases, models and sinks

Warning: Introduces lots of breakage!

* relrdf/centralfactory.py (getModelbase): This function now receives a
  configuration as only input.
  (getModelbaseFromParams): Convenience function to create modelbases
  from type and parameters (previously done by getModelbase).

* relrdf/modelbase.py: New module with (still incomplete) base classes
  for modelbases, models and sinks. Specific implementations of these
  objects are expected to inherit from these classes, although this is
  not yet enforced.

* relrdf/__init__.py: Export getModelbaseFromParams.

441. By Martin Soto

Let the argument parser generate the usage message

* relrdf/cmdline/backend.py (CmdLineBase.usage, CmdLineBase.makeParser):
  Set a 'usage' field in the parser only when it was explicitly set in
  the class. This way the parser can generate the usage line, which it
  does correctly most of the time.

440. By Martin Soto

Fix spelling of Modelbase in identifiers

* relrdf/__init__.py:
* relrdf/basesinks.py:
* relrdf/browser/browser.py:
* relrdf/centralfactory.py:
* relrdf/db/postgres/__init__.py:
* relrdf/db/postgres/basicquery.py:
* relrdf/db/postgres/basicsinks.py:
* relrdf/db/postgres/modelbase.py:
* relrdf/presentation/util/modelselector.py:
* relrdf/presentation/xmlcomp/testcomp.py:
* relrdf/presentation/xmlvis/maker.py:
* test/dawg.py:
* test/tests.py:
  Replace all uses of ModelBase and modelBase in identifiers by Modelbase
  and modelbase respectively.

439. By Martín Soto <soto@masoft>

Rename modelbasefactory to centralfactory

* relrdf/centralfactory.py: Renamed from modelbasefactory.py, as this
  file is now much more than simply a factory for modelbases.

* relrdf/__init__.py:
* relrdf/cmdline/maincmd.py:
* relrdf/config/config.py:
* relrdf/config/registry.py:
* relrdf/presentation/util/modelselector.py:
  Use new centralfactory name.

438. By Martín Soto <soto@masoft>

* relrdf/cmdline/configmng.py (RegisterOperation, ListOperation)
  (ForgetOperation, SetDefaultOperation): Extensive changes to make all
  operations able to work not only on modelbases but on their contained
  models.

* unit/cmdline.py: Extend all tests to cover operations on models. The
  test classes for each operation where generalized, and new subclasses
  were added that specialize them to test operating on models.

437. By Martín Soto <soto@masoft>

Assorted maincmd fixes

* relrdf/cmdline/maincmd.py (mainCmd): Fix some error messaages to make
  them (hopefully) somewhat more understandable. Fix the case where a
  model is specified, but not a modelbase (i.e., the default modelbase
  must be used). Fix default modelbase and model retrieval when
  needsMbConf or needsModelConf are specified in the operation class.

436. By Martín Soto <soto@masoft>

Add a model type to the debug backend

* relrdf/debug/cmdline.py (getCmdLineObject):
* relrdf/debug/config.py (getConfigClass):
  Add a model type called 'debug', which actually uses the same
  configuration and command-line backend classes as the modelbase
  itself.

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 (needs bzr 0.92)
This branch contains Public information 
Everyone can see this information.

Subscribers