ipyvasp 0.9.94__tar.gz → 0.9.96__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.94 → ipyvasp-0.9.96}/PKG-INFO +6 -2
  2. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/README.md +5 -1
  3. ipyvasp-0.9.96/ipyvasp/_version.py +1 -0
  4. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/widgets.py +24 -19
  5. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp.egg-info/PKG-INFO +6 -2
  6. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/setup.py +13 -0
  7. ipyvasp-0.9.94/ipyvasp/_version.py +0 -1
  8. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/LICENSE +0 -0
  9. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/__init__.py +0 -0
  10. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/__main__.py +0 -0
  11. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/_enplots.py +0 -0
  12. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/_lattice.py +0 -0
  13. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/bsdos.py +0 -0
  14. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/cli.py +0 -0
  15. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/core/__init__.py +0 -0
  16. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/core/parser.py +0 -0
  17. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/core/plot_toolkit.py +0 -0
  18. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/core/serializer.py +0 -0
  19. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/core/spatial_toolkit.py +0 -0
  20. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/evals_dataframe.py +0 -0
  21. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/lattice.py +0 -0
  22. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/misc.py +0 -0
  23. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/potential.py +0 -0
  24. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp/utils.py +0 -0
  25. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp.egg-info/SOURCES.txt +0 -0
  26. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp.egg-info/dependency_links.txt +0 -0
  27. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp.egg-info/entry_points.txt +0 -0
  28. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp.egg-info/requires.txt +0 -0
  29. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/ipyvasp.egg-info/top_level.txt +0 -0
  30. {ipyvasp-0.9.94 → ipyvasp-0.9.96}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.94
3
+ Version: 0.9.96
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
@@ -46,6 +46,10 @@ cd ipyvasp
46
46
  pip install -e .
47
47
  ```
48
48
 
49
+ ## Documentataion
50
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
51
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
52
+
49
53
  ## Showcase Examples
50
54
  Plot 2D BZ layer on top of 3D!
51
55
 
@@ -76,5 +80,5 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
76
80
 
77
81
  ![snip](op.png)
78
82
 
79
-
83
+ ![BandsWidget](Bands.jpg)
80
84
  More coming soon!
@@ -13,6 +13,10 @@ cd ipyvasp
13
13
  pip install -e .
14
14
  ```
15
15
 
16
+ ## Documentataion
17
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
18
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
19
+
16
20
  ## Showcase Examples
17
21
  Plot 2D BZ layer on top of 3D!
18
22
 
@@ -43,5 +47,5 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
43
47
 
44
48
  ![snip](op.png)
45
49
 
46
-
50
+ ![BandsWidget](Bands.jpg)
47
51
  More coming soon!
@@ -0,0 +1 @@
1
+ __version__ = "0.9.96"
@@ -595,6 +595,14 @@ class _ThemedFigureInteract(ei.InteractBase):
595
595
  raise AttributeError("subclass must include already initialized "
596
596
  "{'fig': self._fig,'theme':self._theme} in returned dict of _interactive_params() method.")
597
597
  self._update_theme(self._fig,self._theme) # fix theme in starts
598
+ self.observe(self._autosize_figs, names = 'isfullscreen') # fix figurewidget problem
599
+
600
+ def _autosize_figs(self, change):
601
+ for w in self._all_widgets.values():
602
+ # don't know yet about these without importing
603
+ if re.search('plotly.*FigureWidget', str(type(w).__mro__)):
604
+ w.layout.autosize = False # Double trigger is important
605
+ w.layout.autosize = True
598
606
 
599
607
  def _interactive_params(self): return {}
600
608
 
@@ -612,15 +620,14 @@ class _ThemedFigureInteract(ei.InteractBase):
612
620
  self.set_css() # automatically sets dark/light, ensure after icon set
613
621
  fig.layout.autosize = True # must
614
622
 
615
- @_sub_doc(ei.InteractBase.set_css) # overriding to alway be able to set_css
616
- def set_css(self, main=None, center=None):
623
+ def _set_css(self, main=None, center=None): # allowed overriding, but not set_css
617
624
  # This is after setting icon above, so logic is fliipped
618
625
  style = _get_css("light" if self._theme.icon == 'sun' else 'dark') # infer from icon to match
619
626
  if isinstance(main, dict):
620
627
  style = {**style, **main} # main should allow override
621
628
  elif main is not None:
622
629
  raise TypeError("main must be a dict or None, got: {}".format(type(main)))
623
- super().set_css(style, center)
630
+ super()._set_css(style, center)
624
631
 
625
632
  @property
626
633
  def files(self):
@@ -1030,25 +1037,23 @@ class KPathWidget(_ThemedFigureInteract):
1030
1037
 
1031
1038
  @ei.callback
1032
1039
  def _update_theme(self, fig, theme):
1033
- super()._update_theme(fig, theme) # call parent method, but important
1034
-
1035
-
1036
- @ei.callback
1037
- def _toggle_lock(self, lock):
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
+ return super()._update_theme(fig, theme)
1040
1041
 
1041
1042
  @ei.callback
1042
- def _del_point(self, delp):
1043
- if self.params.lock.icon == 'unlock': # Do not delete locked
1044
- sm = self.params.sm
1045
- for v in sm.value: # for loop here is important to update selection properly
1046
- sm.options = [opt for opt in sm.options if opt[1] != v]
1047
- self._update_selection() # update plot as well
1043
+ def _respond_click(self, lock, delp):
1044
+ if lock.clicked:
1045
+ self.params.lock.icon = 'lock' if self.params.lock.icon == 'unlock' else 'unlock'
1046
+ self._show_info(f"{self.params.lock.icon}ed adding/deleting kpoints!")
1047
+ elif delp.clicked:
1048
+ if self.params.lock.icon == 'unlock': # Do not delete locked
1049
+ sm = self.params.sm
1050
+ for v in sm.value: # for loop here is important to update selection properly
1051
+ sm.options = [opt for opt in sm.options if opt[1] != v]
1052
+ self._update_selection() # update plot as well
1053
+ else:
1054
+ self._show_info("Select point(s) to delete")
1048
1055
  else:
1049
- self._show_info("Select point(s) to delete")
1050
- else:
1051
- self._show_info("cannot delete point when locked!", 'red')
1056
+ self._show_info("cannot delete point when locked!", 'red')
1052
1057
 
1053
1058
  def _add_point(self, kpt):
1054
1059
  sm = self.params.sm
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ipyvasp
3
- Version: 0.9.94
3
+ Version: 0.9.96
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
@@ -46,6 +46,10 @@ cd ipyvasp
46
46
  pip install -e .
47
47
  ```
48
48
 
49
+ ## Documentataion
50
+ - [Latest at Github Pages](https://asaboor-gh.github.io/ipyvasp/)
51
+ - [Read the Docs](https://ipyvasp.readthedocs.io/)
52
+
49
53
  ## Showcase Examples
50
54
  Plot 2D BZ layer on top of 3D!
51
55
 
@@ -76,5 +80,5 @@ Apply operations on POSCAR and simultaneously view using plotly's `FigureWidget`
76
80
 
77
81
  ![snip](op.png)
78
82
 
79
-
83
+ ![BandsWidget](Bands.jpg)
80
84
  More coming soon!
@@ -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.94"
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