ModelFlowIb 2.55__tar.gz → 2.57__tar.gz

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 (51) hide show
  1. {modelflowib-2.55 → modelflowib-2.57}/ModelFlowIb.egg-info/PKG-INFO +1 -1
  2. {modelflowib-2.55 → modelflowib-2.57}/PKG-INFO +1 -1
  3. {modelflowib-2.55 → modelflowib-2.57}/modelclass.py +11 -3
  4. {modelflowib-2.55 → modelflowib-2.57}/modelhelp.py +2 -1
  5. {modelflowib-2.55 → modelflowib-2.57}/modelnormalize.py +1 -1
  6. {modelflowib-2.55 → modelflowib-2.57}/modelwidget.py +2 -1
  7. {modelflowib-2.55 → modelflowib-2.57}/modelwidget_input.py +3 -2
  8. {modelflowib-2.55 → modelflowib-2.57}/pyproject.toml +1 -1
  9. {modelflowib-2.55 → modelflowib-2.57}/ModelFlowIb.egg-info/SOURCES.txt +0 -0
  10. {modelflowib-2.55 → modelflowib-2.57}/ModelFlowIb.egg-info/dependency_links.txt +0 -0
  11. {modelflowib-2.55 → modelflowib-2.57}/ModelFlowIb.egg-info/requires.txt +0 -0
  12. {modelflowib-2.55 → modelflowib-2.57}/ModelFlowIb.egg-info/top_level.txt +0 -0
  13. {modelflowib-2.55 → modelflowib-2.57}/modelBLfunk.py +0 -0
  14. {modelflowib-2.55 → modelflowib-2.57}/model_Excel.py +0 -0
  15. {modelflowib-2.55 → modelflowib-2.57}/model_cvx.py +0 -0
  16. {modelflowib-2.55 → modelflowib-2.57}/model_doable.py +0 -0
  17. {modelflowib-2.55 → modelflowib-2.57}/model_dynare.py +0 -0
  18. {modelflowib-2.55 → modelflowib-2.57}/model_financial_stability.py +0 -0
  19. {modelflowib-2.55 → modelflowib-2.57}/model_ifrs9.py +0 -0
  20. {modelflowib-2.55 → modelflowib-2.57}/model_latex.py +0 -0
  21. {modelflowib-2.55 → modelflowib-2.57}/model_latex_class.py +0 -0
  22. {modelflowib-2.55 → modelflowib-2.57}/model_run_numba.py +0 -0
  23. {modelflowib-2.55 → modelflowib-2.57}/modelclass2.py +0 -0
  24. {modelflowib-2.55 → modelflowib-2.57}/modeldash.py +0 -0
  25. {modelflowib-2.55 → modelflowib-2.57}/modeldashboot.py +0 -0
  26. {modelflowib-2.55 → modelflowib-2.57}/modeldashsidebar.py +0 -0
  27. {modelflowib-2.55 → modelflowib-2.57}/modeldekom.py +0 -0
  28. {modelflowib-2.55 → modelflowib-2.57}/modeldiff.py +0 -0
  29. {modelflowib-2.55 → modelflowib-2.57}/modeldisplay.py +0 -0
  30. {modelflowib-2.55 → modelflowib-2.57}/modelfeedback.py +0 -0
  31. {modelflowib-2.55 → modelflowib-2.57}/modelgrab.py +0 -0
  32. {modelflowib-2.55 → modelflowib-2.57}/modelgrabwf2.py +0 -0
  33. {modelflowib-2.55 → modelflowib-2.57}/modelinvert.py +0 -0
  34. {modelflowib-2.55 → modelflowib-2.57}/modeljupyter.py +0 -0
  35. {modelflowib-2.55 → modelflowib-2.57}/modeljupytermagic.py +0 -0
  36. {modelflowib-2.55 → modelflowib-2.57}/modelmacrograb.py +0 -0
  37. {modelflowib-2.55 → modelflowib-2.57}/modelmanipulation.py +0 -0
  38. {modelflowib-2.55 → modelflowib-2.57}/modelmf.py +0 -0
  39. {modelflowib-2.55 → modelflowib-2.57}/modelnet.py +0 -0
  40. {modelflowib-2.55 → modelflowib-2.57}/modelnewton.py +0 -0
  41. {modelflowib-2.55 → modelflowib-2.57}/modelpattern.py +0 -0
  42. {modelflowib-2.55 → modelflowib-2.57}/modelpatternrev.py +0 -0
  43. {modelflowib-2.55 → modelflowib-2.57}/modelreport.py +0 -0
  44. {modelflowib-2.55 → modelflowib-2.57}/modelsandbox.py +0 -0
  45. {modelflowib-2.55 → modelflowib-2.57}/modelsandbox_Mixin.py +0 -0
  46. {modelflowib-2.55 → modelflowib-2.57}/modeltodo.py +0 -0
  47. {modelflowib-2.55 → modelflowib-2.57}/modeluserfunk.py +0 -0
  48. {modelflowib-2.55 → modelflowib-2.57}/modeluserfunk_old.py +0 -0
  49. {modelflowib-2.55 → modelflowib-2.57}/modelvis.py +0 -0
  50. {modelflowib-2.55 → modelflowib-2.57}/modelwidget_shinypy.py +0 -0
  51. {modelflowib-2.55 → modelflowib-2.57}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ModelFlowIb
