From cd873b62df1cf904f08c5a5fe92aaed7c4b0ff40 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 5 May 2023 15:08:15 +0000 Subject: automatic import of python-cmyt --- .gitignore | 1 + python-cmyt.spec | 343 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 345 insertions(+) create mode 100644 python-cmyt.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..e85e69f 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/cmyt-1.2.0.tar.gz diff --git a/python-cmyt.spec b/python-cmyt.spec new file mode 100644 index 0000000..35e222d --- /dev/null +++ b/python-cmyt.spec @@ -0,0 +1,343 @@ +%global _empty_manifest_terminate_build 0 +Name: python-cmyt +Version: 1.2.0 +Release: 1 +Summary: A collection of Matplotlib colormaps from the yt project +License: BSD 3-Clause +URL: https://yt-project.org/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1d/c8/cf6f8bcef86ed426ca6de0f6d778a548ccd382374dd791b2658241fb551f/cmyt-1.2.0.tar.gz +BuildArch: noarch + +Requires: python3-colorspacious +Requires: python3-matplotlib +Requires: python3-more-itertools +Requires: python3-numpy + +%description +# cmyt + +[![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt) +[![Supported Python Versions](https://img.shields.io/badge/requires-Python%20≥%203.8-blue?logo=python&logoColor=white)](https://pypi.org/project/cmyt/) + +[![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml) +[![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main) + +[![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff) + + + +Matplotlib colormaps from the yt project ! + +## Colormaps overview + +The following colormaps, as well as their respective reversed (`*_r`) versions are available + +### Perceptually uniform sequential colormaps +

+ +

+ +### Monochromatic sequential colormaps +

+ +

+ +### Miscellaneous +

+ +

+ +## Installation + +with `pip` +```shell +python -m pip install cmyt +``` +or with `conda` +```shell +conda install -c conda-forge cmyt +``` + +## Usage +cmyt integrates with matplotlib in a similar fashion to +[cmocean](https://matplotlib.org/cmocean/) or +[cmasher](https://cmasher.readthedocs.io) +```python +import numpy as np +import matplotlib.pyplot as plt +import cmyt # that's it ! + +# generate example data +prng = np.random.RandomState(0x4D3D3D3) +noise = prng.random_sample((100, 100)) +x, y = np.mgrid[-50:50, -50:50] +z = 5 * np.exp(-(x**2 + y**2) / 1000) + +# setup the figure +fig, ax = plt.subplots() +ax.set(aspect="equal") + +# now we can refer to cmyt colormaps as strings +im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") +fig.colorbar(im, ax=ax) +``` +

+ +

+ +```python +# alternatively, cmyt maps can also be imported as objects +from cmyt import pastel + +fig, ax = plt.subplots() +ax.set(aspect="equal") +im = ax.contourf(x, y, z + noise, cmap=pastel) +fig.colorbar(im, ax=ax) +``` +

+ +

+ +A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline). + + +%package -n python3-cmyt +Summary: A collection of Matplotlib colormaps from the yt project +Provides: python-cmyt +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-cmyt +# cmyt + +[![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt) +[![Supported Python Versions](https://img.shields.io/badge/requires-Python%20≥%203.8-blue?logo=python&logoColor=white)](https://pypi.org/project/cmyt/) + +[![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml) +[![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main) + +[![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff) + + + +Matplotlib colormaps from the yt project ! + +## Colormaps overview + +The following colormaps, as well as their respective reversed (`*_r`) versions are available + +### Perceptually uniform sequential colormaps +

+ +

+ +### Monochromatic sequential colormaps +

+ +

+ +### Miscellaneous +

+ +

