Skip to content

Commit c6847d4

Browse files
committed
added abstract tests
Next: Cross references to headers of sections
1 parent 5f30a95 commit c6847d4

10 files changed

Lines changed: 2631 additions & 769 deletions

part1_core/code/processats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
fin = open('/Users/gobehobona/Documents/GitHub/geosciml-json-code-sprint/part1_core/sections/annex-a1.adoc','r')
3+
fin = open('/Users/gobehobona/Documents/GitHub/geosciml-json-code-sprint/part1_core/sections/annex-a-old.adoc','r')
44
fout = open('/Users/gobehobona/Documents/GitHub/geosciml-json-code-sprint/part1_core/sections/annex-a.adoc','w')
55

66
fout.write('[appendix]\n== Conformance Class Abstract Test Suite (Normative)\n')
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
3+
fin = open('/Users/gobehobona/Documents/GitHub/geosciml-json-code-sprint/part1_core/sections/annex-a-old.adoc','r')
4+
fout = open('/Users/gobehobona/Documents/GitHub/geosciml-json-code-sprint/part1_core/sections/annex-a-tests.adoc','w')
5+
6+
7+
8+
lines = fin.readlines()
9+
readingTable = False
10+
readingAbstractTestID = False
11+
title = ''
12+
13+
for line in lines:
14+
if ('*Test*' in line):
15+
readingTable = True
16+
line = line.replace('gsml4','gsml')
17+
token3 = line.replace(' ','').replace('*Test*','').replace('|','').replace('*','').replace('\n','')
18+
19+
template = '\n[[anchor]]\n[abstract_test]\n====\n[%metadata]'
20+
print(template.replace('anchor',token3.replace('/conf/','conf_').replace('/','_').strip()))
21+
fout.write(template.replace('anchor',token3.replace('/conf/','conf_').replace('/','_').strip())+'\n')
22+
23+
print('identifier:: '+token3)
24+
fout.write('identifier:: '+token3+'\n')
25+
##token3 = token3.strip().replace('/conf/','ATS_')
26+
##print('\ninclude::/abstract_tests/'+token3+'.adoc[]')
27+
readingTable = False
28+
if ('*Requirement*' in line):
29+
line = line.replace('gsml4','gsml')
30+
token3 = line.replace(' ','').replace('*Requirement*','').replace('|','').replace('*','').replace('\n','')
31+
32+
print('target:: '+token3)
33+
fout.write('target:: '+token3+'\n')
34+
if ('*Test purpose*' in line):
35+
line = line.replace('gsml4','gsml')
36+
token3 = line.replace('*Test purpose*','').replace('|','').replace('*','').replace('\n','')
37+
38+
print('test-purpose:: '+token3.strip())
39+
fout.write('test-purpose:: '+token3.strip()+'\n')
40+
if ('*Test method*' in line):
41+
line = line.replace('gsml4','gsml')
42+
token3 = line.replace('*Test method*','').replace('|','').replace('*','').replace('\n','')
43+
44+
print('test-method:: '+token3.strip())
45+
fout.write('test-method:: '+token3.strip()+'\n')
46+
if ('*Test type*' in line):
47+
print('====\n')
48+
fout.write('====\n')
49+
50+
51+
fin.close()
52+
fout.close()

0 commit comments

Comments
 (0)