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

Parallelized Behavioural Driven Development testing #187

Merged
merged 4 commits into from
Oct 31, 2020

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented Oct 29, 2020

Getting into gherkins once more! Will be helpful to run integration tests on a lot of test cases (read: parallelize processing/visualization scripts in parallel on many subglacial lakes). Xref #149.

TODO:

  • Bump pytest from 5.4.3 to 6.1.2 (d254061)
  • Add pytest-bdd (084592f)
  • Add pytest-xdist (cbea60c)
  • Create an integration test to ensure things work (5a8025a)

References:

@weiji14 weiji14 added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Oct 29, 2020
The pytest distributed testing plugin!
@weiji14 weiji14 marked this pull request as ready for review October 31, 2020 03:09
Towards a properly tested and reproducible pipeline for finding and analyzing subglacial lake clusters in Antarctica! Moving the find_clusters DBSCAN algorithm from atlxi_lake.ipynb into a properly tested and documented function inside lake_algorithms.py. Importing cudf/pandas as xpd to enable cross-device (GPU/CPU) use, and ensure that an xpd.Series is returned. Test scenarios (written in Gherkin) are in the subglacial_lakes.feature file, and integration tests with Given-When-Then statements are in test_subglacial_lakes.py.

There was quite a bit of boilerplate BDD code to set up, including the empty context class for passing contextual objects between steps. The test parquet file is somewhat hardcoded to a Github URL, and is cached using fsspec's simplecache mechanism (ideally would use intake-parquet if it worked). Still need some more robust tests, as the cuml and scikit-learn DBSCAN algorithms return a different number of clusters for whillans_upstream.
@weiji14 weiji14 force-pushed the dependencies/pytest-bdd-4.0.1 branch from 5a8025a to c66d137 Compare October 31, 2020 03:27
@weiji14 weiji14 merged commit 742a98c into master Oct 31, 2020
@weiji14 weiji14 deleted the dependencies/pytest-bdd-4.0.1 branch October 31, 2020 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant