Re: [Modeling-users] ModelMasons refactored
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2003-04-22 12:08:01
|
Mario Ruggier <ma...@ru...> writes:
> Some minor comments, from tests here using the scripts:
>=20
> mdl_validate -v
> - the -v switch is not listed in the usage info printed by the script's -h
Fixed on the cvs main trunk. I also changed a little the options: now
'-w' discards warnings and info., and 'q' discards info. '-Q' is for
*really* quiet.
> mdl_generate_python_code.py -B
> - it looks like second time generation does not overwrite anything in
> the MDL directory. It should?
I can't reproduce that, see e.g.:
mdl_generate_python_code.py -B ./model_StoreEmployees.xml2
Creating directory ./StoreEmployees... no
File ./StoreEmployees/TODO.txt exists, skipping
File ./StoreEmployees/README.txt exists, skipping
File ./StoreEmployees/VERSION.txt exists, skipping
File ./StoreEmployees/INSTALL.txt exists, skipping
File ./StoreEmployees/DEPENDENCIES.txt exists, skipping
File ./StoreEmployees/__init__.py exists, skipping
File ./StoreEmployees/setup.py exists, skipping
Creating directory ./StoreEmployees/MDL... no
--> Generating ./StoreEmployees/MDL/__init__.py... done
Generating ./StoreEmployees/MDL/model_StoreEmployees.xml... done
Generating ./StoreEmployees/MDL/model_StoreEmployees.py... done
File ./StoreEmployees/Address.py exists, skipping
--> Generating ./StoreEmployees/MDL/Address.py... done
File ./StoreEmployees/Store.py exists, skipping
--> Generating ./StoreEmployees/MDL/Store.py... done
File ./StoreEmployees/Employees.py exists, skipping
--> Generating ./StoreEmployees/MDL/Employees.py... done
File ./StoreEmployees/Mark.py exists, skipping
--> Generating ./StoreEmployees/MDL/Mark.py... done
File ./StoreEmployees/Employee.py exists, skipping
--> Generating ./StoreEmployees/MDL/Employee.py... done
> - the switch --overwrite-existing-files seems to have disappeared, but
> to me it still makes sense to keep the option if you want a clean
> generation, and want to throw away the "working" files...
I understand, however in that case I recommend moving or destroying the
whole package or some files. I was forced to add this option earlier
(but didn't like it) because it wasn't possible to say in a generation
scheme which files should be overwritten; now that that's clear I prefer
that the user handles this.
> mdl_generate_DB_schema.py
> - when creating a table the first time around, all DROP statements fail,
> and execution stops unless the -i switch is used. Shouldn't DROP of
> non-existant stuff not be treated like an error?
Not sure what you mean here:
$ mdl_generate_DB_schema.py -C -v \=20
> --admin-dsn=3D"localhost:template1:postgres:" ./model_StoreEmployees.xml
does not try any drop statements. Could you be more precise on which
situation(s) it annoys you?
> > BTW: Mario proposed that the generated class initializer could be:
> >> def __init__(self,att1=3DNone,att2=3DNone):
> > instead of
> >> def __init__(self):
> >
> > Are we ok we go for it?
>=20
> My vote is clear.
:)
-- S=E9bastien.
|