Repository navigation
chore: sync code with srfit 3.4.0 - #5
Merged
Merged
Conversation
Port the srfit changes to pdf/ made since cmipdf was copied (#217, #225, #228, #229): - basepdfgenerator.py, pdfcontribution.py, characteristicfunctions.py: call add_parameter/new_parameter instead of the deprecated addParameter/newParameter, and set scatteringfactortable instead of calling setScatteringFactorTableByType. - characteristicfunctions.py, pdfparser.py: fix docstrings that did not render (literal blocks for the lognormal formulas, list spacing). - Tests: get_value, load_structure and scatteringfactortable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Match the diffpy.srfit test style already used in test_pdfparser.py: - test_generators.py: split testGenerator into one test per behavior, with parametrized C1/Expected cases for the scattering type and each wrapped calculator Parameter, and actual_/expected_ names. - test_pdfcontribution.py: same style; split get_qmax by where qmax is found, check the exact savetxt error, and compare the pickled residual after a Uiso change against a freshly built contribution instead of an "is different" guard. - conftest.py: remove the unused skip-if-missing fixtures and add an ni_pdffit_structure fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5 +/- ##
==========================================
+ Coverage 87.11% 95.60% +8.49%
==========================================
Files 5 5
Lines 194 205 +11
==========================================
+ Hits 169 196 +27
+ Misses 25 9 -16
🚀 New features to boost your workflow:
|
Contributor
Author
|
@sbillinge ready for review/merge. I pinned the srfit version to the rc version in CI so tests pass for now. I added an issue to remove it later. |
- pyproject.toml: point the diffpy-cmipdf entry point at cmipdf_app:main (app.py does not exist), support Python 3.12-3.13 only (diffpy.srreal has no 3.14 build, and 3.11 is below srfit's minimum), and fail tests when cmipdf calls its own deprecated names, matching srfit. - cookiecutter.json: minimum Python 3.12. - docs: replace the template API page with the cmipdf modules, and use m2r2 instead of the unmaintained m2r. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set requires-python, the classifiers and cookiecutter.json to 3.11-3.13, matching the other diffpy.cmi* packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Carry over edits on diffpy.srfit 3.4.0 to the PDF pack