Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: added an edge case for LatticeReactionSystem #1164

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sivasathyaseeelan
Copy link
Contributor

I have added an edge cases to test LatticeReactionSystem which were not tested before.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@TorkelE
Copy link
Member

TorkelE commented Jan 9, 2025

Just checking, exactly what is this meant to test? That you cannot create LatticeReactionSystems with random inputs? Seems a bit excessive. And if we want to test it, is there a specific reason for creating a new structure?
(no direct problem, just trying to understand what the actual test intention is)

Signed-off-by: sivasathyaseeelan <[email protected]>
@sivasathyaseeelan
Copy link
Contributor Author

sivasathyaseeelan commented Jan 9, 2025

Screenshot from 2025-01-09 21-10-53

I am trying to test, if we input any invalid type instead of AbstractSpatialReaction then it should throws an argument error

@TorkelE
Copy link
Member

TorkelE commented Jan 9, 2025

Sounds good. I'd probably call it InvalidSpatialReactionType, or maybe just use a reaction.

Also, in the test already run include("../spatial_test_networks.jl"), which loads various networks and lattices. I'd use some simple examples from there instead. That way, new networks and alttices do not have to be created.

@sivasathyaseeelan
Copy link
Contributor Author

Yeah make sense. I will modify the test!

Signed-off-by: sivasathyaseeelan <[email protected]>
@sivasathyaseeelan
Copy link
Contributor Author

sivasathyaseeelan commented Jan 10, 2025

@TorkelE I have modified the test as per your above comments. Could you please review it?

@TorkelE
Copy link
Member

TorkelE commented Jan 10, 2025

Looks good, thanks a lot :)

@isaacsas
Copy link
Member

This needs to have master merged into it to get the doc build error fix.

@TorkelE feel free to merge when you are happy.

@isaacsas
Copy link
Member

(I guess we can ignore the doc failure since this is just updating a test.)

@TorkelE
Copy link
Member

TorkelE commented Jan 10, 2025

I have merged master into this, happy to take from here @sivasathyaseeelan (thanks again for the PR :) )

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.

3 participants