Skip to content
Snippets Groups Projects
Commit d82dcb04 authored by ojs1g14's avatar ojs1g14
Browse files

Merge branch 'ampscanGUI_initial_debug_docs' into 'master'

Removed section heading bug

See merge request !11
parents edcaf26a 767a3b7c
Branches
No related tags found
No related merge requests found
...@@ -17,6 +17,18 @@ from PyQt5.QtWidgets import (QAction, QApplication, QGridLayout, ...@@ -17,6 +17,18 @@ from PyQt5.QtWidgets import (QAction, QApplication, QGridLayout,
class AmpScanGUI(QMainWindow): class AmpScanGUI(QMainWindow):
"""
Generates an GUI for handling stl data. Window is derived from QT.
More detailed description...
Example
-------
Perhaps an example implementation:
>>> from AmpScan.AmpScanGUI import AmpScanGUI
"""
def __init__(self, parent = None): def __init__(self, parent = None):
super(AmpScanGUI, self).__init__() super(AmpScanGUI, self).__init__()
...@@ -38,6 +50,17 @@ class AmpScanGUI(QMainWindow): ...@@ -38,6 +50,17 @@ class AmpScanGUI(QMainWindow):
self.show() self.show()
def chooseOpenFile(self): def chooseOpenFile(self):
"""
Handles importing of stls into the GUI.
More writing...
Note
----
@Josh_Steer if no stl is selected then the window crashes!
"""
self.fname = QFileDialog.getOpenFileName(self, 'Open file', self.fname = QFileDialog.getOpenFileName(self, 'Open file',
filter="Meshes (*.stl)") filter="Meshes (*.stl)")
if self.AmpObj is not None: if self.AmpObj is not None:
...@@ -50,6 +73,10 @@ class AmpScanGUI(QMainWindow): ...@@ -50,6 +73,10 @@ class AmpScanGUI(QMainWindow):
self.renWin.renderActors([self.AmpObj.actor,]) self.renWin.renderActors([self.AmpObj.actor,])
def chooseSocket(self): def chooseSocket(self):
"""
Button in GUI.
"""
self.sockfname = QFileDialog.getOpenFileName(self, 'Open file', self.sockfname = QFileDialog.getOpenFileName(self, 'Open file',
filter="Meshes (*.stl)") filter="Meshes (*.stl)")
self.socket = AmpObject(self.sockfname[0], stype='socket') self.socket = AmpObject(self.sockfname[0], stype='socket')
......
...@@ -205,7 +205,7 @@ Solution: ...@@ -205,7 +205,7 @@ Solution:
A \_static file containing css templates does exist in docs\_build\\html but sphinx looks for it in docs. I copied the file to this location and the error went away. A \_static file containing css templates does exist in docs\_build\\html but sphinx looks for it in docs. I copied the file to this location and the error went away.
Tracback 4: Traceback 4:
\begin{lstlisting}[language=Python] \begin{lstlisting}[language=Python]
WARNING: toctree references unknown document 'source/AmpScan.analyse.analyseMixin.create_slices WARNING: toctree references unknown document 'source/AmpScan.analyse.analyseMixin.create_slices
...@@ -217,5 +217,17 @@ Solution: ...@@ -217,5 +217,17 @@ Solution:
'numpydoc' was removed from the extension list and replaced with 'sphinx.ext.napoleon'. 'numpydoc' was removed from the extension list and replaced with 'sphinx.ext.napoleon'.
Traceback 5:
\begin{lstlisting}[language=Python]
WARNING: Unexpected section title.
Bug
---
\end{lstlisting}
Solution:
Napoleon (sphinx support for numpy or google docstrings) only recognises a specific subset of headings of which "Bug" is not one. Allowed headings are outlined here; \url{http://www.sphinx-doc.org/en/stable/ext/napoleon.html}. I changed the offending section to "Note" which rendered fine.
\end{document} \end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment