Skip to content

Adding testing#69

Merged
OKaluza merged 7 commits into
mainfrom
testing
Jun 18, 2025
Merged

Adding testing#69
OKaluza merged 7 commits into
mainfrom
testing

Conversation

@max-anu

@max-anu max-anu commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

Added tests for functions/etc which do not require a gpu (i.e. not lavavu)

@max-anu

max-anu commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

This is failing with this message:
E ImportError: cannot import name '_LavaVuPython' from 'osmesa' (/home/runner/miniconda3/envs/access-vis-test/lib/python3.12/site-packages/lavavu/osmesa/__init__.py)

I don't know what needs to change to fix this. Does anyone else have thoughts?

@max-anu

max-anu commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author
    from .earth import *
src/accessvis/earth.py:35: in <module>
    import lavavu  # noqa: E402
    ^^^^^^^^^^^^^
../../../miniconda3/envs/access-vis-test/lib/python3.12/site-packages/lavavu/__init__.py:10: in <module>
    from .lavavu import *
../../../miniconda3/envs/access-vis-test/lib/python3.12/site-packages/lavavu/lavavu.py:107: in <module>
    from osmesa import LavaVuPython

@OKaluza

OKaluza commented Jun 18, 2025

Copy link
Copy Markdown
Collaborator

Are you getting this error on your machine or on a github runner? If on your machine it shouldn't need osmesa, do you have LV_CONTEXT set?

If the tests are to run on github runners they'll need to install lavavu-osmesa instead of lavavu. I bundled it in the previous release but the latest default lavavu wheels no longer include it as it made them huge and the project is out of space on pypi.
Alternatively just run them on self-hosted, see: https://github.com/ACCESS-NRI/ACCESS-Vis/blob/main/.github/workflows/testing.yaml

@max-anu

max-anu commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

This is on the github runner. I changed lavavu to lavavu-osmesa in ci/environment-3.x.yml. It now shows a different error.

@OKaluza

OKaluza commented Jun 18, 2025

Copy link
Copy Markdown
Collaborator

You could try adding moderngl to deps and set LV_CONTEXT: moderngl in env instead of osmesa

@OKaluza OKaluza self-requested a review June 18, 2025 08:12

@OKaluza OKaluza left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Finally got both the CI suites to pass with some tweaks

@OKaluza OKaluza merged commit 17d14fb into main Jun 18, 2025
13 checks passed
@max-anu max-anu deleted the testing branch June 20, 2025 00:59
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 this pull request may close these issues.

2 participants