diff --git a/AmpScan/AmpScanGUI.py b/AmpScan/AmpScanGUI.py index 7c6c9828b93590a234c991135c40c12ca8b5abc8..96788e0fd12cbeab16a8d1dcefa40a0cd401da41 100644 --- a/AmpScan/AmpScanGUI.py +++ b/AmpScan/AmpScanGUI.py @@ -17,6 +17,18 @@ from PyQt5.QtWidgets import (QAction, QApplication, QGridLayout, 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): super(AmpScanGUI, self).__init__() @@ -38,6 +50,17 @@ class AmpScanGUI(QMainWindow): self.show() 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', filter="Meshes (*.stl)") if self.AmpObj is not None: @@ -50,6 +73,10 @@ class AmpScanGUI(QMainWindow): self.renWin.renderActors([self.AmpObj.actor,]) def chooseSocket(self): + """ + Button in GUI. + + """ self.sockfname = QFileDialog.getOpenFileName(self, 'Open file', filter="Meshes (*.stl)") self.socket = AmpObject(self.sockfname[0], stype='socket') diff --git a/Internship_Diary/main.tex b/Internship_Diary/main.tex index 18a5b3697387359af2417c53c36761f59996cbbf..ddbd77ce00e312b13b918cfe3516159b671a2818 100644 --- a/Internship_Diary/main.tex +++ b/Internship_Diary/main.tex @@ -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. -Tracback 4: +Traceback 4: \begin{lstlisting}[language=Python] WARNING: toctree references unknown document 'source/AmpScan.analyse.analyseMixin.create_slices @@ -217,5 +217,17 @@ Solution: '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}