On Fri, Sep 16, 2016 at 01:55:38PM +0200, Marco Bomben wrote: > Dear Dave, > let me first thank you for your module: it works fantastically and let me > do my work much much faster than before. > > I have a question about default values. I have tried to set them in to the > xsd and see if they worked as expected but they don't, at least for me. > Here is the workaround I came up with: > > gr.SetTitle(curve.get_label()) > try: > gr.SetMarkerStyle(curve.get_marker().get_style()) > except TypeError: > gr.SetMarkerStyle(defaultMarkerStyle) > > It is very ugly... > Do you have a working example I can look at, please? > > Many thanks again and regards,
Marco, You are welcome. And, I'm glad you've found generateDS.py useful. I appreciate the comment. There is support for default values. You can take a look in the tests/ directory: generateds/tests/default*.* The code that runs the tests is in tests/test.py. I have not looked at that for a good while. I'll have to check to see if it is working myself. ... OK, I looked, and yes, default_cases*.* seems to be doing what I expect it to do, which could be different from the correct behavior. You can compare these files: tests/defaults_cases.xml tests/defaults_cases1_out.xml tests/defaults_cases2_out.xml defaults_cases2_out.xml is generated from defaults_cases.xml by the module that was generated from tests/defaults_cases.xsd. defaults_cases1_out.xml is the "correct" file that the unit test (in tests/test.py) compares against. You can also look at tests/defaults_coverage*. That unit test is also checking this feature. If there is something that generateDS.py is not doing with respect to default values and that you think it should do, could you send me a test case and tell me what you'd expect instead of what it actually does. Perhaps something is broken or perhaps there is a case that it is not handling. Thanks in advance for help, and thanks for reporting the problem. Questions -- I looked at your Web site, and saw the list of papers that you have written. Do you use generateDS.py in your work? What kind of data and content do you process with it? Just curious. Dave > Marco Bomben > > -- > "Human existence is based upon two pillars: Compassion and knowledge. > Compassion without knowledge is ineffective; knowledge without compassion > is inhuman." > (Victor Frederick Weisskopf) > ---------------------------------------------- > http://marco.bomben.googlepages.com/ -- Dave Kuhlman http://www.davekuhlman.org ------------------------------------------------------------------------------ _______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users