3
- Version: 2.55
3
+ Version: 2.57
4
4
  Summary: A tool to solve and manage dynamic economic models
5
5
  Author-email: Ib Hansen <your@email.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ModelFlowIb
3
- Version: 2.55
3
+ Version: 2.57
4
4
  Summary: A tool to solve and manage dynamic economic models
5
5
  Author-email: Ib Hansen <your@email.com>
6
6
  License: MIT
@@ -1830,7 +1830,14 @@ class Model_help_Mixin():
1830
1830
 
1831
1831
  return False
1832
1832
 
1833
- @staticmethod
1833
+ @staticmethod
1834
+ def is_running_in_colab():
1835
+ try:
1836
+ return 'google.colab' in str(get_ipython())
1837
+ except:
1838
+ return False
1839
+
1840
+ # @staticmethod
1834
1841
  class defsub(dict):
1835
1842
  '''A subclass of dict.
1836
1843
  if a *defsub* is indexed by a nonexisting keyword it just return the keyword '''
@@ -1838,7 +1845,7 @@ class Model_help_Mixin():
1838
1845
  def __missing__(self, key):
1839
1846
  return key
1840
1847
 
1841
- @staticmethod
1848
+ # @staticmethod
1842
1849
  class defsub_braces(dict):
1843
1850
  '''A subclass of dict.
1844
1851
  if a *defsub* is indexed by a nonexisting keyword it just return the keyword sorounded by braces '''
@@ -2259,7 +2266,8 @@ class Model_help_Mixin():
2259
2266
  destination = destination ,
2260
2267
  go = go ,
2261
2268
  silent=silent,
2262
- replace = replace
2269
+ replace = replace,
2270
+ colab=model.is_running_in_colab()
2263
2271
  )
2264
2272
 
2265
2273
 
@@ -119,7 +119,8 @@ def update_var(databank,xvar,operator='=',inputval=0,start='',end='',create=1, l
119
119
  outputserie=pd.Series(np.NaN,current_per)
120
120
  outputserie.name=var
121
121
  databank[var] = databank[var].astype('float') # to prevent error in the future
122
- databank.loc[current_per,var]=outputserie
122
+ databank.loc[current_per,var]=outputserie.astype('float')
123
+
123
124
  if lprint:
124
125
  print('Update',operator,inputdata,start,end)
125
126
  forspalte=str(max(6,len(var)))
@@ -177,7 +177,7 @@ def preprocess(udtryk,funks=[]):
177
177
  udtryk_up=fordif+'(('+difudtryk_up+')-('+lagone(difudtryk_up+'',funks=funks)+'))'+efterdif
178
178
 
179
179
  while diff_match := funk_in('D' , udtryk_up):
180
- print(f'{udtryk_up} on D')
180
+ # print(f'{udtryk_up} on D')
181
181
  fordif,difudtryk_up,efterdif=funk_find_arg(diff_match,udtryk_up)
182
182
  difudtryk_up = difudtryk_up.replace(' ','').replace(',0,1','') if difudtryk_up.endswith(',0,1') else difudtryk_up
183
183
  udtryk_up=fordif+'(('+difudtryk_up+')-('+lagone(difudtryk_up+'',funks=funks)+'))'+efterdif
@@ -22,7 +22,8 @@ import matplotlib.pylab as plt
22
22
  try:
23
23
  from ipydatagrid import DataGrid
24
24
  except Exception as e:
25
- print( 'no update sheets',e)
25
+ ...
26
+ # print( 'no update sheets',e)
26
27
 
27
28
  from modelclass import insertModelVar
28
29
  from modelclass import model
@@ -52,7 +52,8 @@ import ipywidgets as widgets
52
52
  try:
53
53
  from ipydatagrid import DataGrid, TextRenderer
54
54
  except Exception as e:
55
- print( 'no update sheets',e)
55
+ ...
56
+ # print( 'no update sheets',e)
56
57
 
57
58
 
58
59
  from IPython.display import display, clear_output,Latex, Markdown
@@ -251,7 +252,7 @@ class sheetwidget(singelwidget):
251
252
  # from dataclasses import dataclass, field
252
253
  from typing import Callable, Any
253
254
  # import pandas as pd
254
- import ipydatagrid as gd
255
+ # import ipydatagrid as gd
255
256
  # from ipydatagrid.renderer import TextRenderer
256
257
  # from ipywidgets import HBox, VBox, Layout, widgets
257
258
 
@@ -7,7 +7,7 @@ where = ["."]
7
7
 
8
8
  [project]
9
9
  name = "ModelFlowIb"
10
- version = "2.55"
10
+ version = "2.57"
11
11
  description = "A tool to solve and manage dynamic economic models"
12
12
  authors = [{name = "Ib Hansen", email = "your@email.com"}]
13
13
  license = { text = "MIT" }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes