[Schevo-devel] Re: [EVALUATION] - How to Create an own Schevo Database Schema

Ilias Lazaridis ilias at lazaridis.com
Tue Mar 7 00:13:41 EST 2006


Patrick K. O'Brien wrote:
> Ilias Lazaridis wrote:
>> Ilias Lazaridis wrote:
>>> I have started to implement a small application with the goal to
>>> evaluate schevo.
>>>
>>> The current documentation:
>>>
>>> http://schevo.org/exploration.html#creating-and-opening-a-database
>>>
>>> describes only how to create a database schema based on a example
>>> template.
>>>
>>> My question:
>>>
>>> a) how do I create my own schevo database schema?
> 
> We do not have an automated way to create a schema.  Because a schema is
> Python code, one can simply create a schema_001.py file.  Or copy and
> modify an existing one, as you attempted to do.

ok

>> I have tried this here, which seemed rational:
>>
>> copied contents of schevo.example.todo to schevo.example.eval
>>
>> _not_ modified any content.
>>
>> but this results in an error:
>>
>> P:\com\orbtech3\eval>evo db create --app=schevo.example.eval eval.db
>> Schevo tracing is ON.  See schevo.trace.__doc__ for more information.
>> Schevo 3.0-beta2 :: Database Activities :: Create Database
>>
>> usage: schevo db create [options] DBFILE
>>
>> DBFILE: The database file to create.
>>
>> Either --app or --schema must be given at a minimum.
>>
>> Note: Currently, only the schema_001.py file will be loaded from the
>> schema package.
>>
>> evo-script.py: error: Could not open schema file
>> 'schevo.example.eval\\schema\\schema_001.py'
> 
> That method worked for me:
> 
> C:\Code>evo db create --app=schevo.example.eval eval.db
> Schevo tracing is ON.  See schevo.trace.__doc__ for more information.
> Schevo 3.0-beta2 :: Database Activities :: Create Database
> 
> Creating a new database...
> Importing icons...
> Packing the database...
> Database created.
> 
> I suspect that when you made a copy of schevo.example.todo that you did
> not place it in the same directory such that eval was a sibling of todo.

I've placed it into the same directory (schevo\examples\eval)

> The --app= option recognizes two forms of a path, a dotted syntax, which
> means the path is importable in Python, or a regular operating system
> path.  If you copied the todo files and placed them outside of the
> schevo.example package then Python wouldn't be able to import them and
> would fall back to looking for an operating system path, which is what
> appears to have happened based on the error that you got.
> 
> So the other way to specify an app would probably work better for you:
> 
> evo db create --app=c:\path\to\eval eval.db

this one worked.

> Did that answer all your questions?

yes, thank you!

.

-- 
http://lazaridis.com




More information about the Schevo-devel mailing list