myokit 1.35.0__py3-none-any.whl → 1.35.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. myokit/__init__.py +11 -14
  2. myokit/__main__.py +0 -3
  3. myokit/_config.py +1 -3
  4. myokit/_datablock.py +914 -12
  5. myokit/_model_api.py +1 -3
  6. myokit/_myokit_version.py +1 -1
  7. myokit/_protocol.py +14 -28
  8. myokit/_sim/cable.c +1 -1
  9. myokit/_sim/cable.py +3 -2
  10. myokit/_sim/cmodel.h +1 -0
  11. myokit/_sim/cvodessim.c +79 -42
  12. myokit/_sim/cvodessim.py +20 -8
  13. myokit/_sim/fiber_tissue.c +1 -1
  14. myokit/_sim/fiber_tissue.py +3 -2
  15. myokit/_sim/openclsim.c +1 -1
  16. myokit/_sim/openclsim.py +8 -11
  17. myokit/_sim/pacing.h +121 -106
  18. myokit/_unit.py +1 -1
  19. myokit/formats/__init__.py +178 -0
  20. myokit/formats/axon/_abf.py +911 -841
  21. myokit/formats/axon/_atf.py +62 -59
  22. myokit/formats/axon/_importer.py +2 -2
  23. myokit/formats/heka/__init__.py +38 -0
  24. myokit/formats/heka/_importer.py +39 -0
  25. myokit/formats/heka/_patchmaster.py +2512 -0
  26. myokit/formats/wcp/_wcp.py +318 -133
  27. myokit/gui/datablock_viewer.py +144 -77
  28. myokit/gui/datalog_viewer.py +212 -231
  29. myokit/tests/ansic_event_based_pacing.py +3 -3
  30. myokit/tests/{ansic_fixed_form_pacing.py → ansic_time_series_pacing.py} +6 -6
  31. myokit/tests/data/formats/abf-v2.abf +0 -0
  32. myokit/tests/test_datablock.py +84 -0
  33. myokit/tests/test_datalog.py +2 -1
  34. myokit/tests/test_formats_axon.py +589 -136
  35. myokit/tests/test_formats_wcp.py +191 -22
  36. myokit/tests/test_pacing_system_c.py +51 -23
  37. myokit/tests/test_pacing_system_py.py +18 -0
  38. myokit/tests/test_simulation_1d.py +62 -22
  39. myokit/tests/test_simulation_cvodes.py +52 -3
  40. myokit/tests/test_simulation_fiber_tissue.py +35 -4
  41. myokit/tests/test_simulation_opencl.py +28 -4
  42. {myokit-1.35.0.dist-info → myokit-1.35.2.dist-info}/LICENSE.txt +1 -1
  43. {myokit-1.35.0.dist-info → myokit-1.35.2.dist-info}/METADATA +1 -1
  44. {myokit-1.35.0.dist-info → myokit-1.35.2.dist-info}/RECORD +47 -44
  45. {myokit-1.35.0.dist-info → myokit-1.35.2.dist-info}/WHEEL +0 -0
  46. {myokit-1.35.0.dist-info → myokit-1.35.2.dist-info}/entry_points.txt +0 -0
  47. {myokit-1.35.0.dist-info → myokit-1.35.2.dist-info}/top_level.txt +0 -0
myokit/__init__.py CHANGED
@@ -41,12 +41,11 @@ import sys # noqa
41
41
  if sys.hexversion < 0x03000000: # pragma: no cover
42
42
  raise Exception('This version of Myokit does not support Python 2.')
43
43
  elif sys.hexversion < 0x03070000: # pragma: no cover
44
- import logging # noqa
45
- log = logging.getLogger(__name__)
46
- log.warning(
47
- 'Myokit is not tested on Python 3 versions older than 3.7. Detected'
48
- ' Python version: ' + sys.version)
49
- del logging, log
44
+ import warnings # noqa
45
+ warnings.warn(
46
+ 'Myokit is not tested on Python versions before 3.7. Detected'
47
+ f' version {sys.version}.')
48
+ del warnings
50
49
  del sys
51
50
 
52
51
 
@@ -61,12 +60,10 @@ from ._myokit_version import ( # noqa
61
60
 
62
61
 
63
62
  # Warn about development version
64
- import logging # noqa
65
- log = logging.getLogger(__name__)
66
- log.info('Loading Myokit version ' + __version__)
67
63
  if not __release__: # pragma: no cover
68
- log.warning('Using development version of Myokit (' + __version__ + ').')
69
- del log, logging
64
+ import warnings # noqa
65
+ warnings.warn(f'Using development version of Myokit ({__version__}).')
66
+ del warnings
70
67
 
71
68
 
72
69
  #
@@ -82,7 +79,7 @@ Copyright (c) 2017-2020 University of Oxford. All rights reserved.
82
79
  (University of Oxford means the Chancellor, Masters and Scholars of the
83
80
  University of Oxford, having an administrative office at Wellington Square,
84
81
  Oxford OX1 2JD, UK).
85
- Copyright (c) 2020-2022 University of Nottingham. All rights reserved.
82
+ Copyright (c) 2020-2023 University of Nottingham. All rights reserved.
86
83
 
87
84
  Redistribution and use in source and binary forms, with or without
88
85
  modification, are permitted provided that the following conditions are met:
@@ -121,7 +118,7 @@ LICENSE_HTML = """
121
118
  <br />(University of Oxford means the Chancellor, Masters and Scholars of
122
119
  the University of Oxford, having an administrative office at Wellington
123
120
  Square, Oxford OX1 2JD, UK).
124
- <br />Copyright (c) 2020-2022 University of Nottingham. All rights
121
+ <br />Copyright (c) 2020-2023 University of Nottingham. All rights
125
122
  reserved.</br></p>
126
123
  <p>
127
124
  Redistribution and use in source and binary forms, with or without
@@ -202,7 +199,7 @@ if os.path.exists(DIR_USER_OLD): # pragma: no cover
202
199
  if os.path.exists(DIR_USER): # pragma: no cover
203
200
  if not os.path.isdir(DIR_USER):
204
201
  raise Exception(
205
- 'File or link found in place of user directory: ' + str(DIR_USER))
202
+ f'File or link found in place of user directory: {DIR_USER}')
206
203
  else: # pragma: no cover
207
204
  os.makedirs(DIR_USER)
208
205
 
myokit/__main__.py CHANGED
@@ -2140,7 +2140,4 @@ def add_video_parser(subparsers):
2140
2140
 
2141
2141
 
2142
2142
  if __name__ == '__main__':
2143
- import logging
2144
- logging.basicConfig()
2145
-
2146
2143
  main()
myokit/_config.py CHANGED
@@ -6,7 +6,6 @@
6
6
  # See http://myokit.org for copyright, sharing, and licensing details.
7
7
  #
8
8
  import configparser
9
- import logging
10
9
  import os
11
10
  import platform
12
11
  import sys
@@ -179,8 +178,7 @@ def _create(path):
179
178
  with open(path, 'w') as configfile:
180
179
  config.write(configfile)
181
180
  except IOError: # pragma: no cover
182
- logger = logging.getLogger('myokit')
183
- logger.warning('Warning: Unable to write settings to ' + str(path))
181
+ warnings.warn('Warning: Unable to write settings to ' + str(path))
184
182
 
185
183
 
186
184
  def _load():