openworm / org.geppetto

Geppetto is an open-source platform to build web-based applications to visualize and simulate neuroscience data and models.
http://geppetto.org
Other
209 stars 50 forks source link

Setup script update #511

Closed LordKrabo closed 7 years ago

LordKrabo commented 8 years ago

Updates config.json. Need other parts of this script later.

tarelli commented 8 years ago

@LordKrabo is still doing some work on this to update also the other files, wait before merging it :)

tarelli commented 7 years ago

@LordKrabo I'm trying to merge this for the release, seeing two problems. First:

Traceback (most recent call last):
  File "setup.py", line 23, in <module>
    config = json.loads(open(os.path.join(os.path.dirname(__file__), 'config.json')).read())
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

I noticed that config.json starts and end with two '. I removed them and went a bit further:

Copying Geppetto repositories into /Users/matteocantarelli/Documents/Development/James
Would you like to customise your repositories?
y
Geppetto repository automatically cloned https://github.com/openworm/org.geppetto.core.git
Cloning into 'org.geppetto.core'...
remote: Counting objects: 12674, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 12674 (delta 1), reused 0 (delta 0), pack-reused 12663
Receiving objects: 100% (12674/12674), 39.92 MiB | 278.00 KiB/s, done.
Resolving deltas: 100% (6341/6341), done.
Checking connectivity... done.
../org.geppetto.model
../org.geppetto.core
../org.geppetto.model.neuroml
../org.geppetto.model.swc
../org.geppetto.simulation
../org.geppetto.frontend
Traceback (most recent call last):
  File "setup.py", line 138, in <module>
    main(sys.argv[1:])
  File "setup.py", line 113, in main
    writeToPlan(repo)
  File "setup.py", line 65, in writeToPlan
    plan = parse(planpath)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 15, column 1

Ideas? Thanks!

LordKrabo commented 7 years ago

I think config.json just needed the pair of '' to encase the json. Like this:

'{

"sourcesdir":"..//..//..//",
"repos":[
{
    "name":"org.geppetto.core",
    "url":"https://github.com/openworm/org.geppetto.core.git",
    "auto_install":"yes"
}, {
    "name":"org.geppetto.model",
    "url":"https://github.com/openworm/org.geppetto.model.git",
    "auto_install":"yes"
}, {
    "name":"org.geppetto.model.sph",
    "url":"https://github.com/openworm/org.geppetto.model.sph.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.model.neuroml",
    "url":"https://github.com/openworm/org.geppetto.model.neuroml.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.solver.sph",
    "url":"https://github.com/openworm/org.geppetto.solver.sph.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.simulator.sph",
    "url":"https://github.com/openworm/org.geppetto.simulator.sph.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.simulator.jlems",
    "url":"https://github.com/openworm/org.geppetto.simulator.jlems.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.simulation",
    "url":"https://github.com/openworm/org.geppetto.simulation.git",
    "auto_install":"yes"
}, {
    "name":"org.geppetto.testbackend",
    "url":"https://github.com/openworm/org.geppetto.testbackend.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.persistence",
    "url":"https://github.com/openworm/org.geppetto.persistence.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.simulator.external",
    "url":"https://github.com/openworm/org.geppetto.simulator.external.git",
    "auto_install":"no"
}, {
    "name":"org.geppetto.frontend",
    "url":"https://github.com/openworm/org.geppetto.frontend.git",
    "auto_install":"yes"
}, {
    "name":"org.geppetto.model.swc",
    "url":"https://github.com/openworm/org.geppetto.model.swc.git",
    "auto_install":"no"
}]

}'

LordKrabo commented 7 years ago

Is that what was throwing the no valid json error?

tarelli commented 7 years ago

@LordKrabo With enclosing '' is not valid JSON, see the error I was getting: ValueError: No JSON object could be decoded. It went away when I removed them.

LordKrabo commented 7 years ago

That's weird because I have the same error now with respect to cloning. It seems to crash at org.geppetto.model.swc so I will take that out and see if it makes a difference.

LordKrabo commented 7 years ago

There's an error in the geppetto.plan file, an additional escape character somewhere. I'll remove it and remerge.

tarelli commented 7 years ago

@tarelli test this, ready now

tarelli commented 7 years ago

@LordKrabo finally merged, thanks! 👍