ipyvasp 0.9.95__tar.gz → 0.9.97__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 (30) hide show
  1. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/PKG-INFO +7 -2
  2. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/README.md +6 -1
  3. ipyvasp-0.9.97/ipyvasp/_version.py +1 -0
  4. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/widgets.py +18 -28
  5. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp.egg-info/PKG-INFO +7 -2
  6. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/setup.py +13 -0
  7. ipyvasp-0.9.95/ipyvasp/_version.py +0 -1
  8. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/LICENSE +0 -0
  9. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/__init__.py +0 -0
  10. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/__main__.py +0 -0
  11. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/_enplots.py +0 -0
  12. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/_lattice.py +0 -0
  13. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/bsdos.py +0 -0
  14. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/cli.py +0 -0
  15. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/core/__init__.py +0 -0
  16. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/core/parser.py +0 -0
  17. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/core/plot_toolkit.py +0 -0
  18. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/core/serializer.py +0 -0
  19. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/core/spatial_toolkit.py +0 -0
  20. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/evals_dataframe.py +0 -0
  21. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/lattice.py +0 -0
  22. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/misc.py +0 -0
  23. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/potential.py +0 -0
  24. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp/utils.py +0 -0
  25. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp.egg-info/SOURCES.txt +0 -0
  26. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp.egg-info/dependency_links.txt +0 -0
  27. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp.egg-info/entry_points.txt +0 -0
  28. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp.egg-info/requires.txt +0 -0
  29. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/ipyvasp.egg-info/top_level.txt +0 -0
  30. {ipyvasp-0.9.95 → ipyvasp-0.9.97}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.95
3
+ Version: 0.9.97
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
@@ -34,6 +34,7 @@ Requires-Dist: nglview>=3.0.4; extra == "extra"
34
34
  # IPyVASP
35
35
 
