-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implementation of a first unit test (DL1) #34
Implementation of a first unit test (DL1) #34
Conversation
The problem seems to just be that I verified it like this: In [1]: from setuptools import find_packages
In [2]: find_packages()
Out[2]: ['protopipe', 'protopipe.pipeline', 'protopipe.mva', 'protopipe.perf'] In |
There is not a problem with adding Just for me to understand: did you check this locally on your machine? |
Adding the init.py in protopipe.scripts solved that error, but now it cannot find the example configuration file. I thought that finding the source code folder after installation by doing From the Travis log I can see that it's trying to find it in |
I think you need to
By the way, rather than using pytest for this, you can also just simply run the test script in the travis.yml. It will still give an error if it fails, just like in pytest. It could be easier, since this is more complex than a simple unit test. However, it would be nice to also have unit tests run by pytest. |
From what I could see I think adding something like,
to the arguments of
This should work only after I did the previous operation, am I right?
For one it is maybe true, but many more will come later on. |
Seems you still get a bad exit status from the command you run:
That means the command is exiting with status 256 (which is I think actually a return value of -1 from the main function in your script, probably) |
To summarize the situation: with the help of Karl I managed to modify things in a way that the configuration file needed for the test will be always found depending only on the internal structure of the package. Indeed, now the Travis CI seems to not fail because it doesn't find the configuration file (on its remote machine) but because it doesn't know the name of a camera. |
Codecov Report
@@ Coverage Diff @@
## master #34 +/- ##
========================================
Coverage ? 0.43%
========================================
Files ? 20
Lines ? 2084
Branches ? 0
========================================
Hits ? 9
Misses ? 2075
Partials ? 0
Continue to review full report at Codecov.
|
This PR depends on PR #33
This test runs
write_dl1.py
using an improved version of the example analysis configuration and the whole ctapipe test filegamma_test_large.simtel.gz
(110 events from a Paranal-like site and 3 cameras).It checks if the
write_dl1.py
script ends successfully and as a result, it creates an HDF5 file containing events from LSTCam, FlashCam, and ASTRICam.Caveat: for now, this test doesn't check the production of the image.h5 file containing the simulated and calibrated images (even though that is at the basis of all the operations already performed to produce successfully the DL1 file).