Skip to content

Commit

Permalink
test: remove subfolder structure ang. dist. tests
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Jan 5, 2021
1 parent c89a11c commit 21c6ab8
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!*.yml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import numpy as np
import pytest

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
SCRIPT_NAME = os.path.basename(__file__)
SCRIPT_NAME = os.path.splitext(SCRIPT_NAME)[0]


# Use this function to reproduce the model file.
# Note the normalization part has been removed!
Expand All @@ -27,7 +31,7 @@ def generate_model() -> None:
generator = HelicityAmplitudeGenerator()
amplitude_model = generator.generate(result)
amplitude_model.dynamics.set_non_dynamic("D*(2010)+")
write(amplitude_model, "model.yml")
write(amplitude_model, f"{SCRIPT_NAME}.yml")


# Use this function to reproduce the theoretical predictions.
Expand Down Expand Up @@ -98,9 +102,8 @@ def calculate_integral(
def intensity_dataset(
generate_dataset: Callable,
) -> np.ndarray:
thisdirectory = os.path.dirname(os.path.realpath(__file__))
return generate_dataset(
model_filename=thisdirectory + "/model.yml",
model_filename=f"{SCRIPT_DIR}/{SCRIPT_NAME}.yml",
events=30000,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
import numpy as np
import pytest

SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
SCRIPT_NAME = os.path.basename(__file__)
SCRIPT_NAME = os.path.splitext(SCRIPT_NAME)[0]


# Use this function to reproduce the model file.
# Note the normalization part has been removed!
Expand Down Expand Up @@ -41,7 +45,7 @@ def generate_model() -> None:
generator = HelicityAmplitudeGenerator()
amplitude_model = generator.generate(result)
amplitude_model.dynamics.set_non_dynamic("D(2)*(2460)+")
write(amplitude_model, "model.yml")
write(amplitude_model, f"{SCRIPT_NAME}.yml")


# Use this function to reproduce the theoretical predictions.
Expand Down Expand Up @@ -110,9 +114,8 @@ def calculate_integral(
def intensity_dataset(
generate_dataset: Callable,
) -> np.ndarray:
thisdirectory = os.path.dirname(os.path.realpath(__file__))
return generate_dataset(
model_filename=thisdirectory + "/model.yml",
model_filename=f"{SCRIPT_DIR}/{SCRIPT_NAME}.yml",
events=50000,
)

Expand Down

0 comments on commit 21c6ab8

Please sign in to comment.