hbui
2024-07-23 97dc9f0c94dc9bf0f244be8aedcf137574cc497e
fix spell
6 files modified
47 ■■■■ changed files
num-int/Readme.md 2 ●●● patch | view | raw | blame | history
num-int/src/numint/guimain.py 12 ●●●● patch | view | raw | blame | history
num-int/test/numint/riemann_sum_test.py 5 ●●●●● patch | view | raw | blame | history
stundenplan/Readme.md 22 ●●●●● patch | view | raw | blame | history
stundenplan/pyproject.toml 3 ●●●● patch | view | raw | blame | history
stundenplan/src/pygraph/graphdemo.py 3 ●●●● patch | view | raw | blame | history
num-int/Readme.md
@@ -13,7 +13,7 @@
## Run Unittest
```shell
python3 -m unittet discover --pattern *test.py
python3 -m unittest discover --pattern *test.py
```
## Run programm
num-int/src/numint/guimain.py
@@ -12,11 +12,11 @@
matplotlib.use('QtAgg')
class MplCanvas(FigureCanvasQTAgg):
class PlotCanvas(FigureCanvasQTAgg):
    def __init__(self, parent=None, width=5, height=4, dpi=100):
        fig = Figure(figsize=(width, height), dpi=dpi)
        self.axes = fig.add_subplot(111)
        super(MplCanvas, self).__init__(fig)
        super(PlotCanvas, self).__init__(fig)
class MainWindow(QMainWindow):
@@ -24,7 +24,7 @@
        super(MainWindow, self).__init__()
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
        self.canvas = MplCanvas(self)
        self.canvas = PlotCanvas(self)
        self._update_plot()
        toolbar = NavigationToolbar(self.canvas, self)
@@ -62,13 +62,13 @@
        self.canvas.axes.cla()  # Clear the canvas.
        # self.canvas.axes.stairs(self.y[1:],   self.x, baseline=0, fill=True, alpha=0.5, label=self.fn_expr)
        # self.canvas.axes.stairs(self.y[0:-1], self.x, baseline=0, fill=True, alpha=0.5, label=self.fn_expr)
        self.canvas.axes.step(self.x, self.y, color="blue",   where = "pre",  label=self.fn_expr)
        self.canvas.axes.step(self.x, self.y, color="orange", where = "post", label=self.fn_expr)
        self.canvas.axes.step(self.x, self.y, color="blue",   where="pre",  label=self.fn_expr)
        self.canvas.axes.step(self.x, self.y, color="orange", where="post", label=self.fn_expr)
        self.canvas.axes.plot(self.x, self.y, color="black")
        self.canvas.draw()
def main():
    app = QApplication(sys.argv)
    window = MainWindow()
num-int/test/numint/riemann_sum_test.py
@@ -2,6 +2,7 @@
import unittest
from numint.riemann_sum import split, numint_epsilon, numint_compact, numint_section
Epsilon = 0.0001
class RiemannSumTestCase(unittest.TestCase):
    """
@@ -31,6 +32,10 @@
        print(l, r)
        pass
    def genauigkeit(self):
        expeted = 12.3456
        result = calculate_complex_fun(...)
        self.assertTrue(abs(expeted - result) < Epsilon)
stundenplan/Readme.md
@@ -1 +1,21 @@
Beispielanwendung von Graph
# Beispielanwendung von Graph
## Installation
Installation das Projekt auf einem virtuellen Python-Umgebung:
````shell
pip install -e .
````
## Run Unittest
```shell
python3 -m unittest discover --pattern *tests.py
```
## Run programm
```shell
```
stundenplan/pyproject.toml
@@ -12,5 +12,6 @@
# [project.scripts]
# To be done
# ttgeo = "turtlegeo.main:main"
# studenplan = "TODO: to-be-done"
stundenplan/src/pygraph/graphdemo.py
@@ -8,6 +8,7 @@
            if not isinstance(vertex, int):
                raise TypeError(f"Argument {vertex} is not a valid vertex")
            self._adjacent[vertex] = set()
            self._vertex_attribute[vertex] = {}
        pass
    def add_edge(self, u, v):
@@ -35,7 +36,7 @@
        """
        if vertex not in self._adjacent:
            raise ValueError(f"Graph does not include vertex {vertex}")
        old_attributes = self._vertex_attribute[vertex]
        old_attributes = self._vertex_attribute.get[vertex]
        self._vertex_attribute[vertex] = old_attributes | properties
        return self
        pass