docs: update documentation files and fix linting issues

This commit is contained in:
2026-07-07 13:32:48 +03:00
parent 9bf1e1333e
commit be3e288e0d
27 changed files with 423 additions and 250 deletions
+19 -9
View File
@@ -26,19 +26,24 @@ class TestFermiAPI:
ff = FermiFunction(Z=20, A=40)
assert "FermiFunction" in repr(ff)
class TestFermiProperties:
"""Shared property tests for FermiFunction."""
@pytest.mark.property
@pytest.mark.parametrize("W", [
[1.5],
[1.1, 2.0, 3.0],
np.linspace(1.01, 5.0, 20),
])
@pytest.mark.parametrize(
"W",
[
[1.5],
[1.1, 2.0, 3.0],
np.linspace(1.01, 5.0, 20),
],
)
def test_positive(self, W):
"""F₀ must be positive everywhere — it's a probability enhancement factor."""
ff = FermiFunction(Z=92, A=238) # Uranium — extreme case
from tests.common.test_property_tests import _test_positive_values
_test_positive_values(ff, W, component_name="FermiFunction")
@pytest.mark.quality
@@ -48,17 +53,22 @@ class TestFermiProperties:
ff = FermiFunction(Z=20, A=40)
W = np.linspace(1.1, 3.0, n)
from tests.common.test_property_tests import _test_output_shape_preserved
_test_output_shape_preserved(ff, W, component_name="FermiFunction")
@pytest.mark.quality
@pytest.mark.parametrize("W", [
np.linspace(1.01, 6.0, 50),
np.linspace(1.001, 10.0, 100),
])
@pytest.mark.parametrize(
"W",
[
np.linspace(1.01, 6.0, 50),
np.linspace(1.001, 10.0, 100),
],
)
def test_no_nan(self, W):
"""For very heavy nuclei, the loggamma implementation must not overflow."""
ff = FermiFunction(Z=92, A=238)
from tests.common.test_property_tests import _test_no_nan_across_range
_test_no_nan_across_range(ff, W, component_name="FermiFunction")
@pytest.mark.quality