Skip to content

Commit fc69dba

Browse files
Merge pull request #179 from cta-observatory/fix_tests
added new tests
2 parents aaf9c9b + e88ba0d commit fc69dba

File tree

8 files changed

+1039
-954
lines changed

8 files changed

+1039
-954
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
MAGIC_CTA_DATA_USER: ${{ secrets.magic_cta_data_user }}
117117
MAGIC_CTA_DATA_PASSWORD: ${{ secrets.magic_cta_data_password }}
118118
run: |
119-
coverage run -m pytest -v
119+
coverage run -m pytest -vra
120120
coverage xml
121121
122122
- uses: codecov/codecov-action@v3

environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies:
3232
- psutil
3333
- pytest
3434
- pytest-cov
35+
- pytest-dependency
3536
- pytest-runner
3637
- pyyaml
3738
- scikit-learn=1.2

magicctapipe/conftest.py

+3-10
Original file line numberDiff line numberDiff line change
@@ -418,14 +418,6 @@ def config_calib():
418418
return config
419419

420420

421-
@pytest.fixture(scope="session")
422-
def config_check():
423-
config_path = resource_file("test_check_list.yaml")
424-
with open(config_path, "rb") as f:
425-
config = yaml.safe_load(f)
426-
return config
427-
428-
429421
"""
430422
Data processing
431423
"""
@@ -540,6 +532,7 @@ def p_l1_monly(temp_DL1_p_monly, dl0_p, config_monly):
540532
"""
541533
Produce a DL1 file
542534
"""
535+
543536
for file in dl0_p:
544537
subprocess.run(
545538
[
@@ -1041,7 +1034,7 @@ def real_index(real_dl3):
10411034
f"-i{str(real_dl3)}",
10421035
]
10431036
)
1044-
return temp_DL3
1037+
return real_dl3
10451038

10461039

10471040
@pytest.fixture(scope="session")
@@ -1056,4 +1049,4 @@ def real_index_monly(real_dl3_monly):
10561049
f"-i{str(real_dl3_monly)}",
10571050
]
10581051
)
1059-
return temp_DL3_monly
1052+
return real_dl3_monly

magicctapipe/io/io.py

-8
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,6 @@ def recursive_solution(current_tel, current_comb):
217217

218218
for key in range(len(keys)):
219219
recursive_solution(key, ["", []])
220-
values = list(TEL_NAMES.values()) # TODO: remove in next PR
221-
if set(values) == set(["LST-1", "MAGIC-I", "MAGIC-II"]): # TODO: remove in next PR
222-
TEL_COMBINATIONS = {
223-
"M1_M2": [2, 3], # combo_type = 0
224-
"LST1_M1": [1, 2], # combo_type = 1
225-
"LST1_M2": [1, 3], # combo_type = 2
226-
"LST1_M1_M2": [1, 2, 3], # combo_type = 3
227-
} # WARNING: the IDs provided in the configuration file must be the standard ones in this case. (LST1, M1, M2) = (1, 2, 3)
228220
return TEL_NAMES, TEL_COMBINATIONS
229221

230222

0 commit comments

Comments
 (0)