36
36
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15482350.svg)](https://doi.org/10.5281/zenodo.15482350)
37
+ [![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
38
  [![PyPI Downloads](https://static.pepy.tech/badge/ipyvasp)](https://pepy.tech/projects/ipyvasp)
38
39
 
39
40
  An VASP-based DFT pre and post processing tool.
@@ -46,6 +47,10 @@ cd ipyvasp
46
47
  pip install -e .
47
48
  ```
48
49
 
50
+ ## Documentataion
51
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
52
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
53
+
49
54
  ## Showcase Examples
50
55
  Plot 2D BZ layer on top of 3D!
51
56
 
@@ -77,4 +82,4 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
77
82
  ![snip](op.png)
78
83
 
79
84
  ![BandsWidget](Bands.jpg)
80
- More coming soon!
85
+ 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).
@@ -1,6 +1,7 @@
1
1
  # IPyVASP
2
2
 
3
3
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15482350.svg)](https://doi.org/10.5281/zenodo.15482350)
4
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/asaboor-gh/ipyvasp/HEAD?urlpath=%2Fdoc%2Ftree%2Fdocs%2Fsource%2Fnotebooks%2Fquickstart.ipynb)
4
5
  [![PyPI Downloads](https://static.pepy.tech/badge/ipyvasp)](https://pepy.tech/projects/ipyvasp)
5
6
 
6
7
  An VASP-based DFT pre and post processing tool.
@@ -13,6 +14,10 @@ cd ipyvasp
13
14
  pip install -e .
14
15
  ```
15
16
 
17
+ ## Documentataion
18
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
19
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
20
+
16
21
  ## Showcase Examples
17
22
  Plot 2D BZ layer on top of 3D!
18
23
 
@@ -44,4 +49,4 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
44
49
  ![snip](op.png)
45
50
 
46
51
  ![BandsWidget](Bands.jpg)
47
- More coming soon!
52
+ 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).
@@ -0,0 +1 @@
1
+ __version__ = "0.9.97"
@@ -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
@@ -620,15 +613,14 @@ class _ThemedFigureInteract(ei.InteractBase):
620
613
  self.set_css() # automatically sets dark/light, ensure after icon set
621
614
  fig.layout.autosize = True # must
622
615
 
623
- @_sub_doc(ei.InteractBase.set_css) # overriding to alway be able to set_css
624
- def set_css(self, main=None, center=None):
616
+ def _set_css(self, main=None, center=None): # allowed overriding, but not set_css
625
617
  # This is after setting icon above, so logic is fliipped
626
618
  style = _get_css("light" if self._theme.icon == 'sun' else 'dark') # infer from icon to match
627
619
  if isinstance(main, dict):
628
620
  style = {**style, **main} # main should allow override
629
621
  elif main is not None:
630
622
  raise TypeError("main must be a dict or None, got: {}".format(type(main)))
631
- super().set_css(style, center)
623
+ super()._set_css(style, center)
632
624
 
633
625
  @property
634
626
  def files(self):
@@ -799,7 +791,7 @@ class BandsWidget(_ThemedFigureInteract):
799
791
 
800
792
  @ei.callback
801
793
  def _toggle_footer(self, showft):
802
- self._app.pane_heights = [0,100 - showft, showft]
794
+ self.pane_heights = [0,100 - showft, showft]
803
795
 
804
796
  @ei.callback
805
797
  def _set_krange(self, krange):
@@ -1038,25 +1030,23 @@ class KPathWidget(_ThemedFigureInteract):
1038
1030
 
1039
1031
  @ei.callback
1040
1032
  def _update_theme(self, fig, theme):
1041
- super()._update_theme(fig, theme) # call parent method, but important
1042
-
1033
+ return super()._update_theme(fig, theme)
1043
1034
 
1044
1035
  @ei.callback
1045
- def _toggle_lock(self, lock):
1046
- self.params.lock.icon = 'lock' if self.params.lock.icon == 'unlock' else 'unlock'
1047
- self._show_info(f"{self.params.lock.icon}ed adding/deleting kpoints!")
1048
-
1049
- @ei.callback
1050
- def _del_point(self, delp):
1051
- if self.params.lock.icon == 'unlock': # Do not delete locked
1052
- sm = self.params.sm
1053
- for v in sm.value: # for loop here is important to update selection properly
1054
- sm.options = [opt for opt in sm.options if opt[1] != v]
1055
- self._update_selection() # update plot as well
1036
+ def _respond_click(self, lock, delp):
1037
+ if lock.clicked:
1038
+ self.params.lock.icon = 'lock' if self.params.lock.icon == 'unlock' else 'unlock'
1039
+ self._show_info(f"{self.params.lock.icon}ed adding/deleting kpoints!")
1040
+ elif delp.clicked:
1041
+ if self.params.lock.icon == 'unlock': # Do not delete locked
1042
+ sm = self.params.sm
1043
+ for v in sm.value: # for loop here is important to update selection properly
1044
+ sm.options = [opt for opt in sm.options if opt[1] != v]
1045
+ self._update_selection() # update plot as well
1046
+ else:
1047
+ self._show_info("Select point(s) to delete")
1056
1048
  else:
1057
- self._show_info("Select point(s) to delete")
1058
- else:
1059
- self._show_info("cannot delete point when locked!", 'red')
1049
+ self._show_info("cannot delete point when locked!", 'red')
1060
1050
 
1061
1051
  def _add_point(self, kpt):
1062
1052
  sm = self.params.sm
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.95
3
+ Version: 0.9.97
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
@@ -34,6 +34,7 @@ Requires-Dist: nglview>=3.0.4; extra == "extra"
34
34
  # IPyVASP
35
35
 
36
36
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15482350.svg)](https://doi.org/10.5281/zenodo.15482350)
37
+ [![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
38
  [![PyPI Downloads](https://static.pepy.tech/badge/ipyvasp)](https://pepy.tech/projects/ipyvasp)
38
39
 
39
40
  An VASP-based DFT pre and post processing tool.
@@ -46,6 +47,10 @@ cd ipyvasp
46
47
  pip install -e .
47
48
  ```
48
49
 
50
+ ## Documentataion
51
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
52
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
53
+
49
54
  ## Showcase Examples
50
55
  Plot 2D BZ layer on top of 3D!
51
56
 
@@ -77,4 +82,4 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
77
82
  ![snip](op.png)
78
83
 
79
84
  ![BandsWidget](Bands.jpg)
80
- More coming soon!
85
+ 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).
@@ -94,6 +94,18 @@ class UploadCommand(Command):
94
94
 
95
95
  sys.exit()
96
96
 
97
+ class BuildDocsCommand(UploadCommand):
98
+ description = "Build docs using sphinx-build."
99
+ user_options = []
100
+
101
+ def run(self):
102
+ source = os.path.join(here, "docs","source")
103
+ build = os.path.join(here, "docs","build", "html")
104
+ os.makedirs(build, exist_ok=True)
105
+ ret = os.system(f"sphinx-build -b html {source} {build}")
106
+ if ret != 0:
107
+ raise RuntimeError("Sphinx docs build failed!")
108
+ print(f"✅ Documentation successfully built as {build}")
97
109
 
98
110
  # Where the magic happens:
99
111
  setup(
@@ -126,6 +138,7 @@ setup(
126
138
  # $ setup.py publish support.
127
139
  cmdclass={
128
140
  "upload": UploadCommand,
141
+ "build_docs": BuildDocsCommand,
129
142
  },
130
143
  # for command line interface
131
144
  entry_points={
@@ -1 +0,0 @@
1
- __version__ = "0.9.95"
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