+ +## Installation + +with `pip` +```shell +python -m pip install cmyt +``` +or with `conda` +```shell +conda install -c conda-forge cmyt +``` + +## Usage +cmyt integrates with matplotlib in a similar fashion to +[cmocean](https://matplotlib.org/cmocean/) or +[cmasher](https://cmasher.readthedocs.io) +```python +import numpy as np +import matplotlib.pyplot as plt +import cmyt # that's it ! + +# generate example data +prng = np.random.RandomState(0x4D3D3D3) +noise = prng.random_sample((100, 100)) +x, y = np.mgrid[-50:50, -50:50] +z = 5 * np.exp(-(x**2 + y**2) / 1000) + +# setup the figure +fig, ax = plt.subplots() +ax.set(aspect="equal") + +# now we can refer to cmyt colormaps as strings +im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") +fig.colorbar(im, ax=ax) +``` +

+ +

+ +```python +# alternatively, cmyt maps can also be imported as objects +from cmyt import pastel + +fig, ax = plt.subplots() +ax.set(aspect="equal") +im = ax.contourf(x, y, z + noise, cmap=pastel) +fig.colorbar(im, ax=ax) +``` +

+ +

+ +A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline). + + +%package help +Summary: Development documents and examples for cmyt +Provides: python3-cmyt-doc +%description help +# cmyt + +[![PyPI](https://img.shields.io/pypi/v/cmyt.svg?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/cmyt) +[![Conda Version](https://img.shields.io/conda/vn/conda-forge/cmyt.svg?logo=condaforge&logoColor=white)](https://anaconda.org/conda-forge/cmyt) +[![Supported Python Versions](https://img.shields.io/badge/requires-Python%20≥%203.8-blue?logo=python&logoColor=white)](https://pypi.org/project/cmyt/) + +[![CI](https://github.com/yt-project/cmyt/actions/workflows/ci.yml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/ci.yml) +[![CI (bleeding edge)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml/badge.svg)](https://github.com/yt-project/cmyt/actions/workflows/bleeding-edge.yaml) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/yt-project/cmyt/main.svg)](https://results.pre-commit.ci/latest/github/yt-project/cmyt/main) + +[![yt-project](https://img.shields.io/static/v1?label="works%20with"&message="yt"&color="blueviolet")](https://yt-project.org) +[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff) + + + +Matplotlib colormaps from the yt project ! + +## Colormaps overview + +The following colormaps, as well as their respective reversed (`*_r`) versions are available + +### Perceptually uniform sequential colormaps +

+ +

+ +### Monochromatic sequential colormaps +

+ +

+ +### Miscellaneous +

+ +

+ +## Installation + +with `pip` +```shell +python -m pip install cmyt +``` +or with `conda` +```shell +conda install -c conda-forge cmyt +``` + +## Usage +cmyt integrates with matplotlib in a similar fashion to +[cmocean](https://matplotlib.org/cmocean/) or +[cmasher](https://cmasher.readthedocs.io) +```python +import numpy as np +import matplotlib.pyplot as plt +import cmyt # that's it ! + +# generate example data +prng = np.random.RandomState(0x4D3D3D3) +noise = prng.random_sample((100, 100)) +x, y = np.mgrid[-50:50, -50:50] +z = 5 * np.exp(-(x**2 + y**2) / 1000) + +# setup the figure +fig, ax = plt.subplots() +ax.set(aspect="equal") + +# now we can refer to cmyt colormaps as strings +im = ax.pcolormesh(x, y, z + noise, cmap="cmyt.arbre", shading="flat") +fig.colorbar(im, ax=ax) +``` +

+ +

+ +```python +# alternatively, cmyt maps can also be imported as objects +from cmyt import pastel + +fig, ax = plt.subplots() +ax.set(aspect="equal") +im = ax.contourf(x, y, z + noise, cmap=pastel) +fig.colorbar(im, ax=ax) +``` +

+ +

+ +A gallery of comparable examples using all colormaps from cmyt is available [in the test directory](https://github.com/yt-project/cmyt/tree/main/tests/baseline). + + +%prep +%autosetup -n cmyt-1.2.0 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-cmyt -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot - 1.2.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..1516754 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +74da58dc2b0dc053ac7d06a265695102 cmyt-1.2.0.tar.gz -- cgit v1.2.3