Closed scarlehoff closed 1 year ago
You mean that I should use a function also for generating the theoryID? Something like
def generate_theory():
retrun API.theoryid(theoryid=THEORY_QED)
tbh for the theory I would call directly API.theoryid(theoryid=THEORY_QED)
inside the test functions.
https://github.com/NNPDF/nnpdf/blob/7eb0c4eb67604a7d0b80f9a8ac075aab994904cc/validphys2/src/validphys/tests/photon/test_compute.py#L17
and here
https://github.com/NNPDF/nnpdf/blob/7eb0c4eb67604a7d0b80f9a8ac075aab994904cc/validphys2/src/validphys/tests/photon/test_structurefunctions.py#L10
For a quick fix it would be enough changing the
FIATLUX_RUNCARD
dictionary to something likeThat way the resources won't be downloaded upon import but only if they are actually needed (i.e., when people run a test in which this will be used)
And similarly, the theory id can be put as an integer value in
conftest.py
and then called withAPI.theoryid(theoryid=THEORY_QED)
every time it is needed.