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

Building cmasher #167

Closed
sinclair-m opened this issue Nov 16, 2024 · 6 comments · Fixed by #169
Closed

Building cmasher #167

sinclair-m opened this issue Nov 16, 2024 · 6 comments · Fixed by #169

Comments

@sinclair-m
Copy link

sinclair-m commented Nov 16, 2024

___________________________________________ Test_import_cmaps.test_CMasher_cmaps[__pycache__] ___________________________________________

self = <tests.test_utils.Test_import_cmaps object at 0x7f222279a900>, cm_name = '__pycache__'

    @pytest.mark.parametrize("cm_name", cm_names)
    def test_CMasher_cmaps(self, cm_name):
        # Check if provided cm_name is registered in CMasher and MPL
        for name in (cm_name, cm_name + "_r"):
>           cmr_cmap = getattr(cmr, name)
E           AttributeError: module 'cmasher' has no attribute '__pycache__'. Did you mean: '__cached__'?

/home/USERNAME/.cache/yay/python-cmasher/src/CMasher-1.9.0/tests/test_utils.py:358: AttributeError
======================================================== short test summary info ========================================================
FAILED tests/test_utils.py::Test_import_cmaps::test_CMasher_cmaps[__pycache__] - AttributeError: module 'cmasher' has no attribute '__pycache__'. Did you mean: '__cached__'?
@neutrinoceros
Copy link
Collaborator

Can you give me bit of context ? What exactly are you trying to do and what commands are you running ? Thanks !

@sinclair-m
Copy link
Author

sinclair-m commented Nov 17, 2024

Hello Clément,

For the arch linux installation of cmasher, it runs through the test-env checks of the colormaps https://aur.archlinux.org/packages/python-cmasher

Specifically:

check() {
  cd ${_base}-${pkgver}
  python -m venv --system-site-packages test-env
  test-env/bin/python -m installer dist/*.whl
  test-env/bin/python -m pytest
}

seems to have an issue with the one check that runs as __pycache__, for Python 3.12.6

Best,
Mitchell

@neutrinoceros
Copy link
Collaborator

Oh I think you hit the very same bug I fixed in #101 (the fix was first released in cmasher 1.7.1), which I guess explains why I'm not able to reproduce now. Could you clarify what version of cmasher you're encountering this with ?

@sinclair-m
Copy link
Author

It looks like it pulling the current github repo:

HEAD is now at 7831bca Bump version to 1.9.0

@neutrinoceros
Copy link
Collaborator

neutrinoceros commented Nov 19, 2024

My mistake, it seems I actually broke the logic from #101. I can indeed reproduce now, and I'll publish the fix as part of CMasher 1.9.1
Thank you for reporting !

@sinclair-m
Copy link
Author

Thank you very much, appreciate the help and the colormaps of course.

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.

2 participants