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

added new tests #179

Merged
merged 32 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fdc6752
added new tests
Elisa-Visentin Dec 1, 2023
53fd1e1
Update functions.py
Elisa-Visentin Dec 2, 2023
c982743
Fix test
Elisa-Visentin Dec 2, 2023
0e5a1e9
dependencies in tests
Elisa-Visentin Jan 6, 2024
f2458f3
Update ci.yml
Elisa-Visentin Jan 7, 2024
b97ed37
tests
Elisa-Visentin Jan 8, 2024
37846ef
Merge branch 'master' into fix_tests
Elisa-Visentin Jan 8, 2024
dce3019
pre-commit
Elisa-Visentin Jan 8, 2024
a0cdc4b
Update test_io.py
Elisa-Visentin Jan 8, 2024
0245605
Update test_io_monly.py
Elisa-Visentin Jan 8, 2024
5523753
Update test_io.py
Elisa-Visentin Jan 8, 2024
6e02b77
Update test_io.py
Elisa-Visentin Jan 8, 2024
206ec83
Update test_io.py
Elisa-Visentin Jan 8, 2024
a73be6f
wrong dependencies
Elisa-Visentin Jan 8, 2024
c68b0f9
wrong dependencies
Elisa-Visentin Jan 8, 2024
703454e
Merge branch 'master' into fix_tests
Elisa-Visentin Jan 17, 2024
825b369
Update test_io.py
Elisa-Visentin Jan 17, 2024
985460f
Update test_io.py
Elisa-Visentin Jan 17, 2024
e8950d0
Update io.py
Elisa-Visentin Jan 17, 2024
f245139
Skip telescope combinations with no events.
aleberti Jan 17, 2024
08782cb
Put back telescope combinations as before.
aleberti Jan 17, 2024
7a2285a
Use correct combo type for MAGIC only.
aleberti Jan 17, 2024
dc89b92
Use correct list for telescope combinations.
aleberti Jan 17, 2024
1cc1f8a
Use correct combination types in tests.
aleberti Jan 17, 2024
823f4ea
fix combos
Elisa-Visentin Jan 17, 2024
0d64932
some fixes
Elisa-Visentin Jan 17, 2024
e5ba376
some removed duplicates
Elisa-Visentin Jan 17, 2024
22564b7
Update test_io.py
Elisa-Visentin Jan 18, 2024
f2c7590
some fixes
Elisa-Visentin Jan 18, 2024
2354f00
fixes
Elisa-Visentin Jan 18, 2024
787284c
pyflakes
Elisa-Visentin Jan 18, 2024
1f44406
Merge branch 'master' into fix_tests
Elisa-Visentin Jan 18, 2024
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
MAGIC_CTA_DATA_USER: ${{ secrets.magic_cta_data_user }}
MAGIC_CTA_DATA_PASSWORD: ${{ secrets.magic_cta_data_password }}
run: |
coverage run -m pytest -v
coverage run -m pytest -vra
coverage xml

- uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ dependencies:
- psutil
- pytest
- pytest-cov
- pytest-dependency
- pytest-runner
- pyyaml
- scikit-learn=1.2
Expand Down
13 changes: 3 additions & 10 deletions magicctapipe/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,6 @@ def config_calib():
return config


@pytest.fixture(scope="session")
def config_check():
config_path = resource_file("test_check_list.yaml")
with open(config_path, "rb") as f:
config = yaml.safe_load(f)
return config


"""
Data processing
"""
Expand Down Expand Up @@ -540,6 +532,7 @@ def p_l1_monly(temp_DL1_p_monly, dl0_p, config_monly):
"""
Produce a DL1 file
"""

for file in dl0_p:
subprocess.run(
[
Expand Down Expand Up @@ -1041,7 +1034,7 @@ def real_index(real_dl3):
f"-i{str(real_dl3)}",
]
)
return temp_DL3
return real_dl3


@pytest.fixture(scope="session")
Expand All @@ -1056,4 +1049,4 @@ def real_index_monly(real_dl3_monly):
f"-i{str(real_dl3_monly)}",
]
)
return temp_DL3_monly
return real_dl3_monly
8 changes: 0 additions & 8 deletions magicctapipe/io/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,6 @@ def recursive_solution(current_tel, current_comb):

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


Expand Down
Loading