ipyvasp 0.9.96__py2.py3-none-any.whl → 0.9.98__py2.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.
ipyvasp/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.9.96"
1
+ __version__ = "0.9.98"
ipyvasp/utils.py CHANGED
@@ -137,6 +137,19 @@ def _sig_kwargs(from_func, skip_params=()):
137
137
 
138
138
  return wrapper
139
139
 
140
+ def _md_code_blocks_to_rst(text):
141
+ def repl(match):
142
+ language = match.group(1) or 'python' # default to 'python' if no language
143
+ code = match.group(2)
144
+ return f'.. code-block:: {language}\n\n ' + '\n '.join(code.strip().splitlines())
145
+
146
+ return re.sub(
147
+ r'```([a-zA-Z0-9]*)\s*\n(.*?)```',
148
+ repl,
149
+ text,
150
+ flags=re.DOTALL
151
+ )
152
+
140
153
 
141
154
  def _sub_doc(from_func, replace={}):
142
155
  """Assing __doc__ from other function. Replace words in docs where need."""
@@ -148,7 +161,7 @@ def _sub_doc(from_func, replace={}):
148
161
 
149
162
  for k, v in replace.items():
150
163
  docs = re.sub(k, v, docs, count=1, flags=re.DOTALL)
151
- func.__doc__ = docs
164
+ func.__doc__ = _md_code_blocks_to_rst(docs)
152
165
  return func
153
166
 
154
167
  return wrapper
ipyvasp/widgets.py CHANGED
@@ -87,13 +87,6 @@ def summarize(files, func, **kwargs):
87
87
  )
88
88
 
89
89
 
90
- _progress_svg = """<svg xmlns="http://www.w3.org/2000/svg" height="5em" viewBox="0 0 50 50">
91
- <path fill="skyblue" d="M25,5A20.14,20.14,0,0,1,45,22.88a2.51,2.51,0,0,0,2.49,2.26h0A2.52,2.52,0,0,0,50,22.33a25.14,25.14,0,0,0-50,0,2.52,2.52,0,0,0,2.5,2.81h0A2.51,2.51,0,0,0,5,22.88,20.14,20.14,0,0,1,25,5Z">
92
- <animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.2s" repeatCount="indefinite"/>
93
- </path>
94
- </svg>"""
95
-
96
-
97
90
  def fix_signature(cls):
98
91
  # VBox ruins signature of subclass, let's fix it
99
92
  cls.__signature__ = inspect.signature(cls.__init__)
@@ -598,7 +591,7 @@ class _ThemedFigureInteract(ei.InteractBase):
598
591
  self.observe(self._autosize_figs, names = 'isfullscreen') # fix figurewidget problem
599
592
 
600
593
  def _autosize_figs(self, change):
601
- for w in self._all_widgets.values():
594
+ for w in self.params:
602
595
  # don't know yet about these without importing
603
596
  if re.search('plotly.*FigureWidget', str(type(w).__mro__)):
604
597
  w.layout.autosize = False # Double trigger is important
@@ -798,7 +791,7 @@ class BandsWidget(_ThemedFigureInteract):
798
791
 
799
792
  @ei.callback
800
793
  def _toggle_footer(self, showft):
801
- self._app.pane_heights = [0,100 - showft, showft]
794
+ self.pane_heights = [0,100 - showft, showft]
802
795
 
803
796
  @ei.callback
804
797
  def _set_krange(self, krange):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.96
3
+ Version: 0.9.98
4
4
  Summary: A processing tool for VASP DFT input/output processing in Jupyter Notebook.
5
5
  Home-page: https://github.com/massgh/ipyvasp
6
6
  Author: Abdul Saboor
@@ -24,6 +24,7 @@ Requires-Dist: plotly ==6.0.1
24
24
  Requires-Dist: requests ==2.28.1
25
25
  Requires-Dist: typer ==0.9.0
26
26
  Requires-Dist: einteract
27
+ Requires-Dist: sympy
27
28
  Provides-Extra: extra
28
29
  Requires-Dist: jupyterlab >=3.5.2 ; extra == 'extra'
29
30
  Requires-Dist: ipython >=8.7 ; extra == 'extra'
@@ -34,6 +35,7 @@ Requires-Dist: nglview >=3.0.4 ; extra == 'extra'
34
35
  # IPyVASP
35
36
 
