Docs and doc generation updated for the restructuring

This commit is contained in:
Nicolas Kruse 2025-06-18 08:48:51 +02:00
parent 93f6d88cd4
commit 2f5cad3d05
4 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,5 @@
# gaspype.FloatArray # gaspype.typing.FloatArray
```{eval-rst} ```{eval-rst}
.. autoclass:: gaspype.FloatArray .. autoclass:: gaspype.typing.FloatArray
``` ```

View File

@ -17,8 +17,7 @@ def write_classes(f: TextIOWrapper, patterns: list[str], module_name: str, title
classes = [ classes = [
name for name, obj in inspect.getmembers(module, inspect.isclass) name for name, obj in inspect.getmembers(module, inspect.isclass)
if (obj.__module__ == module_name and if (any(fnmatch.fnmatch(name, pat) for pat in patterns if pat not in exclude) and
any(fnmatch.fnmatch(name, pat) for pat in patterns if pat not in exclude) and
obj.__doc__ and '(Automatic generated stub)' not in obj.__doc__) obj.__doc__ and '(Automatic generated stub)' not in obj.__doc__)
] ]
@ -45,8 +44,7 @@ def write_functions(f: TextIOWrapper, patterns: list[str], module_name: str, tit
functions = [ functions = [
name for name, obj in inspect.getmembers(module, inspect.isfunction) name for name, obj in inspect.getmembers(module, inspect.isfunction)
if (obj.__module__ == module_name and if (any(fnmatch.fnmatch(name, pat) for pat in patterns if pat not in exclude))
any(fnmatch.fnmatch(name, pat) for pat in patterns if pat not in exclude))
] ]
if description: if description:

View File

@ -1,5 +1,5 @@
# gaspype.NDFloat # gaspype.typing.NDFloat
```{eval-rst} ```{eval-rst}
.. autoclass:: gaspype.NDFloat .. autoclass:: gaspype.typing.NDFloat
``` ```

View File

@ -22,6 +22,7 @@ def test_elements():
df = pd.DataFrame(list(gp.elements(fl * np.array([1, 2, 3, 4])))) df = pd.DataFrame(list(gp.elements(fl * np.array([1, 2, 3, 4]))))
assert df.shape == (4, 2) assert df.shape == (4, 2)
def test_iter(): def test_iter():
fl = gp.fluid({'O2': 1, 'H2': 2, 'H2O': 3}) fl = gp.fluid({'O2': 1, 'H2': 2, 'H2O': 3})