Stabilize APIs#328
Conversation
|
@cschwan In case you want to have a look, this is complete. |
|
Could you please also adjust https://github.com/NNPDF/pineappl/blob/stabilize-apis/pineappl_capi/include/PineAPPL.hpp ? |
|
Looks quite good to me, however we can still increase the CAPI code coverage:
In the Python API we should
|
|
@Radonirinaunimi BTW: the Fortran module file is shipped with PineAPPL and isn't installed. This means we can forgo giving any stability guarantees and just change it as we see fit. If a user wants to use an older version of the module they always can, because the module is just a thin wrapper of the CAPI which is stable. So if you think it's too much of an effort to keep the deprecated functions in the Fortran module you can just strip them out. The same holds in principle for the C++ OOP API that @felixhekhorn mentioned. I'd even be in favour of either completely removing the C++ OOP API or letting someone else maintain it, possibly in a different repository even, because in C++ you can always use the CAPI without any additional burden. The C++ OOP vs. C functions is really just a stylistic choice. But that's a decision you have to make, @Radonirinaunimi; having 4 different APIs (CAPI, Python, Fortran, C++ OOP) may be too much a maintainance burden. |
It is just a convenience wrapper - but personally I would never use the CAPI ;-) it's too dangerous with all the pointers and stuff. I'd rather solve that problem once and for all and then hide the details - that's why I wrote the interface in the first place. I did the same for gsl. If you want to drop it from here, fine - I can move that to my account if needs be. |
I've actually always wondered why we don't install the Fortran API? We can promote it to a folder
As for this, I don't actually mind maintaining these APIs. The current situation is a bit peculiar because So, yes, I can also update this:
after all of the following is done: #328 (comment). |
@cschwan, by this do you mean increasing the areas/percentage covered? Because |
There are a few reasons:
|
We should strive to get as close as possible to 100% coverage. Your last two commits did raise the coverage and I believe that last point you should check is whether |
Yes, the fix was rather easy (its Fortran interface, not so much). The only minor difference w.r.t. your suggestion was that I only kept one "true" Lambda On the Fortran node, @janw20, would you perhaps be available to help? There are only two functions to fix, |
|
@Radonirinaunimi: you can't change |
|
This is a recommendation, but one to make your life easier: since you've removed the v0 parts of the C++ API you can also remove these parts from the Fortran API; if someone needs them, they just can use an older module file from the git. |
For the record, the changes have been undone in b4bb0f8. |
|
I believe this is now "ready". It seems that there are also some memory leaks in the Fortran examples that I am not able to really track (apart from obvious |
Addresses the API parts of #326 and #327
_v1as default/main and deprecate the old onesgrid_convolve