36
37
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15482350.svg)](https://doi.org/10.5281/zenodo.15482350)
38
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/asaboor-gh/ipyvasp/HEAD?urlpath=%2Fdoc%2Ftree%2Fdocs%2Fsource%2Fnotebooks%2Fquickstart.ipynb)
37
39
  [![PyPI Downloads](https://static.pepy.tech/badge/ipyvasp)](https://pepy.tech/projects/ipyvasp)
38
40
 
39
41
  An VASP-based DFT pre and post processing tool.
@@ -81,4 +83,4 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
81
83
  ![snip](op.png)
82
84
 
83
85
  ![BandsWidget](Bands.jpg)
84
- More coming soon!
86
+ More coming soon! You can test these examples on [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/asaboor-gh/ipyvasp/HEAD?urlpath=%2Fdoc%2Ftree%2Fdocs%2Fsource%2Fnotebooks%2Fquickstart.ipynb).
@@ -2,7 +2,7 @@ ipyvasp/__init__.py,sha256=pzTqeKuf6sN2GQmaexmMgG677ggT3sxIFyQDXq_2whU,1422
2
2
  ipyvasp/__main__.py,sha256=eJV1TZSiT8mC_VqAeksNnBI2I8mKMiPkEIlwikbtOjI,216
3
3
  ipyvasp/_enplots.py,sha256=gJ7S9WBmrxvDEbmoccDRaJG01kpx9oNlRf7mozigbgY,37872
4
4
  ipyvasp/_lattice.py,sha256=6KOenMyIy675EUXlVSxt9RUyv4EcExk1tm0_mANSFLQ,105935
5
- ipyvasp/_version.py,sha256=LkfgD4k2g1qhFGmhFzf-cIDtAVsrYMYNg3_j7MN8nKU,24
5
+ ipyvasp/_version.py,sha256=FjYbN-6U13gyEJ29NpgnAZy9QDr5AKAfSQA2LODCGXs,24
6
6
  ipyvasp/bsdos.py,sha256=omEiQrdbyZDI0Vd39bktzEyw2Il_w9rFsmYR_jEF-Xk,32180
7
7
  ipyvasp/cli.py,sha256=aWFEVhNmnW8eSOp5uh95JaDwLQ9K9nlCQcbnOSuhWgw,6844
8
8
  ipyvasp/evals_dataframe.py,sha256=KWbkvQJSyXeTSG6LJGcZKs0s5-tor5uPee2P8FJd7vs,20759
@@ -10,16 +10,16 @@ ipyvasp/lattice.py,sha256=NAe4cmXwkd6V0pRDTw1g5_CoNMfqOIT-NpyOSlSfyv0,33710
10
10
  ipyvasp/misc.py,sha256=ItSsG_aWiQZNRXM2F23atmNVdedyXFYtoShflYRvzOU,2645
11
11
  ipyvasp/potential.py,sha256=tzA73c5lkp6ahLSJchMrU043-QWaOV0nIOUA7VMmfKQ,11408
12
12
  ipyvasp/surface.py,sha256=MjE5oB0wW6Pca_C-xu8rN6OMH7lUEeNPNyM7Kz_Im-8,23766
13
- ipyvasp/utils.py,sha256=joImNDyjpe4T3lrw738X3I3qA1-RysyYotJwlN9_z0w,17510
14
- ipyvasp/widgets.py,sha256=pT7MchxDryslCiFAAibZrSqRZ9gT59-iuub7ed2AdEA,53651
13
+ ipyvasp/utils.py,sha256=1TTULmj2L87tK-sMJdbkO_bHOziyUABLNONWCaGa-J8,17932
14
+ ipyvasp/widgets.py,sha256=aJqWD7XkGB7RMYKIJpa8drGd4K1iGEojb-Xdh0dKjVo,53159
15
15
  ipyvasp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  ipyvasp/core/parser.py,sha256=0EySeY5tIqJr-aBK_tJn4GfybV_-3OTBchXBj_cv7-k,39811
17
17
  ipyvasp/core/plot_toolkit.py,sha256=XUB8VYBjv81WowafgLEyHELmzQn-PT36KwLJZKXIx_c,36304
18
18
  ipyvasp/core/serializer.py,sha256=v0ma4htirybtQo_wFhIEjkRoZMQk9ETDz85iloaq3YY,38427
19
19
  ipyvasp/core/spatial_toolkit.py,sha256=dXowREhiFzBvvr5f_bApzFhf8IzjH2E2Ix90oCBUetY,14885
20
- ipyvasp-0.9.96.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
- ipyvasp-0.9.96.dist-info/METADATA,sha256=ro5a_ivKIKljgYXNYfqF85_ZDXoeT7xELH2EZVHXJpE,2820
22
- ipyvasp-0.9.96.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
23
- ipyvasp-0.9.96.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
24
- ipyvasp-0.9.96.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
- ipyvasp-0.9.96.dist-info/RECORD,,
20
+ ipyvasp-0.9.98.dist-info/LICENSE,sha256=F3SO5RiAZOMfmMGf1KOuk2g_c4ObvuBJhd9iBLDgXoQ,1263
21
+ ipyvasp-0.9.98.dist-info/METADATA,sha256=nkZPBbco43_ge2JORmJBd99XPt_ZWf_wm6yfF6qZHKo,3215
22
+ ipyvasp-0.9.98.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
23
+ ipyvasp-0.9.98.dist-info/entry_points.txt,sha256=C7m0Sjmr14wFjflCkWXLzr5N6-cQj8uJC9n82mUtzt8,44
24
+ ipyvasp-0.9.98.dist-info/top_level.txt,sha256=ftziWlMWu_1VpDP1sRTFrkfBnWxAi393HYDVu4wRhUk,8
25
+ ipyvasp-0.9.98.dist-info/RECORD,,