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

Checked if the recodings are empty #460

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Conversation

deezer257
Copy link
Contributor

@deezer257 deezer257 commented Oct 23, 2024

I inserted a check if the recording DataFrame is empty, if so I raised an value error. Nevertheless, I use a WSL and at some point the tests got stuck, at about 80% of completion, and the WSL lost connection.

Closes #365

Copy link
Contributor

@michaeldeistler michaeldeistler left a comment

Choose a reason for hiding this comment

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

Thanks! Please add a quick test to tests/ that checks whether this indeed raises an error. E.g.

comp = jx.Compartment()
with pytest.raises(ValueError):
    v = jx.integrate(comp, delta_t=0.025, t_max=10.0)

@deezer257
Copy link
Contributor Author

Test is implemented.

@michaeldeistler
Copy link
Contributor

Thanks! But the test is not a Python file. Please add the test to tests/test_record_and_stimulate.py and create a def test_empty_recordings() there.

@michaeldeistler
Copy link
Contributor

Tests are not passing. You probably did not run black tests?

@deezer257
Copy link
Contributor Author

I only ran the specific test since all tests would take an hour to run. I will do it tomorrow, sorry!

@michaeldeistler
Copy link
Contributor

michaeldeistler commented Oct 25, 2024

Thanks again! black passes now, but the test you wrote now exists twice :D (You can always check changed files to see what you are trying to merge).

Could you delete the tests/test_empty_recording file?

Copy link
Contributor

@michaeldeistler michaeldeistler left a comment

Choose a reason for hiding this comment

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

Looks great now, thanks a ton! I will merge once tests have passed.

@michaeldeistler michaeldeistler merged commit e7d891f into jaxleyverse:main Oct 25, 2024
1 check passed
michaeldeistler pushed a commit that referenced this pull request Nov 13, 2024
* Checked if the recodings are empty, if so raise an  error.

---------

Co-authored-by: deezer257 <florian@Florian>
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.

an explicit error when no recordings are inserted
2 participants