Get rid of old classes ?

Asked by Jérôme Duriez

Hello, sorry for the title not so meaningful. But the problem is :

In yade prompt, if I perform
Yade [12]: yade.C (push on tab-tab)

I get, among others :

yade.CinemDNCEngine yade.CinemDTCEngine yade.CinemKNCEngine
yade.CL1Relationships yade.ContactLaw1 yade.ContactLaw1Interaction yade.CinemCNCEngine

All files I wrote at one time, but I renamed since... Famous "ContactLaw1" for example is now Law2_ScGeom6D_NormalInelasticityPhys_NormalInelasticity.
The good point is that I also get the new names with yade.L (tab-tab) for example.

But is it normal ?? (that old names still appear) ? Did I make something wrong at one time ?
In fact "my" classes are not the only ones since for example "yade.SimpleElasticRelationshipsWater" still exists while it has been renamed in r2116

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Bruno Chareyre
Solved:
Last query:
Last reply:
Revision history for this message
Best Bruno Chareyre (bruno-chareyre) said :
#1

Jerome, when you wonder how "ContactLaw1" is still present in Yade, just
type ctrl+alf+f / ContactLaw1 (assuming you use kdevelop), and you'll
find out.

The reason is backward compatibility (scripts using old names will still
work with current version).
It is handled automaticaly if you rename classes or attributes using
scripts like rename-class.py.

You can remove compatibility by removing those lines in py/system.py

'ContactLaw1':'RockJointLaw', # Tue Feb 2 14:53:49 2010,
jduriez@c1solimara-l
'ContactLaw1':'RockJointLaw', # Tue Feb 2 14:54:40 2010,
jduriez@c1solimara-l
'ContactLaw1Interaction':'RockJointPhys', # Tue Feb 2 14:55:34 2010,
jduriez@c1solimara-l
'CL1Relationships':'RockJointLawRelationships', # Tue Feb 2 14:58:02
2010, jduriez@c1solimara-l
... etc

The most funny class renaming was this one in my opinion: ;-)

'ContactLaw1':'SomeBetterName', # Fri Jun 4 15:35:38 2010,
jduriez@c1solimara-l

Bruno

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Thanks Chareyre, that solved my question.