Add XSPEC model string macro (closes #187)#242
Add XSPEC model string macro (closes #187)#242aditya-pandey-dev wants to merge 2 commits intoJuliaAstro:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #242 +/- ##
==========================================
+ Coverage 55.69% 57.49% +1.79%
==========================================
Files 39 39
Lines 2632 2550 -82
==========================================
Hits 1466 1466
+ Misses 1166 1084 -82 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@fjebaker I have raise a PR related to this issue can you please review the PR |
|
Hello @aditya-pandey-dev thanks for your PR! I am away at a conference this week so it will take me some time to review this. |
|
I've had a look through this and very strongly suspect this was predominantly written by an LLM. There is so much here that I would ask you to address but it's not a good use of my time or yours to iterate on a review cycle this way. If you do want to work on this issue, please try to implement this yourself. I am happy to spend my time reviewing code that you personally wrote and have opinions on, and can modify in small and meaningful ways, than have every comment I suggest result in an LLM rewriting vast amounts of the code that exponentially inflates the time I have to spend reviewing. What this PR currently would introduce would be a huge maintenance task to keep going when new models are introduced or bugs are found. The test set is so brittle that the implementation has very little flexibility, which isn't good for a package that is still under development. LLMs write code that only another LLM can maintain. That is not in line with the ethos of SpectralFitting.jl or GSOC. |
|
Hi @fjebaker, |
Implements bidirectional translation between XSPEC model strings and
XSPECModels.jl types, as requested in #187.
Changes
lib/XSPECModels/src/xspec_string.jl— new file:parse_xspec_model_string(str): runtime XSPEC string → JuliaExprxspec"..."string macro: compile-time, zero overheadxspec_model_string(model): reverse directionXSPEC_MODEL_NAMES: 20 verified model mappingslib/XSPECModels/src/XSPECModels.jl— include + export new APIlib/XSPECModels/test/test-xspec-string.jl— full test suitelib/XSPECModels/test/runtests.jl— include new testsdocs/src/transitioning-from-xspec.md— complete guide for XSPEC usersdocs/make.jl— add page to navigationdocs/src/models/xspec-models.md— mention new featurerunning_example_xspec_strings.jl— self-contained demoExample