Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/includes/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ resampleMinAngle : float
resampleNPoints : int
The number of initial points to use for resampling.
display : str
How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'.
How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'.
IPCFilePath : str
The path of the inter process communication file.
updateFreq : int
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = "ratapi"
version = "0.0.0.dev15"
version = "0.0.0.dev16"
description = "Python extension for the Reflectivity Analysis Toolbox (RAT)"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
2 changes: 1 addition & 1 deletion ratapi/controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Controls(BaseModel, validate_assignment=True, extra="forbid", use_attribut
"""The number of initial points to use for resampling."""

display: Display = Display.Iter
"""How much RAT should print to the terminal. Can be 'off', 'iter', 'notify', or 'final'."""
"""How much RAT should print to the terminal. Can be 'off', 'iter', or 'final'."""

# Simplex
xTolerance: float = Field(1.0e-6, gt=0.0)
Expand Down
2 changes: 1 addition & 1 deletion ratapi/examples/domains/domains_XY_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def domains_XY_model(params, bulk_in, bulk_out, contrast, domain):
vfWater = 1 - totalVF

# Now convert the Volume Fractions to SLDs
siSLD = vfSilicon * bulk_in
siSLD = vfSilicon * bulk_in[contrast - 1]
oxSLD = vfOxide * 3.41e-6

# Layer SLD depends on whether we are calculating the domain or not
Expand Down
1 change: 0 additions & 1 deletion ratapi/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class Display(RATEnum):

Off = "off"
Iter = "iter"
Notify = "notify"
Final = "final"


Expand Down
12 changes: 6 additions & 6 deletions tests/test_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_calculate_property_values(self, control_property: str, value: Any) -> N
("numSimulationPoints", 10),
("resampleMinAngle", 0.2),
("resampleNPoints", 1),
("display", Display.Notify),
("display", Display.Final),
],
)
def test_calculate_property_setters(self, control_property: str, value: Any) -> None:
Expand Down Expand Up @@ -211,7 +211,7 @@ def test_calculate_parallel_validation(self, value: Any) -> None:
@pytest.mark.parametrize("value", ["test", "iterate", True, 1, 3.0])
def test_calculate_display_validation(self, value: Any) -> None:
"""Tests the display setter validation in Calculate class."""
with pytest.raises(pydantic.ValidationError, match="Input should be 'off', 'iter', 'notify' or 'final'"):
with pytest.raises(pydantic.ValidationError, match="Input should be 'off', 'iter' or 'final'"):
self.calculate.display = value

def test_str(self, table_str) -> None:
Expand Down Expand Up @@ -277,7 +277,7 @@ def test_simplex_property_values(self, control_property: str, value: Any) -> Non
("numSimulationPoints", 10),
("resampleMinAngle", 0.2),
("resampleNPoints", 1),
("display", Display.Notify),
("display", Display.Final),
("xTolerance", 4e-6),
("funcTolerance", 3e-4),
("maxFuncEvals", 100),
Expand Down Expand Up @@ -436,7 +436,7 @@ def test_de_property_values(self, control_property: str, value: Any) -> None:
("numSimulationPoints", 10),
("resampleMinAngle", 0.2),
("resampleNPoints", 1),
("display", Display.Notify),
("display", Display.Final),
("populationSize", 20),
("fWeight", 0.3),
("crossoverProbability", 0.4),
Expand Down Expand Up @@ -603,7 +603,7 @@ def test_ns_property_values(self, control_property: str, value: Any) -> None:
("numSimulationPoints", 10),
("resampleMinAngle", 0.2),
("resampleNPoints", 1),
("display", Display.Notify),
("display", Display.Final),
("nLive", 1500),
("nMCMC", 1),
("propScale", 0.5),
Expand Down Expand Up @@ -773,7 +773,7 @@ def test_dream_property_values(self, control_property: str, value: Any) -> None:
("numSimulationPoints", 10),
("resampleMinAngle", 0.2),
("resampleNPoints", 1),
("display", Display.Notify),
("display", Display.Final),
("nSamples", 500),
("nChains", 1000),
("jumpProbability", 0.7),
Expand Down
1 change: 0 additions & 1 deletion tests/test_enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
(Parallel, "contrasts", Parallel.Contrasts),
(Display, "off", Display.Off),
(Display, "iter", Display.Iter),
(Display, "notify", Display.Notify),
(Display, "final", Display.Final),
(BoundHandling, "off", BoundHandling.Off),
(BoundHandling, "reflect", BoundHandling.Reflect),
Expand Down
Loading