Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update model for python3 and modeldb-ci support #4

Merged
merged 3 commits into from
Jul 23, 2022
Merged

update model for python3 and modeldb-ci support #4

merged 3 commits into from
Jul 23, 2022

Conversation

kotsaloscv
Copy link
Contributor

@kotsaloscv kotsaloscv commented Jul 8, 2022

Actions followed (copied from this PR: neuronsimulator/nrn-modeldb-ci#41):
- 2to3 -w .
- reindent .
# TODO - PR to update model for python3 support
- sed -i 's/figure, hold, isscalar/figure, isscalar/g;s/hold(True)/#hold(True)/g' analysis.py
- sed -i 's/hashlib.md5(obj)/hashlib.md5(obj.encode("utf-8"))/g' shared.py
- sed -i 's/cell.t0 = .0/#cell.t0 = .0/g' izhi.py
- sed -i "s/(nCells/s.nMuscles)/int(nCells/s.nMuscles)/g;s/'w'/'wb'/g;s/s.hostspikevecs[c]/[s.hostspikevecs[c].x[i] for i in range(s.hostspikevecs[c].size())]/g" network.py

izhi.py Show resolved Hide resolved
main.py Outdated Show resolved Hide resolved
@alexsavulescu alexsavulescu marked this pull request as draft July 8, 2022 19:37
@nrnhines
Copy link

There is no downside to declaring RANGE t0 in the mod file.

@alexsavulescu alexsavulescu marked this pull request as ready for review July 18, 2022 13:55
if verbose:
print('[callback.h.t End(id= %i)] %.3f' %(pc.id(), h.t))
print(('[callback.h.t End(id= %i)] %.3f' %(pc.id(), h.t)))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pedantic point, but this change isn't necessary; it was already in parentheses

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a side effect from the 2to3 utility.

@ramcdougal ramcdougal merged commit fcf857a into ModelDBRepository:master Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants