Repository navigation
doc & test: copy examples over and add generator tests - #19
Merged
Merged
Conversation
basepdfgenerator.py still built diffpy.srfit.structure parameter sets with struToParameterSet and read .stru and .useSymmetry, so a diffpy.cmistructure parameter set raised AttributeError: stru. Use structure_to_parameter_set, .structure and use_symmetry from diffpy.cmistructure, add it to pip.txt, and pip install it in CI until it is on conda-forge. Tests cover both generators, PDFContribution, and constrain_as_space_group taking a real PDFGenerator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…FGenerator Port srfit's 11 PDF examples and their data to docs/examples with the cmipdf and cmistructure imports. scipyOptimize came from srfit's gaussianrecipe example, which is not a PDF example, so it now lives in crystalpdf.py and the other examples import it from there. With srfit 3.4.0, each example gives the same Rw as srfit's original. Replace the README placeholder description, fix the README CLI name (diffpy-cmipdf), and remove the scikit-package template pages. Add tests for DebyePDFGenerator, which nothing tested: its parameters, that it treats structures as not periodic by default, and that it matches a DebyePDFCalculator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The examples ported from srfit define makeRecipe, makeProfile, makeContribution, makeC60 and scipyOptimize. Rename them to make_recipe, make_profile, make_contribution, make_c60 and scipy_optimize, including the imports from crystalpdf and the comments that name them. All 11 examples still run with the same Rw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@sbillinge ready for review, please merge #17 and #16 first as this is built on them |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19 +/- ##
==========================================
+ Coverage 96.21% 97.00% +0.79%
==========================================
Files 6 6
Lines 264 334 +70
==========================================
+ Hits 254 324 +70
Misses 10 10
🚀 New features to boost your workflow:
|
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.
No description provided.