← Back to team overview

kicad-developers team mailing list archive

Re: Are the python BOMmers case sensitive?

 

On Thu, Sep 19, 2013 at 09:44:16AM -0500, Dick Hollenbeck wrote:
> IMO, strong, both the eescema design and the xml netlist should have
> referential integrity.
> 
> How does it look to give someone an xml file and say, all the references
> are case insensitive, other than hoaky?

It's a design decision like any other... I wouldn't see nothing strange
in declaring 'all module names are case-folded matched' or 'all module
names are stored up/downcased'; 'module names are matched exactly' is
a quite fine way of doing things. However:

1) If we pursue the same thing with pcbnew modules where
modulename==filename hell break loose under Windows (for obvious
reasons)

2) That would include *typing* the module with the correct case in the
entry boxes for the user (could be inconvenient).

I think that a 'name is uppercase and matched exactly' rule would be
a good compromise in this case. Keep the == operator (not some folding
variant) and upcase everything on the I/O boundaries. Unless someone
already uses different Module and MODULE object nothing should break.
(of course replace uppercase with lowercase if preferred)

> The referential integrity of the xml file
> Is established by the referential integrity within the design files,
> schematic and libraries, or by the lack of such referential integrity.

It's somewhat funny talking about relational integrity on a hierarchical
database format:D however I agree on the spirit of the idea. AFAIK XML
*is* case sensitive so that should be the way to do it.

> Certainly fixing eeschema will break designs,  unless somebody can think of
> a fix point where eeschema can heal the design.

Converting on I/O and exact comparing shouldn't break a thing (except in
the already mentioned case). Putting the case conversion in the setter methods
could help, too.

By the way, the XML itself was *mostly* correct, the only wrong case was
the part attribute of the libsource element.

-- 
Lorenzo Marcantonio
Logos Srl


References