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

Improve Python and R package testing #536

Open
bryanpaget opened this issue Oct 3, 2023 · 2 comments
Open

Improve Python and R package testing #536

bryanpaget opened this issue Oct 3, 2023 · 2 comments
Labels
area/engineering Requires attention from engineering: focus on foundational components or platform DevOps kind/bug kind/design size/L 4-5 days

Comments

@bryanpaget
Copy link
Contributor

bryanpaget commented Oct 3, 2023

The package testing we use does not work well. Code is here: https://github.com/StatCan/aaw-kubeflow-containers/blob/master/tests/general/test_packages.py

Example issues with the current test suite:

  1. The Python package torch was not working for quite a while but test_packages.py was unable to catch this. Unable to import torch on pytorch image. #514
  2. Recently we upgraded from Python 3.9 to Python 3.11 and SASPy was not usable but the test suite was unable to catch this. SASPy Config Needs Updating #533
  3. Additionally, I've struggled multiple times with false positives and have added multiple entries into the exclude list, for instance, the package pyyaml is imported with import yaml and pillow is imported with import pil.

The exclusion list is growing:

# List of packages that cannot be tested in a standard way
EXCLUDED_PACKAGES = [
    # Binaries
    "tini",
    "python",
    "hdf5",
    "bzip2",
    'nodejs', 
    # Jupyterlab extensions
    'python-lsp-server',
    'jupyterlab-translate',
    'jupyter-dash',
    "jupyter-pluto-proxy",
    "jupyterlab-git",
    "jupyter-server-proxy",
    "jupyterlab-language-pack-fr-fr",
    "jupyterlab-lsp",
    "jupyter-lsp",
    # Other
    "conda-forge::blas[build=openblas]",
    "protobuf",
    "r-irkernel",
    "unixodbc",
    "bzip2",
    "openssl",
    "ca-certificates",
    "r-tidymodels",
    "gputil",
    "cudatoolkit",
    "cudnn",
    # Python
    # import PIL, not import pillow
    "pillow",
    # import yaml, not import pyyaml
    "pyyaml",
]
@bryanpaget bryanpaget added area/engineering Requires attention from engineering: focus on foundational components or platform DevOps size/L 4-5 days kind/bug kind/design labels Oct 3, 2023
@bryanpaget
Copy link
Contributor Author

bryanpaget commented Oct 3, 2023

We recently had an issue with JupyerLab-Git extension not working with Python 3.11. So in addition to having package import tests, we might also want JupyerLab extension tests.

Reference to issue (h/t @Souheil-Yazji):

@bryanpaget
Copy link
Contributor Author

bryanpaget commented Oct 3, 2023

We may also want to have some example notebooks, which are run during testing, to ensure our "core offerings" just work.

Some example SASPy Notebooks can be found here:

Or maybe just take some of the core commands from some example notebooks, and add them to our test suite, but then make sure they fail when they should fail and pass when they should pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engineering Requires attention from engineering: focus on foundational components or platform DevOps kind/bug kind/design size/L 4-5 days
Projects
None yet
Development

No branches or pull requests

1 participant