Skip to content

Commit

Permalink
neurondm update model relative_path calls to handle no repo case
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbugs committed Aug 28, 2020
1 parent fc5c154 commit 8402cc0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion neurondm/neurondm/models/allen_cell_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ def make_config(self):
prefixes=self.prefixes,
branch=self.branch,
sources=tuple(), # TODO insert the link to the query...
source_file=relative_path(__file__))
source_file=relative_path(
__file__,
no_wd_value=__file__))

def build_neurons(self):
instances = []
Expand Down
3 changes: 2 additions & 1 deletion neurondm/neurondm/models/bolew.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class BolserLewisNeuron(NeuronEBM):

def main():
a = APIN()
config = Config('bolser-lewis', source_file=relative_path(__file__))
config = Config('bolser-lewis',
source_file=relative_path(__file__, no_wd_value=__file__))
bags = list(a.bags)
for label, bag in bags:
BolserLewisNeuron(*bag, label=label, override=True)
Expand Down
2 changes: 1 addition & 1 deletion neurondm/neurondm/models/keast2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def syn_chain_axons_in(syn_index, soma_index):
def main():
from pyontutils.utils import relative_path
config = Config('keast-2020',
source_file=relative_path(__file__),)
source_file=relative_path(__file__, no_wd_value=__file__))
with Keast2020:
needs_keast_namespace()

Expand Down
5 changes: 3 additions & 2 deletions neurondm/neurondm/models/ma2015.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,11 @@ def _end(self):
def main():
import csv
from neurondm.core import auth
with open((auth.get_path('resources') / '26451489 table 1.csv').as_posix(), 'rt') as f:
with open(auth.get_path('resources') / '26451489 table 1.csv', 'rt') as f:
rows = [list(r) for r in zip(*csv.reader(f))]

config = Config('markram-2015', source_file=relative_path(__file__))
config = Config('markram-2015',
source_file=relative_path(__file__, no_wd_value=__file__))
table1(rows)
return config,

Expand Down

0 comments on commit 8402cc0

Please sign in to comment.