GithubHelp home page GithubHelp logo

cmyt's People

Contributors

dependabot[bot] avatar matthewturk avatar neutrinoceros avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmyt's Issues

Portability: better support for Python < 3.9

The current implementation allows to import individual cmap objects as

from cmyt import arbre
# or
import cmyt
cmyt.arbre

but it only works with Python>=3.9. This is because I didn't realise that my first implementation was Python-version specific.
On the other hand this could be regarded as an implementation detail since this feature isn't necessary for backwards compatibility in yt, but it's definitely possible to do it in older versions of Python. See e.g. cmasher.

1.0.4: tests/test_integration.py::test_from_str fails

I am currently packaging cmyt for Debian, which is a new dependency of yt 4.0.2. When running the tests, I observed the following failure:

Error: Image dimensions did not match.
  Expected shape: (374, 917)
    /tmp/tmpz7mck7eo/tests.test_integration.test_from_str_dusk/baseline.png
  Actual shape: (372, 917)
    /tmp/tmpz7mck7eo/tests.test_integration.test_from_str_dusk/result.png

This happens with all test_from_str and test_from_obj tests.

Python: 3.0.10
More-itertools: 8.10.0
Numpy: 1.22.1
Pytest: 6.2.5
Matplotlib: 3.5.1
Pytest-mpl: 0.13
Colorspacious: 1.1.2

REL: deploy to conda-forge

Sibling projects (yt, unyt...) are deployed to conda-forge, I think it would make sense to do this as well for cmyt after 1.0.0

TST: add CPython 3.12 to test matrix

I would like to add explicit support for Python 3.12 ahead of the release, but it'll require having both numpy and matplotlib publishing stable wheels for it first.

BUG: v0.1.0 is broken

Due to some mistake in packaging

import cmyt

fails with

ModuleNotFoundError: No module named 'cmyt.colormaps'

BUG: cmyt is broken with MPL 3.2

using matplotlib 3.2.0 (current minimal supported version)

import cmyt

crashes with

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/robcleme/dev/yt-project/cmyt/cmyt/__init__.py", line 1, in <module>
    from .cm import *
  File "/Users/robcleme/dev/yt-project/cmyt/cmyt/cm.py", line 31, in <module>
    cmap, cmap_r = register_colormap(name, data)
  File "/Users/robcleme/dev/yt-project/cmyt/cmyt/utils.py", line 110, in register_colormap
    _register_mpl_cmap(mpl_cmap)
  File "/Users/robcleme/dev/yt-project/cmyt/cmyt/utils.py", line 98, in _register_mpl_cmap
    matplotlib.cm.register_cmap(cmap=cmap)
AttributeError: module 'matplotlib' has no attribute 'cm'

I get why it breaks, but I'm not sure how this wasn't caught in CI already

Portability: add explicit support for Python<3.7

I don't think there's any real reason not to support it actually. I think I set the minimal supported version to 3.7 because of some shenenigans related to old versions of matplotlib that currently exist in the original yt code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.