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

Add Jupyter Notebook Testing Workflow #49

Closed
tbirdso opened this issue Jan 4, 2023 · 1 comment · Fixed by #50
Closed

Add Jupyter Notebook Testing Workflow #49

tbirdso opened this issue Jan 4, 2023 · 1 comment · Fixed by #50
Assignees

Comments

@tbirdso
Copy link
Collaborator

tbirdso commented Jan 4, 2023

Adapt from workflow in https://github.com/InsightSoftwareConsortium/ITKParabolicMorphology/pull/40/files

@tbirdso
Copy link
Collaborator Author

tbirdso commented Jan 5, 2023

One consideration for notebook testing is how the wheel under test is made available for testing examples.

  • A wheel can be fetched from PyPI, but it will be the most recently tagged/published version and will not reflect changes made in the PR under test. This means that the notebook check result will not be particularly useful for a given PR and may even be misleading. This approach is currently used in external module implementations and its pitfall is noted in ITKUltrasound notebook checks possibly running against previous versions KitwareMedical/ITKUltrasound#177
  • In theory a wheel artifact can be fetched from the build-test-python-package reusable workflow after it runs. The wheel artifact in question would reflect the PR changes under test. This would require that the notebook workflow runs after wheel builds complete, which appears possible but nontrivial to set up. (xref https://stevenmortimer.com/running-github-actions-sequentially/)
  • A dependent job can be added in the build-test-python-package workflow to optionally run notebook tests if enabled. This would be more difficult to discover, but seems to be more straightforward to implement.

I am in favor of and currently investigating the third approach.

tbirdso added a commit to tbirdso/ITKRemoteModuleBuildTestPackageAction that referenced this issue Jan 5, 2023
Adds job to `build-test-package-python` workflow that retrieves a built
Linux Python wheel artifact previously output by the workflow and uses
it to test Jupyter Notebooks in the `examples/` folder of the external
module.

For initial implementation only Linux wheels are tested with the Python
version fixed at 3.10. To coincide with the Github Actions Linux runner
image and machine architecture, only the `_2_28-x64` wheel is used.

Closes
InsightSoftwareConsortium#49
.
@tbirdso tbirdso linked a pull request Jan 5, 2023 that will close this issue
tbirdso added a commit to tbirdso/ITKRemoteModuleBuildTestPackageAction that referenced this issue Jan 5, 2023
Adds job to `build-test-package-python` workflow that retrieves a built
Linux Python wheel artifact previously output by the workflow and uses
it to test Jupyter Notebooks in the `examples/` folder of the external
module.

For initial implementation only Linux wheels are tested with the Python
version fixed at 3.10. To coincide with the Github Actions Linux runner
image and machine architecture, only the `_2_28-x64` wheel is used.

Closes
InsightSoftwareConsortium#49
.
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 a pull request may close this issue.

1 participant