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

Mirror codebase structure in tests #5777

Closed
ricardoV94 opened this issue May 17, 2022 Discussed in #5579 · 4 comments · Fixed by #6125
Closed

Mirror codebase structure in tests #5777

ricardoV94 opened this issue May 17, 2022 Discussed in #5579 · 4 comments · Fixed by #6125

Comments

@ricardoV94
Copy link
Member

Discussed in #5579

Originally posted by ricardoV94 March 11, 2022
I think the tests files should mirror the original codebase. So they should be in a file with the same name as where the functions/classes that it tests are defined. E.g.,, timeseries tests should be in tests/distributions/test_timeseries.py. This is how Aesara does it and its much easier to find what tests relate to what code, and also to spot gaps in our tests.

Originally posted by @ricardoV94 in #5298 (comment)

This would also allow to break up the immensely large and slow test_distributions.py, which was already brought up in #5410 (comment)

Also, #5577 (comment)

@Armavica
Copy link
Member

Armavica commented Aug 27, 2022

What would you think to also move tests out of pymc? I think that it is the standard practice: ref 1, ref 2. This typically allows to grep for something in the code while avoiding plenty of matches from the tests, something which I do often.

@ricardoV94
Copy link
Member Author

What would you think to also move tests out of pymc? I think that it is the standard practice: ref 1, ref 2. This typically allows to grep for something in the code while avoiding plenty of matches from the tests, something which I do often.

I have no idea. Any downsides to that?

@Armavica
Copy link
Member

I can't see any. Aesara also has their tests outside of the code directory.

@ricardoV94
Copy link
Member Author

@Armavica do you want to open a discussion for moving the tests out of pymc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants