Skip to content

feat: let constrain_as_space_group take a generator object - #3

Merged
sbillinge merged 1 commit into
diffpy:mainfrom
cadenmyers13:structure-api
Oct 19, 2026
Merged

sbillinge merged 1 commit into
diffpy:mainfrom
cadenmyers13:structure-api

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

With this, users can now pass generators through the constrain as spacegroup function instead of having to access its attribute .phase.

For example

generator = PDFGenerator()
sg_params = constrain_as_space_group(generator.phase, "P1")

can now just be

generator = PDFGenerator()
sg_params = constrain_as_space_group(generator, "P1")

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.57%. Comparing base (9902807) to head (70b55b6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   94.41%   94.57%   +0.15%     
==========================================
  Files           5        5              
  Lines         627      645      +18     
==========================================
+ Hits          592      610      +18     
  Misses         35       35              
Files with missing lines Coverage Δ
tests/conftest.py 80.00% <100.00%> (+7.27%) ⬆️
tests/test_sgconstraints.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbillinge
sbillinge merged commit 2f85179 into diffpy:main Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants