Skip to content

Commit

Permalink
#281 Switch from OrderedDict to dict
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Sep 30, 2024
1 parent ec8ea9e commit 3d5414b
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions chaste_codegen/_command_line_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
######################################################################
import argparse
import os
from collections import OrderedDict

import chaste_codegen as cg
from chaste_codegen import LOGGER, CodegenError, load_model_with_conversions
Expand All @@ -17,7 +16,7 @@

# pass --<command_line_tag> to select this model type

TRANSLATORS = OrderedDict(
TRANSLATORS = dict(
[('normal', (cg.NormalChasteModel, 'FromCellML', '', True, '')),
('cvode', (cg.CvodeChasteModel, 'FromCellMLCvode', 'Cvode', True, '')),
('cvode-data-clamp', (cg.CvodeChasteModel, 'FromCellMLCvodeDataClamp', 'CvodeDataClamp', True, '')),
Expand All @@ -29,7 +28,7 @@
' in mastrcriptRT with added injection current(i_inj)')),
('rush-larsen-c', (cg.RushLarsenC, '', '', False, ' in C with added injection current(i_inj)'))])

TRANSLATORS_OPT = OrderedDict(
TRANSLATORS_OPT = dict(
[('normal', (cg.OptChasteModel, 'FromCellMLOpt', 'Opt', True, '')),
('cvode', (cg.OptCvodeChasteModel, 'FromCellMLCvodeOpt', 'CvodeOpt', True, '')),
('cvode-data-clamp', (cg.OptCvodeChasteModel, 'FromCellMLCvodeDataClampOpt', 'CvodeDataClampOpt', True, '')),
Expand Down
4 changes: 1 addition & 3 deletions chaste_codegen/_lookup_tables.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import collections

from cellmlmanip.model import Quantity, Variable
from sympy import (
Piecewise,
Expand Down Expand Up @@ -71,7 +69,7 @@ def __init__(self, model, lookup_params=DEFAULT_LOOKUP_PARAMETERS):
'lookup_epxrs': []} for param in lookup_params)
self._model = model
self._lookup_variables = set()
self._lookup_table_expr = collections.OrderedDict()
self._lookup_table_expr = dict()
self._lookup_params_processed, self._lookup_params_printed = False, False

self._method_printed = None
Expand Down
2 changes: 1 addition & 1 deletion chaste_codegen/data/tests/test_jacobian_equations_2.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chaste_codegen/data/tests/test_jacobian_matrix_2.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions chaste_codegen/tests/test_jacobian.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3d5414b

Please sign in to comment.