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

Add Tests to Catalog methods #129

Open
schmidni opened this issue May 14, 2024 · 1 comment
Open

Add Tests to Catalog methods #129

schmidni opened this issue May 14, 2024 · 1 comment
Assignees
Labels
priority testing Improve or add tests

Comments

@schmidni
Copy link
Member

Catalog.estimate_mc and Catalog.estimate_b need to be tested.

Since the methods estimate_b and mc_ks already should be tested, you only need to check whether they are called correctly, depending on the various combinations of input.

As a minimal example, there is already a test in seismicity/tests/test_catalog.py -> test_catalog_bin which tests whether the bin_to_precision method is correctly called. You will need to do some more validation on the input parameters. (delta_m = None or not, and so on).

@martahan
Copy link
Collaborator

martahan commented Jun 7, 2024

There's a branch with this now, I added some of the tests, but for estimate_b and mc, it only checks error raising. I am not sure how much we should add and what is redundant due to already existing tests, anyways to be continued. I also changed some things about the underlying binning function and the corresponding test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority testing Improve or add tests
Projects
None yet
Development

No branches or pull requests

3 participants