-
Notifications
You must be signed in to change notification settings - Fork 49
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
update model macro definitions for compiled code #1676
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1676 +/- ##
==========================================
+ Coverage 79.70% 80.39% +0.69%
==========================================
Files 72 72
Lines 27159 27162 +3
Branches 4588 4588
==========================================
+ Hits 21646 21837 +191
+ Misses 5315 5133 -182
+ Partials 198 192 -6
Continue to review full report at Codecov.
|
d5e26c9
to
8ea0057
Compare
A way of indicating a Python function that uses kwargs has been added to the top-level extension header (KWSEPC). This is then used in the generic model-extension header, replacing the MODSPEC definition. The more-interesting change is in the XSPEC extension header, where again we replace the local MODSPEC definitions a) re-order them by languange support (FORTRAN then C/C++) rather than the somewhat random order before (this is mainly a code style issue) b) remove the table-model specific definitions as they are only used in one place (_xspec.cc) and we can just avoid a lot of complexity in the macro by hard-coding the logic. This will also make removing the pre XSPEC 12.10.1-specific code easier when we get to that PR. (this is the more interesting reason) In a future PR I will update the XSPEC defines from using FCTSPEC to KWSPEC, but that is left for later.
8ea0057
to
5c98977
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked with a ciao-install build (xspec 12.12.1s Linux and macOS) and a Conda build (xspec 12.13.0c). All of the changes look good.
Summary
Re-work the macro definitions used to build the compiled models and use this to clean up the handling of the XSPEC models, in particular table models. There is no functional change.
Details
Note, I have now made this PR depend on #1681 as there are some urgent test updates needed there. This has now been merged, which simplifies this PR.
PR chains that will depend on this:
I have a lot of XSPEC follow-up code and I am trying to break things up so that they are
The change to the include files for the model macros is one of the latter.