Skip to content

function create_components#34

Merged
sbillinge merged 3 commits intodiffpy:mainfrom
aajayi-21:create_components
Aug 1, 2023
Merged

function create_components#34
sbillinge merged 3 commits intodiffpy:mainfrom
aajayi-21:create_components

Conversation

@aajayi-21
Copy link
Copy Markdown
Contributor

Once the ComponentSignal is merged into main, I can merge main into this branch and create_components will function successfully

Copy link
Copy Markdown
Contributor

@sbillinge sbillinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Please see a couple of tiny comments. ComponentSignal is merged so the next push and I think this can go in.

Excellent, we are making progress......

Comment thread diffpy/snmf/subroutines.py Outdated
Comment thread diffpy/snmf/subroutines.py Outdated
Comment thread diffpy/snmf/subroutines.py Outdated
Comment thread diffpy/snmf/tests/test_subroutines.py Outdated
def test_create_components(tcc):
actual = create_components(tcc[0], tcc[1], tcc[2], tcc[3])
assert len(actual) == tcc[0]
for c in actual:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first and last section is just testing the constructor of the ComponentSignals container. In other words, if the constructor is working, this will pass, and if not it won't. The other two are just testing the set method in there. So I suggest to move these to the tests for the ComponentSignal and leaave them out here. You could also add some tests there for edge cases if you can think of any.

There is honeslty not much to test here, so line 164 may be enough.

@aajayi-21 aajayi-21 marked this pull request as ready for review August 1, 2023 12:48
@sbillinge sbillinge merged commit 6f6bda8 into diffpy:main Aug 1, 2023
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