diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e879bee..6332d18 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,6 +21,8 @@ jobs: run: pip install sphinx sphinx_rtd_theme sphinx-autodoc-typehints myst-parser - name: Generate Class List run: | + echo "Create a dummy file to ensure the class list generation works" + printf 'gapy\x00\x00\x00\x00' > src/gaspype/data/therm_data.bin pip install . python ./docs/source/generate_class_list.py - name: Build Docs diff --git a/src/gaspype/__init__.py b/src/gaspype/__init__.py index 4e76e32..e5ff204 100644 --- a/src/gaspype/__init__.py +++ b/src/gaspype/__init__.py @@ -1002,10 +1002,9 @@ def carbon_activity(f: fluid | elements, t: float, p: float) -> float: return exp(lnalpha) -_oxygen_data = fluid({'O2': 1}) - - def oxygen_partial_pressure(f: fluid | elements, t: float, p: float) -> FloatArray | float: + _oxygen_data = fluid({'O2': 1}) + def get_oxygen(x: FloatArray) -> float: g_rt = f.fs.get_species_g_rt(t) g_rt_o2 = _oxygen_data.fs.get_species_g_rt(t)[0] diff --git a/thermo_data/README.md b/thermo_data/README.md index c8b0378..89df24b 100644 --- a/thermo_data/README.md +++ b/thermo_data/README.md @@ -31,7 +31,7 @@ General syntax is: ```python compile_to_bin.py YAML_INPUT_FILE BINARY_OUTPUT_FIL The binary format is structured like this, it uses little-endian and IEEE 754 floats: ``` [4 Byte magic number: 'gapy'] -[8 Byte: 32 Bit integer for length of all species names (NAMES_LENGTH)] +[4 Byte: 32 Bit integer for length of all species names (NAMES_LENGTH)] [NAMES_LENGTH Bytes: ASCII encoded string with all species names separated by space] [Index [For each species