Skip to content

Commit 58daac0

Browse files
committed
Updating the python xml processing package
1 parent b67b49d commit 58daac0

23 files changed

+23
-22
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from .unit_manager import unitManager
77
from .xml_processor import preprocessGEOSXML
88
from .table_generator import writeGEOSTable, readGEOSTable
9-
from .format_xml import format_xml_file
109
from .test_manager import runUnitTests
11-
10+
from .format_xml import format_xml_file
1211

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,22 @@
44

55
def format_xml_file(input_file, output_file=''):
66

7-
# This should be updated when possible
87
active_blocks = ['Solvers',
9-
'SolverApplications',
8+
'Outputs',
9+
'Events',
1010
'Mesh',
11-
'ElementRegions',
12-
'Contact',
1311
'Partition',
14-
'Output',
12+
'NumericalMethods',
13+
'ElementRegions',
14+
'Constitutive',
1515
'InitialConditions',
16-
'InitialConstitutiveValues',
17-
'BoundaryConditions',
18-
'Tables',
19-
'Fracture',
20-
'Facesets',
21-
'Nodesets']
16+
'FieldSpecifications',
17+
'Functions',
18+
'Geometry',
19+
'Fracture']
2220

2321
documentation_blocks = ['Included',
24-
'Parameters',
25-
'DFNSets']
22+
'Parameters']
2623

2724

2825
# Open new files
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import re
22

3+
34
class RegexConfig():
45
def __init__(self):
56
self.parameters = r"\$:?([a-zA-Z_]*)\$?"
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,19 +230,14 @@ def diff_xml(self, source, target):
230230

231231
def test_basic_xml(self):
232232
tmp = preprocessGEOSXML(self.modPath + '/tests/source_xml/basic.xml', verbose=0)
233-
self.diff_xml(tmp, self.modPath + '/tests/target_xml/raw_basic.xml')
233+
self.diff_xml(tmp, self.modPath + '/tests/target_xml/target_basic.xml')
234234

235235
def test_includes_xml(self):
236236
tmp = preprocessGEOSXML(self.modPath + '/tests/source_xml/includes.xml', verbose=0)
237-
self.diff_xml(tmp, self.modPath + '/tests/target_xml/raw_includes.xml')
237+
self.diff_xml(tmp, self.modPath + '/tests/target_xml/target_includes.xml')
238238

239239
def test_symbolic_xml(self):
240240
tmp = preprocessGEOSXML(self.modPath + '/tests/source_xml/symbolic.xml', verbose=0)
241-
self.diff_xml(tmp, self.modPath + '/tests/target_xml/raw_symbolic.xml')
242-
243-
def test_formatting_xml(self):
244-
tmp = preprocessGEOSXML(self.modPath + '/tests/source_xml/symbolic.xml', verbose=0)
245-
format_xml_file(tmp)
246241
self.diff_xml(tmp, self.modPath + '/tests/target_xml/target_symbolic.xml')
247242

248243

pygeos_package/pygeos/tests/__init__.py

Whitespace-only changes.
File renamed without changes.

pygeos/tests/source_xml/generate_new_test_targets.py renamed to pygeos_package/pygeos/tests/source_xml/generate_new_test_targets.py

File renamed without changes.

pygeos/tests/source_xml/included/included_1.xml renamed to pygeos_package/pygeos/tests/source_xml/included/included_1.xml

File renamed without changes.

0 commit comments

Comments
 (0)