Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docstrings of Tracker tests #2781

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def interaction_type_in_use(
nb_simulation_verysimple,
):
"""Last interaction types of rpacket from LastInteractionTracker"""
"""Last interaction types of rpacket from LastInteractionTracker class"""
transport_state = nb_simulation_verysimple.transport.transport_state
interaction_type = transport_state.last_interaction_type
return interaction_type
Expand All @@ -23,7 +23,9 @@ def shell_id_in_use(
nb_simulation_verysimple,
interaction_type_in_use,
):
"""Last interaction types of rpacket from LastInteractionTracker"""
"""
shell_id when last interaction is line from LastInteractionTracker class
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
shell_id when last interaction is line from LastInteractionTracker class
`shell_id` when last interaction is line from `LastInteractionTracker` class

"""
transport_state = nb_simulation_verysimple.transport.transport_state
shell_id = transport_state.last_line_interaction_shell_id
mask = interaction_type_in_use == InteractionType.LINE
Expand All @@ -34,7 +36,9 @@ def shell_id_in_use(
def interaction_type_to_check(
nb_simulation_verysimple,
):
"""Last interaction types of rpacket from RPacketLastInteractionTracker"""
"""
Last interaction types of rpacket from RPacketLastInteractionTracker class
"""
transport_state = nb_simulation_verysimple.transport.transport_state
interaction_type = np.empty(
len(transport_state.rpacket_tracker), dtype=np.int64
Expand All @@ -52,7 +56,9 @@ def shell_id_to_check(
nb_simulation_verysimple,
interaction_type_to_check,
):
"""Last interaction types of rpacket from RPacketLastInteractionTracker"""
"""
shell_id when last interaction is line from RPacketLastInteractionTracker class
"""
transport_state = nb_simulation_verysimple.transport.transport_state
shell_id = np.empty(len(transport_state.rpacket_tracker), dtype=np.int64)
for i, last_interaction_tracker in enumerate(
Expand All @@ -78,7 +84,9 @@ def nu_packet_collection(
def nu_to_check(
nb_simulation_verysimple,
):
"""Last interaction output nus of rpacket from RPacketLastInteractionTracker"""
"""
Last interaction output nus of rpacket from RPacketLastInteractionTracker class
"""
transport_state = nb_simulation_verysimple.transport.transport_state
nu = np.empty(len(transport_state.rpacket_tracker), dtype=np.float64)
for i, last_interaction_tracker in enumerate(
Expand Down
14 changes: 9 additions & 5 deletions tardis/transport/montecarlo/tests/test_rpacket_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def interaction_type_last_interaction_class(
simulation_rpacket_tracking,
):
"""Last interaction types of rpacket from LastInteractionTracker"""
"""Last interaction types of rpacket from LastInteractionTracker class"""
interaction_type = (
simulation_rpacket_tracking.transport.transport_state.last_interaction_type
)
Expand All @@ -27,7 +27,9 @@ def interaction_type_last_interaction_class(
def shell_id_last_interaction_class(
simulation_rpacket_tracking,
):
"""Last Line Interaction Shell Id of rpacket from LastInteractionTracker"""
"""
shell_id when last interaction is line from LastInteractionTracker class
"""
interaction_type = (
simulation_rpacket_tracking.transport.transport_state.last_interaction_type
)
Expand Down Expand Up @@ -62,7 +64,7 @@ def rpacket_tracker(simulation_rpacket_tracking):

@pytest.fixture(scope="module")
def last_interaction_type_rpacket_tracker(rpacket_tracker):
"""Last interaction types of rpacket from RPacketTracker"""
"""Last interaction types of rpacket from RPacketTracker class"""
no_of_packets = len(rpacket_tracker)
interaction_type = np.empty(no_of_packets, dtype=np.int64)

Expand All @@ -78,7 +80,9 @@ def last_interaction_type_rpacket_tracker(rpacket_tracker):
def shell_id_rpacket_tracker(
rpacket_tracker, last_interaction_type_rpacket_tracker
):
"""Last line interaction shell id of rpacket from RPacketTracker"""
"""
shell_id when last interaction is line from RPacketTracker class
"""
no_of_packets = len(rpacket_tracker)
shell_id = np.empty(no_of_packets, dtype=np.int64)

Expand All @@ -93,7 +97,7 @@ def shell_id_rpacket_tracker(

@pytest.fixture()
def nu_rpacket_tracker(rpacket_tracker):
"""Output nu of rpacket from RPacketTracker"""
"""Output nu of rpacket from RPacketTracker class"""
no_of_packets = len(rpacket_tracker)
nu = np.empty(no_of_packets, dtype=np.float64)

Expand Down
Loading