-
Notifications
You must be signed in to change notification settings - Fork 310
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
[ENH] Re-org python test directory for consistency and ease-of-use #1481
Comments
looks like all the MG tests are thrown into a single folder. Would it be worth doing something like |
I put the MG and SG tests side-by-side with the other tests for each algo (so they're actually distributed across several folders, but not in a dedicated MG folder anymore). I thought it would be better that way to increase visibility - especially during refactoring work or when new tests are added - and since they're automatically excluded in SG environments anyway when run. I'm also hoping that in a later revision, we'll be able to have a single set of tests that can be used for both SG and MG environments, where MG algos are run simply by providing a dask dataframe and additional setup, instead of requiring an entirely different test, and this would push us in that direction. |
If our CI environment is only SG, is there any easy way to skip those tests? Likewise, on the MNMG system, how are SG tests skipped? I do like having everything together, just want to make sure that doesn't add complexity elsewhere |
Right now our MG tests are automatically skipped if there's <2 GPUS detected using this decorator, so our current CI scripts and SG dev workflows wouldn't need to change. And today on MG systems, both SG and MG tests are run by default unless we manually exclude the SG tests (which we do). One advantage of separating them by folder is that you can specify just the MG ("dask") folder to exclude SG tests, but it's only a minor convenience IMO since you can do the same thing today using I think in the long run, having SG and MG side-by-side will promote more MG testing, test maintenance, and get us to a single-source solution for both environments sooner. |
Redoing the organization of the python tests. Merging both SG and MG together and using tag to specify runs organizing tests by graph function **MG Test File Renaming** - MG test files now end with "_mg" rather than starting with "test_mg". This will make it easier to see that there are test pairs, SG and MG, since a listing will now group files together. **mg pytest marker** - created a pytest marker called "mg" to identify MG test and allow CI/users to either include or skip - `pytest -m mg` to run all mg tests - `pytest -m "not mg"` to skip all MG tests **sg marker** test only SG code pytest -m sg Added markers for "sg" and "ci" for future use Fixed a number of test issues closes #1481 Authors: - Brad Rees (https://github.com/BradReesWork) Approvers: - Ray Douglass (https://github.com/raydouglass) - Don Acosta (https://github.com/acostadon) - Rick Ratzel (https://github.com/rlratzel) - Joseph Nke (https://github.com/jnke2016) URL: #3292
Our CPP tests are organized under a nice directory hierarchy, and our python tests could benefit from a similar organization to make particular tests easier to find and run. It might also be nice if the test subdirs were organized similar to the source code.
The default method of running pytest to run all tests shouldn't change, since pytest auto-discovers tests under a directory hierarchy.
Also, by organizing using separate folders, users can run a subset of tests easily by specifying a particular folder, for example:
pytest cugraph/tests/algos/community
(in addition to the currently supported ways using markers, -k expressions, etc.) which encourages working with several smaller files instead of single larger ones.Below is a proposed test dir hierarchy. Is this something worth doing, or do we prefer the relatively flat layout we have today, or maybe some combination?
The text was updated successfully, but these errors were encountered: