diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-11 00:28:29 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-11 00:28:29 +0000 |
| commit | 05f5906a345151c0e84fa5121a7a5c7b6ac3279b (patch) | |
| tree | c73af8308ba776823306d7ffbc6744d41674bc04 | |
| parent | 87c466d4b37433a365df7c7928b653f6313600c0 (diff) | |
automatic import of python-inspecta
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-inspecta.spec | 396 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 398 insertions, 0 deletions
@@ -0,0 +1 @@ +/inspecta-0.1.3.tar.gz diff --git a/python-inspecta.spec b/python-inspecta.spec new file mode 100644 index 0000000..25951d8 --- /dev/null +++ b/python-inspecta.spec @@ -0,0 +1,396 @@ +%global _empty_manifest_terminate_build 0 +Name: python-inspecta +Version: 0.1.3 +Release: 1 +Summary: A colorized object pretty printer - for Python. +License: MIT +URL: https://github.com/grimen/python-inspecta +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/74/40/3703630202705f96bd08a32a74ef7772345f7e84109915caeed057eeaff8/inspecta-0.1.3.tar.gz +BuildArch: noarch + +Requires: python3-rootpath +Requires: python3-six +Requires: python3-pygments +Requires: python3-termcolor +Requires: python3-colour-runner +Requires: python3-deepdiff +Requires: python3-tox +Requires: python3-coverage +Requires: python3-codecov + +%description + +# `inspecta` [](https://badge.fury.io/py/inspecta) [](https://travis-ci.com/grimen/python-inspecta) [](https://codecov.io/gh/grimen/python-inspecta) + +*A colorized object pretty printer - for Python.* + +## Introduction + +The default `pprint` is not human friendly enough - color syntax highlighting to the rescue. + + +## Install + +Install using **pip**: + +```sh +$ pip install inspecta +``` + + +## Use + +Very basic **[example](https://github.com/grimen/python-inspecta/tree/master/examples/basic.py)**: + +```python +import inspecta + +data = { + 'foo': { + 'bar': { + 'baz': [ + { + 'a': 1, + 'b': 'two', + 'c': ('three', 4, 'five') + } + ] + } + }, + 'bar': [1, 2, 3], + 'baz': True +} + +print('\n.inspect(data)\n') + +print(inspecta.inspect(data)) + +print('\n.print(data)\n') + +inspecta.print(data) +``` + +Run this with optional environment variables `COLORS` / `ERROR_COLORS` set too truthy or falsy values, so see various error info formatting in terminal. + +Something like this (imagine some colorized formatting): + +```bash + +.inspect(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +.print(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +``` + + +## Test + +Clone down source code: + +```sh +$ make install +``` + +Run **colorful tests**, with only native environment (dependency sandboxing up to you): + +```sh +$ make test +``` + +Run **less colorful tests**, with **multi-environment** (using **tox**): + +```sh +$ make test-tox +``` + + +## About + +This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used. + + +## License + +Released under the MIT license. + + + + +%package -n python3-inspecta +Summary: A colorized object pretty printer - for Python. +Provides: python-inspecta +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-inspecta + +# `inspecta` [](https://badge.fury.io/py/inspecta) [](https://travis-ci.com/grimen/python-inspecta) [](https://codecov.io/gh/grimen/python-inspecta) + +*A colorized object pretty printer - for Python.* + +## Introduction + +The default `pprint` is not human friendly enough - color syntax highlighting to the rescue. + + +## Install + +Install using **pip**: + +```sh +$ pip install inspecta +``` + + +## Use + +Very basic **[example](https://github.com/grimen/python-inspecta/tree/master/examples/basic.py)**: + +```python +import inspecta + +data = { + 'foo': { + 'bar': { + 'baz': [ + { + 'a': 1, + 'b': 'two', + 'c': ('three', 4, 'five') + } + ] + } + }, + 'bar': [1, 2, 3], + 'baz': True +} + +print('\n.inspect(data)\n') + +print(inspecta.inspect(data)) + +print('\n.print(data)\n') + +inspecta.print(data) +``` + +Run this with optional environment variables `COLORS` / `ERROR_COLORS` set too truthy or falsy values, so see various error info formatting in terminal. + +Something like this (imagine some colorized formatting): + +```bash + +.inspect(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +.print(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +``` + + +## Test + +Clone down source code: + +```sh +$ make install +``` + +Run **colorful tests**, with only native environment (dependency sandboxing up to you): + +```sh +$ make test +``` + +Run **less colorful tests**, with **multi-environment** (using **tox**): + +```sh +$ make test-tox +``` + + +## About + +This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used. + + +## License + +Released under the MIT license. + + + + +%package help +Summary: Development documents and examples for inspecta +Provides: python3-inspecta-doc +%description help + +# `inspecta` [](https://badge.fury.io/py/inspecta) [](https://travis-ci.com/grimen/python-inspecta) [](https://codecov.io/gh/grimen/python-inspecta) + +*A colorized object pretty printer - for Python.* + +## Introduction + +The default `pprint` is not human friendly enough - color syntax highlighting to the rescue. + + +## Install + +Install using **pip**: + +```sh +$ pip install inspecta +``` + + +## Use + +Very basic **[example](https://github.com/grimen/python-inspecta/tree/master/examples/basic.py)**: + +```python +import inspecta + +data = { + 'foo': { + 'bar': { + 'baz': [ + { + 'a': 1, + 'b': 'two', + 'c': ('three', 4, 'five') + } + ] + } + }, + 'bar': [1, 2, 3], + 'baz': True +} + +print('\n.inspect(data)\n') + +print(inspecta.inspect(data)) + +print('\n.print(data)\n') + +inspecta.print(data) +``` + +Run this with optional environment variables `COLORS` / `ERROR_COLORS` set too truthy or falsy values, so see various error info formatting in terminal. + +Something like this (imagine some colorized formatting): + +```bash + +.inspect(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +.print(data) + +{ 'bar': [1, 2, 3], + 'baz': True, + 'foo': {'bar': {'baz': [{'a': 1, 'b': 'two', 'c': ('three', 4, 'five')}]}}} + + +``` + + +## Test + +Clone down source code: + +```sh +$ make install +``` + +Run **colorful tests**, with only native environment (dependency sandboxing up to you): + +```sh +$ make test +``` + +Run **less colorful tests**, with **multi-environment** (using **tox**): + +```sh +$ make test-tox +``` + + +## About + +This project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used. + + +## License + +Released under the MIT license. + + + + +%prep +%autosetup -n inspecta-0.1.3 + +%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-inspecta -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.3-1 +- Package Spec generated @@ -0,0 +1 @@ +7fa1ec828c204e3dffde5c9ea3ea3a11 inspecta-0.1.3.tar.gz |
