Skip to content

TST: run generic tests #1

@mdhaber

Description

@mdhaber

@JacobHass8 this was the beginning of a proof of concept of what a distribution library might look like.

Note how there is currently just one test of the PDF method. The thought is that the reference _pdf function is very easy to verify manually against a reference, and test_pdf confirms that the package's Normal.pdf matches the reference.

The other thing to do would be to run generic tests of all the methods against one another. We have a really thorough set of tests in https://github.com/scipy/scipy/blob/214919ec21fe7115fe8f1ce88b8e508cf034c8f7/scipy/stats/tests/test_continuous.py#L201. Would you be interested in helping me figure out how we could import that class and run this distribution through the suite?

One issue is the import at the top of https://github.com/scikit-stats/normal/blob/main/Normal/tests/test_distribution.py should be from Normal import Normal. But besides that, I'm having trouble with import scipy.stats.tests from the Pixi environment, even though scipy is installed and that same command works with other installations, say on Google Colab. Maybe SciPy needs to be installed with optional components?

I will create a separate library like this one for the stable distribution1; I just thought we could pave the road a bit here in the meantime.

Footnotes

  1. In the future, the idea is when contributor proposes adding a new distribution and the idea is accepted, a scikit-stats maintainer would create a new repo (like this normal one) from a template here in the scikit-stats organization. The contributor would fork the repo, adapt the template to implement the distribution, and open it as a PR against the original repo. When merged, the author of the PR would become a maintainer of the repo, and the distribution would be added to the scikit-stats meta-library. The intended advantages of this (admittedly somewhat complex) scheme are discussed in these slides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions