Skip to content

Commit 0a2f385

Browse files
Merge pull request #21 from AgriculturalModelExchangeInitiative/master
merge master with release
2 parents a6ba354 + 5eb24fe commit 0a2f385

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

src/pycropml/cyml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def transpile_component(component, package, language):
198198
'run_%s' % NAMES[format])
199199
for format in cymltx_languages
200200
}
201-
201+
print('translator :', translator)
202202
translator[language](component, package)
203203

204204
return 0

src/pycropml/transpiler/antlr_py/parse.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
from operator import methodcaller
3232
from antlr4 import InputStream
3333

34-
languages = ['cs',"bioma", 'f90', 'dssat', 'java', "xml", "cmake", "py", "openalea"]
35-
gen = {'cs':"csharp","bioma":"csharp", 'f90':"fortran", 'dssat':"fortran", "java":"java", "xml":"xml", "cmake":"cmake", "py":"python", "openalea":"python"}
36-
NAMES = {'cs':'CSharp','sirius':'CSharp',"bioma":"CSharp", 'f90':'Fortran90', 'dssat':'Fortran90', "java":"Java8", "xml":"XML", "cmake":"CMake", "py":"Python", "openalea":"Python"}
34+
languages = ['cs','bioma', 'f90', 'dssat', 'java', 'xml', 'cmake', 'py', 'openalea']
35+
gen = {'cs':'csharp','bioma':'csharp', 'f90':'fortran', 'dssat':'fortran', 'java':'java', 'xml':'xml', 'cmake':'cmake', 'py':'python', 'openalea':'python'}
36+
NAMES = {'cs':'CSharp','sirius':'CSharp','bioma':'CSharp', 'f90':'Fortran90', 'dssat':'Fortran90', 'java':'Java8', 'xml':'XML', 'cmake':'CMake', 'py':'Python', 'openalea':'Python'}
3737

3838
def langLexerParser(ant):
3939
generator = {

src/pycropml/transpiler/generators/openaleaGenerator.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ def generate_wralea(self, mc):
8383
'url': 'http://crop2ml.org',
8484
'icon': ''}
8585
metainfo['alias']= [mc.name]
86-
#name = mc.name
87-
name = ('amei.'+mc.id).lower()
86+
87+
split_name = (mc.id).lower().split('.') # remove the name of the workflow
88+
names = split_name[:-1] if len(split_name) >1 else split_name
89+
names.insert(0, 'amei')
90+
name = '.'.join(names).lower()
8891
wra_path = mc.path.split(os.path.sep)[-1]
8992
path = Path(os.path.join(mc.path,"src","openalea", wra_path))
9093
_package = package.UserPackage(name, metainfo, path)

src/pycropml/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
MINOR = 2
1212
"""(int) Version minor component."""
1313

14-
POST = 2
14+
POST = 3
1515
"""(int) Version post or bugfix component."""
1616

1717
__version__ = ".".join([str(s) for s in (MAJOR, MINOR, POST)])

0 commit comments

Comments
 (0)