Closed GoogleCodeExporter closed 9 years ago
Existing behaviour:
Params
fault_source_tag - defaults to None
zone_source_tag - defaults to None
1. Open file defined by fault_source_tag
- filename is
-- <site_tag>_fault_source.xml if fault_source_tag is None, or
-- <site_tag>_fault_source_<fault_source_tag>.xml if fault_source_tag is not
None
- fid_sourcepolys = open(filename)
- If IOError caught fid_sourcepolys is None
2. Open file defined by zone_source_tag
- filename is
-- <site_tag>_zone_source.xml if zone_source_tag is None, or
-- <site_tag>_zone_source_<zone_source_tag>.xml if zone_source_tag is not None
- fid_event_types= open(filename)
- If IOError caught fid_event_types is None
3. If both fid_event_types and fid_sourcepolys is None exit in error, otherwise
continue with either fid_sourcepolys or fid_event_types or both.
Original comment by b...@girorosso.com
on 27 Mar 2012 at 6:29
[deleted comment]
[deleted comment]
Proposed change to behaviour:
- fault_source_tag
-- If fault_source_tag is not None
--- filename = <site_tag>_fault_source_<fault_source_tag>.xml
--- if filename not exists raise RuntimeError and exit
--- else return open(filename)
-- If fault_source_tag is None
--- return None
-- If IOError caught fid_sourcepolys is None (same as existing behaviour -
hopefully this will not be applicable any more)
-- Log info message to specify which file is being used, or that the file is
not specified
- zone_source_tag
-- If zone_source_tag is not None
--- filename = <site_tag>_zone_source_<zone_source_tag>.xml
--- if filename not exists raise RuntimeError and exit
--- else return open(filename)
-- If fault_source_tag is None
--- return None
-- If IOError caught fid_event_types is None (same as existing behaviour -
hopefully this will not be applicable any more)
-- Log info message to specify which file is being used, or that the file is
not specified
- If both fid_event_types and fid_sourcepolys is None exit in error, otherwise
continue with either fid_sourcepolys or fid_event_types or both (same as
existing behaviour).
Original comment by b...@girorosso.com
on 28 Mar 2012 at 2:23
Revision 1027 implements the above changes. Documentation, scenarios and demos
updated accordingly.
Original comment by b...@girorosso.com
on 29 Mar 2012 at 4:13
Original comment by b...@girorosso.com
on 29 Mar 2012 at 4:13
Reopening as unit tests need to be updated (they currently fail).
Original comment by b...@girorosso.com
on 30 Mar 2012 at 5:17
Revision 1028 fixes the unit tests.
Original comment by b...@girorosso.com
on 30 Mar 2012 at 5:29
Original issue reported on code.google.com by
duncan.g...@gmail.com
on 26 Mar 2012 at 11:56