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

Restructure the test suite to follow the code #6111

Merged
merged 15 commits into from
Sep 13, 2022

Conversation

Armavica
Copy link
Member

@Armavica Armavica commented Sep 9, 2022

What is this PR about?
This PR splits up several test files as discussed in #5777.

Checklist

Major / Breaking Changes

  • ...

Bugfixes / New features

  • ...

Docs / Maintenance

  • Split up several test files to follow the code file hierarchy.

@Armavica Armavica changed the title Split up test_gp.py Split up test_gp.py and test_ode.py Sep 9, 2022
@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #6111 (1558472) into main (761f77d) will increase coverage by 0.61%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6111      +/-   ##
==========================================
+ Coverage   92.08%   92.69%   +0.61%     
==========================================
  Files          86       99      +13     
  Lines       17861    20531    +2670     
==========================================
+ Hits        16447    19032    +2585     
- Misses       1414     1499      +85     
Impacted Files Coverage Δ
pymc/tests/backends/fixtures.py 77.99% <ø> (ø)
pymc/tests/backends/test_arviz.py 99.02% <ø> (ø)
pymc/tests/gp/test_cov.py 99.81% <ø> (ø)
pymc/tests/ode/test_ode.py 100.00% <ø> (ø)
pymc/tests/step_methods/hmc/test_quadpotential.py 95.81% <ø> (ø)
pymc/tests/variational/test_updates.py 100.00% <ø> (ø)
pymc/tests/backends/test_ndarray.py 100.00% <100.00%> (ø)
pymc/tests/distributions/test_multivariate.py 99.50% <100.00%> (+<0.01%) ⬆️
pymc/tests/gp/test_gp.py 100.00% <100.00%> (ø)
pymc/tests/gp/test_mean.py 100.00% <100.00%> (ø)
... and 21 more

@Armavica Armavica changed the title Split up test_gp.py and test_ode.py Restructure the test suite to follow the code Sep 11, 2022
@Armavica
Copy link
Member Author

I didn't touch yet: test_posteriors, test_step, test_variational_inference, but will take care of them soon.

I looked at test_missing, test_shared and test_types and couldn't decide where to put them. Would you have an idea about these three?



def test_posdef_symmetric3():
"""The test return 0 if the matrix has 0 eigenvalue.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"""The test return 0 if the matrix has 0 eigenvalue.
"""The test returns 0 if the matrix has 0 eigenvalue.

@@ -1874,3 +1875,28 @@ def test_car_rng_fn(sparse):
)
f -= 1
assert p > delta


def test_posdef_symmetric1():
Copy link
Member

Choose a reason for hiding this comment

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

I know youre just restructuring these so this isnt required, just commenting. Would be nice to paramterizing these

@ricardoV94
Copy link
Member

test_missing corresponds to functionality implemented in model I think, so test_model might be a good place.

test_shared corresponds to uses of pm.Data? If so, wherever that is implemented.

@Armavica
Copy link
Member Author

test_shared corresponds to uses of pm.Data? If so, wherever that is implemented.

I don't think that it uses anything from data.py. It is directly using aesara.shared.

@Armavica Armavica requested a review from canyon289 September 11, 2022 20:39
@canyon289
Copy link
Member

looked through this and it LGTM. coverage is showing more test coverage as well. we should merge before theres any conflicts that arise and follow up in prs imo

@canyon289
Copy link
Member

I didn't touch yet: test_posteriors, test_step, test_variational_inference, but will take care of them soon.

I looked at test_missing, test_shared and test_types and couldn't decide where to put them. Would you have an idea about these three?

Lets do this in another PR to save you rebase headache. This many files changed always make me nervous and rebasing across file changes is a real pain

@canyon289 canyon289 merged commit bbb3082 into pymc-devs:main Sep 13, 2022
@canyon289
Copy link
Member

Thanks much @Armavica

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