python-clu 0.11.6__tar.gz → 0.12.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_clu-0.11.6 → python_clu-0.12.2}/.bumpversion.toml +1 -1
- {python_clu-0.11.6 → python_clu-0.12.2}/MANIFEST.in +1 -1
- {python_clu-0.11.6 → python_clu-0.12.2}/PKG-INFO +1 -1
- python_clu-0.12.2/README.md +445 -0
- python_clu-0.12.2/clu/__version__.py +1 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/abstract.py +12 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/abc.py +1 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/naming.py +1 -1
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/ansi.py +7 -8
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/repl.py +5 -5
- python_clu-0.12.2/docs/.DS_Store +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/PKG-INFO +1 -1
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/SOURCES.txt +10 -0
- python_clu-0.12.2/scratch/images/clu-module-list-example-small.jpg +0 -0
- python_clu-0.12.2/scratch/images/clu-module-list-example.jpg +0 -0
- python_clu-0.12.2/scratch/images/clu-module-list-example.pxd +0 -0
- python_clu-0.12.2/scratch/images/clu-testing-time-totals-example-small.jpg +0 -0
- python_clu-0.12.2/scratch/images/clu-testing-time-totals-example.jpg +0 -0
- python_clu-0.12.2/scratch/images/clu-testing-time-totals-example.pxd +0 -0
- python_clu-0.12.2/scratch/images/construx-and-capsela-small.jpg +0 -0
- python_clu-0.12.2/scratch/images/construx-and-capsela.jpg +0 -0
- python_clu-0.12.2/scratch/images/construx-and-capsela.pxd +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/setup.py +1 -5
- python_clu-0.11.6/README.md +0 -51
- python_clu-0.11.6/clu/__version__.py +0 -1
- {python_clu-0.11.6 → python_clu-0.12.2}/.coveragerc +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/.editorconfig +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/.gitchangelog.rc +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/.gitignore +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/.landscape.yml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/.travis.yml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/ABOUT.md +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/CHANGELOG.md +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/CLASSIFIERS.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/CODE_OF_CONDUCT.md +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/COPYING.md +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/LICENSE.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/Makefile +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/appveyor.yml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/__main__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/all.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/api/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/api/__main__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/application.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/compilation/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/compilation/compiledb.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/compilation/macros.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/base.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/codecs.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/env.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/fieldtypes.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/filebase.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/formats/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/formats/jsonfile.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/formats/picklefile.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/formats/tomlfile.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/formats/yamlfile.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/keymap.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/keymapview.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/ns.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/proxy.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/config/settings.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/__main__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/consts.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/data.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/enums.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/exceptions.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/constants/polyfills.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/csv.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/dicts.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/dispatch.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/enums.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/exporting.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/extending.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/abc.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/appdirectories.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/filesystem.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/misc.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/pypath.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/fs/sourcetree.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/importing/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/importing/__main__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/importing/base.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/importing/proxy.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/keyvalue.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/mathematics.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/predicates.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/banners.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/cli/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/cli/boilerplate.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/cli/boilerplate_copy.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/cli/print_version.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/columnize.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repl/modules.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/repr.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/sanitizer.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/.gitignore +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/README.md +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/ansicolors.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/boilerplate.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/dictroast.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/legacy/forkumask.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/legacy/repl-bpython.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/legacy/repl-ipython.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/legacy/repl-ptpython.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/legacy/repl-pyzo.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/legacy/xdg-runtime.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/prediversus.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/scripts/treeline.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/shelving/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/shelving/redat.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/shelving/redis.conf +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/stdio.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/testing/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/testing/hook.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/testing/obsolete.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/testing/pytest.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/testing/utils.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/typespace/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/typespace/__main__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/typespace/namespace.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/typology.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/version/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/version/__main__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/version/git_version.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/clu/version/read_version.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/codecov.yml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/conftest.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/Makefile +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/doctrees/api.doctree +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/doctrees/environment.pickle +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/doctrees/generated/clu.doctree +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/doctrees/index.doctree +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/.buildinfo +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_sources/api.rst.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_sources/generated/clu.rst.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_sources/index.rst.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/alabaster.css +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/basic.css +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/badge_only.css +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/css/theme.css +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/custom.css +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/doctools.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/documentation_options.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/file.png +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/jquery-3.6.0.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/jquery.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/js/badge_only.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/js/html5shiv.min.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/js/theme.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/language_data.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/minus.png +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/plus.png +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/pygments.css +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/searchtools.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/underscore-1.13.1.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/_static/underscore.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/api.html +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/generated/clu.html +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/genindex.html +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/index.html +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/objects.inv +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/py-modindex.html +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/search.html +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/html/searchindex.js +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/build/man/clu.1 +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/make.bat +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/source/api.rst +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/source/conf.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/source/generated/clu.rst +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/docs/source/index.rst +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/autohook.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/post-push/00-coverage.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/pre-push/00-noop.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/pre-push/01-direnv-stdlib.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/scripts/coverage.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/scripts/display-issues.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/scripts/git-pushex +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/hooks/scripts/noop.sh +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/mypy.ini +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/noxfile.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/pyproject.toml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/pytest.ini +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/dependency_links.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/entry_points.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/requires.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/top_level.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/python_clu.egg-info/zip-safe +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/pytype.cfg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/changelog.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/dev.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/docs.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/install.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/nox/codecov.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/nox/docs.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/nox/manifest.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/nox/repl.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/nox/tests.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/tox.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/requirements/typecheck.txt +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/scratch/direnv_transformed_env.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/scratch/inline-tests-ImportError-uggggh.ipynb +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/scratch/nteract.ipynb +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/setup.cfg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/1-58.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/3471426989_aa8e83cac5_o.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/3472236406_1fbf1a567d_o.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/8600JC.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/8ba.png +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/IMG_20180505_205153567.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/cheetah-003.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/config/clu-config.toml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/config/yodogg.toml +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/shutterstock_90194617.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/yodata/09163d51421853.5608b3c2a1be0.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/yodata/5d0227342500004e12e3506d.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/yodata/BlackCat2_large-22.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/yodogg/Serval_Cat_Kitten-706.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/yodogg/Servals_Thoiry_19801.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/data/yodogg/video-pride-serval.jpg +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_abstract.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_all.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_boilerplate.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_config.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_config_abc.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_csv.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_dicts.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_dispatch.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_enum_aliases.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_exporting.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_extending.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_fs_abc.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_fs_appdirectories.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_fs_filesystem.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_fs_misc.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_importing.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_keyvalue.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_mathematics.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_naming.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_predicates.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_repl_columnize.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_repl_modules.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_repr.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_scripts_repl.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_typespace_namespace.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_typology.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/test_version.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/yodogg/.tm_properties +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/yodogg/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/yodogg/yodogg/__init__.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/yodogg/yodogg/config.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/yodogg/yodogg/exporting.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tests/yodogg/yodogg/iheard.py +0 -0
- {python_clu-0.11.6 → python_clu-0.12.2}/tox.ini +0 -0
|
@@ -33,7 +33,7 @@ recursive-include clu *
|
|
|
33
33
|
recursive-include docs *
|
|
34
34
|
recursive-include hooks *
|
|
35
35
|
recursive-include requirements *.txt
|
|
36
|
-
recursive-include scratch *.py *.ipynb
|
|
36
|
+
recursive-include scratch *.py *.ipynb *.jpg *.pxd
|
|
37
37
|
recursive-include tests *.py *.jpg *.png *.toml *.json .tm_properties
|
|
38
38
|
|
|
39
39
|
exclude .coverage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-clu
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.2
|
|
4
4
|
Summary: CLU - Common Lightweight Utilities, or Command-Line Utilities (your pick)
|
|
5
5
|
Home-page: https://github.com/fish2000/clu
|
|
6
6
|
Download-URL: https://github.com/fish2000/clu/zipball/master
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
[Python-CLU][clu] – Common Lightweight Utilities
|
|
2
|
+
========================================================
|
|
3
|
+
|
|
4
|
+
[](https://codecov.io/gh/fish2000/CLU/)
|
|
5
|
+
|
|
6
|
+
Install it right now! [Download][download-link] or type: `$ pip install -U python-clu`
|
|
7
|
+
------------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
The deal with CLU is, it is a bunch of stuff. Like, a junk drawer… but a junk drawer
|
|
10
|
+
full of building sets: [Legos][lego-link], [Robotix][robotix-link], [Capsela][capsela-link]
|
|
11
|
+
– and also magic interfaces that let somehow you plug Legos into Capselas and all
|
|
12
|
+
that. It’s a la carte: you can use one part of CLU (say the [inline testing stuff][clu.testing.utils])
|
|
13
|
+
and ignore the rest. Or just the [`exporter`][clu.exporting], or just the [`predicates`][clu.predicates]
|
|
14
|
+
collection. Naturally, these things taste great and also taste great together, too.
|
|
15
|
+
|
|
16
|
+
[](https://www.reddit.com/r/Xennials/comments/1aixaq7/construx_and_capsela_anyone_else_have_any/)
|
|
17
|
+
|
|
18
|
+
CLU started out as a packaged-up and sanely written version of
|
|
19
|
+
[the Python tools I wrote for my REPLs][homage-replutilities-link], divided up into
|
|
20
|
+
a bunch of subordinate packages. It’s grown magnificently since then (if I do say so myself).
|
|
21
|
+
And if you are wondering if “CLU” is a Tron reference, [you are correct][clu-tron-link].
|
|
22
|
+
“CLU” stands for “Common Lightweight Utilities” – it started out as an acronym for
|
|
23
|
+
“Command-Line Utilities” but it has grown useful beyond that scope, indeed.
|
|
24
|
+
|
|
25
|
+
The subordinate packages are pretty well-divided: [`clu.config`][clu.config] contains
|
|
26
|
+
things to help with configuration, like [config-file loading and saving][clu.config.filebase],
|
|
27
|
+
and data structures like [our famous namespaced keymaps][clu.config.keymap].
|
|
28
|
+
[`clu.exporting`][clu.exporting] has the `@export` decorator, a utility to easily label module
|
|
29
|
+
members for export by adding them to a modules’ `__all__` and `__dir__` members,
|
|
30
|
+
plus other stuff like real-name determination. Which, speaking of which, [`clu.naming`][clu.naming]
|
|
31
|
+
has additional easy functions for dealing with the names of your things and other peoples’,
|
|
32
|
+
and [`clu.repr`][clu.repr] has stuff for easily printing, getting, and specifying an objects’
|
|
33
|
+
string representation.
|
|
34
|
+
|
|
35
|
+
You’ll like [`clu.abstract`][clu.abstract] if you like building class towers – we have ABCs
|
|
36
|
+
for all types of things. If you like [`dict`s][dicts], check out the aforementioned [`clu.config.keymap`][clu.config.keymap]
|
|
37
|
+
and [`clu.dicts`][clu.dicts] modules – you’ll find things to build dictionary types, represent
|
|
38
|
+
them, and deal with them later. [`clu.dispatch`][clu.dispatch] will help you manage
|
|
39
|
+
subprocesses easily, [`clu.version`][clu.version] is better then [`semver`][semver-link]
|
|
40
|
+
(I promise), [`clu.testing`][clu.testing] is great for inlining some quick unit tests, and
|
|
41
|
+
[`clu.scripts`][clu.scripts] and [`clu.repl`][clu.repl] are what you want for whatever your
|
|
42
|
+
REPL environment may be… [`bpython`][bpython-link], [`ipython`][ipython-link],
|
|
43
|
+
[`ptpython`][ptpython-link], and many others I am sure!
|
|
44
|
+
|
|
45
|
+
So do have a look around. Here’s an abridged breakdown of some things within:
|
|
46
|
+
|
|
47
|
+
* [`config`][clu.config]: Tons of useful things for dealing with your app’s configuration. These are centered
|
|
48
|
+
around lexically namespaced dictionaries called “KeyMaps”, which basic examples of which can be
|
|
49
|
+
found in [`clu.config.keymap`][clu.config.keymap]. If your nested data looks like:
|
|
50
|
+
|
|
51
|
+
data = {
|
|
52
|
+
'yo' : {
|
|
53
|
+
'dogg' : {
|
|
54
|
+
'i-heard' : {
|
|
55
|
+
'you-like' : "nested data"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
… and you assign it to a keymap, like e.g. `keyed = keymap.Nested(data).flatten()`, then you can
|
|
62
|
+
use `keyed` like so:
|
|
63
|
+
|
|
64
|
+
assert keyed["yo:dogg:i-heard:you-like"] == "nested data"
|
|
65
|
+
|
|
66
|
+
… The `Flat` and `Nested` classes are cheap to construct and lightweight, and generally act like most
|
|
67
|
+
[`dict`][dicts] instances in most of the expected ways. There is also an environment-variable [`keymap`][clu.config.keymap]
|
|
68
|
+
adapter in [`clu.config.env`][clu.config.env], which if your app uses environment variables that look like like
|
|
69
|
+
`MYAPP_CONFIG_THINGY`, they can be accessed through `env.FrozenEnviron(appname='myapp')` or
|
|
70
|
+
`env.Environ(appname='myapp')` like so:
|
|
71
|
+
|
|
72
|
+
appenv = Environ(appname='myapp')
|
|
73
|
+
assert appenv['config:thingy'] == "some value"
|
|
74
|
+
appenv['config:doohickey'] = "a different value" # sets MYAPP_CONFIG_DOOHICKEY
|
|
75
|
+
# in the current env
|
|
76
|
+
|
|
77
|
+
… and there are plenty of tools for rolling your own `KeyMap`s in [`clu.config`][clu.config]: the
|
|
78
|
+
[`proxy`][clu.config.proxy] subpackage has a `KeyMap` proxy class, [`ns`][clu.config.ns] has utility functions
|
|
79
|
+
for manipulating namespace strings, [`keymapview`][clu.config.keymapview] has a class tower for
|
|
80
|
+
[`KeyMap`][clu.config.keymap] key/value/item views, and [`abc`][clu.config.abc] has, as you’d expect, all
|
|
81
|
+
the abstract base classes upon which our [`KeyMap`s][clu.config.keymap] are built, for your perusal and
|
|
82
|
+
eventual enjoyment.
|
|
83
|
+
|
|
84
|
+
* [`constants`][clu.constants]: Definitions of [useful constants][clu.constants.consts], as well as
|
|
85
|
+
[polyfills][clu.constants.polyfills] to allow certain dependencies from the Python standard library to work even
|
|
86
|
+
when some of their moving parts are missing (i.e. Ye Olde Pythone 2.7, various PyPy implementations, etc).
|
|
87
|
+
|
|
88
|
+
* [`fs`][clu.fs]: Filesystem-related things. Submodules include:
|
|
89
|
+
|
|
90
|
+
* [`fs.filesystem`][clu.fs.filesystem]: classes representing filesystem primitives like `Directory`,
|
|
91
|
+
`TemporaryDirectory`, `TemporaryName`; a version of [`tempfile.NamedTemporaryFile`][tempfile.NamedTemporaryFile]
|
|
92
|
+
that works with or without the leading dot in the provided suffix (a peeve of mine); functions
|
|
93
|
+
for common filesystem operations like `which(…)`, `back_ticks(…)`, `rm_rf(…)` (be careful
|
|
94
|
+
with that one), and so forth.
|
|
95
|
+
|
|
96
|
+
* The `Directory` class is particularly extensive, with methods for [Zipfile][zipfile] archiving, searching
|
|
97
|
+
for importable Python files and others, file-suffix histograms, context-managed working-directory
|
|
98
|
+
management, walking and reverse-walking, and much more.
|
|
99
|
+
|
|
100
|
+
* [`fs.appdirectories`][clu.fs.appdirectories]: Started out as a pretty much wholesale duplication of the popular
|
|
101
|
+
[`appdirs`][appdirs-link] package[<sup>†</sup>](#dagger) – but it’s been kitted out with man CLUish things, e.g.
|
|
102
|
+
[`clu.fs.filesystem.Directory`][clu.fs.filesystem] instances. A solid upgrade in my opinion!
|
|
103
|
+
|
|
104
|
+
* [`fs.misc`][clu.fs.misc]: a bunch of useful miscellany – noteworthy standouts include regex utility functions for
|
|
105
|
+
constructing filename regex match or exclusion tests.
|
|
106
|
+
|
|
107
|
+
* [`fs.pypath`][clu.fs.pypath]: functions for safe manipulation of [`sys.path`][sys.path] – `enhance(…)`,
|
|
108
|
+
`remove_paths(…)`, `remove_invalid_paths()`, &c.
|
|
109
|
+
|
|
110
|
+
* [`importing`][clu.importing]: a whole class-based-module system! Basically you can do this:
|
|
111
|
+
|
|
112
|
+
class Derived(clu.importing.base.Module):
|
|
113
|
+
|
|
114
|
+
""" I heard you like docstrings """
|
|
115
|
+
|
|
116
|
+
yo = 'dogg'
|
|
117
|
+
|
|
118
|
+
@export
|
|
119
|
+
def yodogg(self):
|
|
120
|
+
return "I heard you like"
|
|
121
|
+
|
|
122
|
+
@export
|
|
123
|
+
def nodogg(self):
|
|
124
|
+
return None
|
|
125
|
+
|
|
126
|
+
export(yo, name='yo')
|
|
127
|
+
|
|
128
|
+
from clu.app import Derived as derived # TAKE NOTE!!!
|
|
129
|
+
|
|
130
|
+
assert isinstance(derived, Module)
|
|
131
|
+
assert derived.yo == 'dogg'
|
|
132
|
+
assert derived.yodogg() == "I heard you like"
|
|
133
|
+
assert derived.nodogg() is None
|
|
134
|
+
|
|
135
|
+
… see that? just by subclassing [`clu.importing.base.Module`][clu.importing.base] you can create something
|
|
136
|
+
instantly importable. Awesome, wouldn’t you say? I would say. We’re working out the best way to create the
|
|
137
|
+
base `Module` for your own project (the machinery is there but the semantics are not yet perfect) but do feel
|
|
138
|
+
free to play around with the stuff in [`clu.importing.base`][clu.importing.base], and have a look at the
|
|
139
|
+
implementation in [`clu.importing.proxy`][clu.importing.proxy] of the “parameterized” `ProxyModule` (there’s a
|
|
140
|
+
`ChainModuleMap` container available in the [`proxy`][clu.importing.proxy] submodule, too).
|
|
141
|
+
|
|
142
|
+
* [`repl`][clu.repl] and [`scripts`][clu.scripts]: Tools useful in Python REPL environments. In [`clu.repl`][clu.repl],
|
|
143
|
+
there’s a while module full of ANSI printing and formatting utilities, many of them as classes, a [`columnize`][clu.repl.columnize]
|
|
144
|
+
function for, uh, printing things in columns[<sup>†</sup>](#dagger), and a [`modules`][clu.repl.modules] submodule
|
|
145
|
+
focused on printing things about your project’s modules and submodules.
|
|
146
|
+
|
|
147
|
+
[`clu.scripts`][clu.scripts] contains a [“repl.py”][clu.scripts.repl] file, which is meant to be loaded into an interactive interpreter like e.g.:
|
|
148
|
+
|
|
149
|
+
$ bpython -i «PATH_TO_CLU»/clu/scripts/repl.py
|
|
150
|
+
|
|
151
|
+
… which will set all of CLU up for you to use interactively. N.B. if you have your own script you want to include
|
|
152
|
+
but stil want to use CLU, you can set the `CLU_USER_SCRIPT` environment variable to the path to your own script,
|
|
153
|
+
and our “repl.py” script will pick it up.
|
|
154
|
+
|
|
155
|
+
[`clu.scripts`][clu.scripts] also contains [`treeline`][clu.scripts.treeline] and [`dictroast`][clu.scripts.dictroast], which
|
|
156
|
+
are CLU’s nascent command-line parsing utilities. They make use of the CLU `KeyMap` idiom (q.v. note _supra_)
|
|
157
|
+
and are being worked on right this very µsecond!
|
|
158
|
+
|
|
159
|
+
* [`typespace`][clu.typespace]: Contains a submodule `typespace.namespace` defining `SimpleNamespace` (á la Python 3’s
|
|
160
|
+
[`types.SimpleNamespace`][types.SimpleNamespace]) and a slightly more useful `Namespace` ancestor class;
|
|
161
|
+
these are used to furnish a `typespace.types` namespace that contains everything in the standard-library
|
|
162
|
+
[`types`][types] module, but with all the typenames shortened so they no longer gratuitously end in “Type”. Like e.g.
|
|
163
|
+
[`types.ModuleType`][types.ModuleType] is to be found in `typespace.types.Module`, [`types.FunctionType`][types.FunctionType]
|
|
164
|
+
is `typespace.types.Function`, et cetera, ad nauseum, so you can just do `from clu.typespace import types`
|
|
165
|
+
to lose the redundant “Type” naming suffix – which I don’t know about you but that annoys me, I mean we all know
|
|
166
|
+
that these things are types because they are in the fucking [`types`][types] module and don’t need those overly verbose extra four characters
|
|
167
|
+
there at the end. ALSO, there are additional useful types, from Python’s standard library and common packages,
|
|
168
|
+
in the [`types` namespace][clu.typespace.namespace]. YOU’RE WELCOME!!
|
|
169
|
+
|
|
170
|
+
* [`dicts`][clu.dicts]: Functions and classes for wrangling [`dict`s][dicts] (and actually [`Mapping`][collections.abc.Mapping]
|
|
171
|
+
and [`MutableMapping`][collections.abc.MutableMapping] descendants in general). There are ABCs for
|
|
172
|
+
key/value/item views for your own mappings, a much better `ChainMap`, written from scratch and improving
|
|
173
|
+
on [`collections.ChainMap`][collections.ChainMap], plus a `ChainRepr` based on [`reprlib.Repr`][reprlib.Repr],
|
|
174
|
+
and a whole bunch of fast dict-merging functions.
|
|
175
|
+
|
|
176
|
+
* [`exporting`][clu.exporting]: This is kind of the heart of CLU. At the beginning of all internal CLU modules, you’ll find something
|
|
177
|
+
using the `Exporter`, like this:
|
|
178
|
+
|
|
179
|
+
from clu.exporting import Exporter
|
|
180
|
+
|
|
181
|
+
exporter = Exporter(path=__file__)
|
|
182
|
+
export = exporter.decorator()
|
|
183
|
+
|
|
184
|
+
… which I know, I know, the use of `__file__` there is kind of irritating. But that `exporter` instance is now
|
|
185
|
+
registered with CLU, and whenever there’s a class or function you want made available outside the module,
|
|
186
|
+
you can specify it like:
|
|
187
|
+
|
|
188
|
+
@export
|
|
189
|
+
def public_function():
|
|
190
|
+
print("I’m so public")
|
|
191
|
+
|
|
192
|
+
class PrivateAncestor:
|
|
193
|
+
""" I’m more private, don’t play with me """
|
|
194
|
+
|
|
195
|
+
@export
|
|
196
|
+
class PublicThing(PrivateAncestor):
|
|
197
|
+
""" I’m very public, indeed, and available """
|
|
198
|
+
|
|
199
|
+
At the end of the module (but before your CLU tests, q.v. note _sub_.) you put:
|
|
200
|
+
|
|
201
|
+
__all__, __dir__ = exporter.all_and_dir()
|
|
202
|
+
|
|
203
|
+
… which makes things clear what is public and what is private to consumers of your code, without messing
|
|
204
|
+
around with underscore prefixes, which I find coarse, and vulgar. You’re not just labeling things for export,
|
|
205
|
+
though: [`clu.exporting`][clu.exporting] has tons of machinery for finding out the **“true name”** of a thing,
|
|
206
|
+
be it a class (easy), a function (trickier but still easy), an instance (trickier still), and a module variable (totally
|
|
207
|
+
very tricky indeed).
|
|
208
|
+
|
|
209
|
+
For your own project, at some part in your code, all you have to do is: `from clu.exporting import ExporterBase`,
|
|
210
|
+
and then subclass `ExporterBase` with your app’s name and base path. Like so:
|
|
211
|
+
|
|
212
|
+
class Exporter(ExporterBase, basepath="/your/project", appname="MyProject"):
|
|
213
|
+
pass
|
|
214
|
+
|
|
215
|
+
… then import your own importer (or call it whatever you want) at the top of your own CLUish modules and
|
|
216
|
+
instantiate per the example _supra_. See also [`clu.scripts.dictroast`][clu.scripts.dictroast] for other tricks your
|
|
217
|
+
`Exporter` instances can perform.
|
|
218
|
+
|
|
219
|
+
* [`testing`][clu.testing]: a handy inline unit-test writing setup. It works fine with [`coverage`][coverage-link] and
|
|
220
|
+
[`pytest`][pytest-link] – all you have to do is, after your line assigning `__all__` and `__dir__` at the end
|
|
221
|
+
of the module proper, something like:
|
|
222
|
+
|
|
223
|
+
def test():
|
|
224
|
+
from clu.testing.utils import inline
|
|
225
|
+
|
|
226
|
+
@inline.precheck
|
|
227
|
+
def before_everything_else():
|
|
228
|
+
""" This function runs once before testing """
|
|
229
|
+
# ...
|
|
230
|
+
|
|
231
|
+
@inline
|
|
232
|
+
def first_test():
|
|
233
|
+
""" This test does one thing """
|
|
234
|
+
# ...
|
|
235
|
+
|
|
236
|
+
@inline
|
|
237
|
+
def second_test():
|
|
238
|
+
""" This test does another thing """
|
|
239
|
+
# ...
|
|
240
|
+
|
|
241
|
+
@inline.runif(something == something_else)
|
|
242
|
+
def test_conditionally_run():
|
|
243
|
+
""" This test only does something if `something` == `something_else` """
|
|
244
|
+
# ...
|
|
245
|
+
|
|
246
|
+
@inline.diagnostic
|
|
247
|
+
def apres_testing():
|
|
248
|
+
""" This function runs once after testing """
|
|
249
|
+
# ...
|
|
250
|
+
|
|
251
|
+
return inline.test(100)
|
|
252
|
+
|
|
253
|
+
if __name__ == '__main__':
|
|
254
|
+
sys.exit(test())
|
|
255
|
+
|
|
256
|
+
… running the module (with either `python -m yourapp.yourmodule` or, say, [Nox][nox-link]) will show
|
|
257
|
+
you each tests’ output. But see that `return inline.test(100)` line? That integer argument tells
|
|
258
|
+
the CLU testrunner how many times to run each test (we here like to go a hundred times). You’ll get a
|
|
259
|
+
report – each test function only prints its output on the first run, the other 99 in this case are muted –
|
|
260
|
+
that shows you the time totals, which will look like this:
|
|
261
|
+
|
|
262
|
+
[](https://github.com/fish2000/CLU)
|
|
263
|
+
|
|
264
|
+
… which the astute will note is the output from a non-CLU module. [`clu.testing.utils`][clu.testing.utils]
|
|
265
|
+
is very easy to integrate, as it doesn’t require any other part of CLU. Look over [our noxfile][clu-noxfile] for
|
|
266
|
+
examples of how to run your inline tests as part of a larger suite.
|
|
267
|
+
|
|
268
|
+
… there are other testing support tools in[ `clu.testing.utils`][clu.testing.utils], have a look. There’s
|
|
269
|
+
also a [`clu.testing.pytest`][clu.testing.pytest] submodule, with some currently-under-development
|
|
270
|
+
[`pytest`][pytest-link] plugins.
|
|
271
|
+
|
|
272
|
+
* [`mathematics`][clu.mathematics]: the future home for math-related stuff. All there is right now is a `clamp(…)` function that works with
|
|
273
|
+
[`numpy`][numpy-link] [dtypes][numpy-dtype-link].
|
|
274
|
+
|
|
275
|
+
* [`naming`][clu.naming]: functions for determining the names of things (even module constants and other random things
|
|
276
|
+
that generally lack things like `__name__` attributes) and for the importing and exporting of things by
|
|
277
|
+
“qualified names” – for instance, you can use `naming.qualified_import(…)` to import a class [`CurveSet`][instakit.processors.curves.CurveSet]
|
|
278
|
+
from its package [`instakit.processors.curves`][instakit.processors.curves] by doing `CurveSet = qualified_import('instakit.processors.curves.CurveSet')`,
|
|
279
|
+
which that may be handier for you than composing and hard-coding an `import` statement. See also the
|
|
280
|
+
`nameof(…)` and `moduleof(…)` functions, and the utility functions (e.g. `qualified_name(…)`) and
|
|
281
|
+
predicates (e.g. `isnative(…)`). Most of these functions take literally anything for their argument.
|
|
282
|
+
|
|
283
|
+
* [`predicates`][clu.predicates]: If [`clu.exporting`][clu.exporting] is the heart, [`clu.predicates`][clu.predicates] is
|
|
284
|
+
all of the eyes, ears, fingers and toes of CLU.
|
|
285
|
+
|
|
286
|
+
* Do you want to know if a class is a metaclass? We have an `ismetaclass(…)` predicate for it, for example.
|
|
287
|
+
* Do you want to get an attribute from something you have, but not sure which attributes this _something_
|
|
288
|
+
may have (due to versioning or being passed around, or whatever)? `attr(thing, 'one', 'two', default=None)`
|
|
289
|
+
will give you `thing.one` if that exists, `thing.two`, if `thing.one` doesn’t, and `None` if neither of them
|
|
290
|
+
are there.
|
|
291
|
+
* But… would you maybe like to get a tuple with all of the `one` attributes across multiple things?
|
|
292
|
+
`attr_across('one', *things)` will do exactly that.
|
|
293
|
+
* Similar to the above, `pyattr(…)` does like `attr(…)` except `one` will be expanded to `__one__`, and
|
|
294
|
+
`item(…)` searches over mapping keys rather than attribute names.
|
|
295
|
+
|
|
296
|
+
Sweet, right? These functions, and others in the [`predicates`][clu.predicates] module, are based on `accessor`,
|
|
297
|
+
`aquirer`, `searcher`, and `collator` – abstract functions that can themselves be used. In fact most of
|
|
298
|
+
[`clu.predicates`][clu.predicates] is written in the functional style – that is to say they are built successively
|
|
299
|
+
out of multiple `lambda` statements. If this is not your taste, everything there has been documented thoroughly
|
|
300
|
+
for your use and you shouldn’t have to program in this style. But… if you _do_ enjoy a spot of FP, the primitives
|
|
301
|
+
in the module perhaps will interest you more than the more utilitarian contents.
|
|
302
|
+
|
|
303
|
+
* [`sanitizer`][clu.sanitizer]: functions for cleaning up unicode. Right now there is just a list-based `sanitize(…)`
|
|
304
|
+
function that tones down anything with high-value code points to the point where it can be safely `ascii`-ified.
|
|
305
|
+
|
|
306
|
+
* [`typology`][clu.typology]: This is like [`clu.predicates`][clu.predicates] but with more predicates, many of which are
|
|
307
|
+
based on typelists. The module is full of typelists and it uses them extensively in its predicates, via `isinstance(…)`,
|
|
308
|
+
`issubclass(…)` and a custom version of same called `subclasscheck(…)` which tries very hard to work with
|
|
309
|
+
what you give it (instead of just crapping out with a `False` return value). You will want to explore this one!
|
|
310
|
+
|
|
311
|
+
* [`version`][clu.version]: This is basically my take on the [`semver`][semver-link] package, only with improvements.
|
|
312
|
+
I originally developed it for internal use in some of my Python projects, but it stands on its own. You can
|
|
313
|
+
construct [`clu.version.VersionInfo`][clu.version.VersionInfo] instances using [`semver`][semver-link]
|
|
314
|
+
primitives amongst other things. The (skeletal) [`git_version`][clu.version.git_version] subpackage has a
|
|
315
|
+
couple of [Git-related][git-link] functions, but what you really want is in [`read_version`][clu.version.read_version]
|
|
316
|
+
– therein you’ll find a `read_version_file(…)` function that uses the `ast` module to read one of those
|
|
317
|
+
`__version__.py` files I know you have lying around. Yes
|
|
318
|
+
|
|
319
|
+
* [The `pytest` testsuite][clu-testsuite]: CLU has a full set of [`pytest`][pytest-link]-compatible unit tests.
|
|
320
|
+
In addition to copious module-specific [CLU inline tests][clu.testing], you can run this test suite using
|
|
321
|
+
[`pytest`][pytest-link] – or, if you’d like to run *all* the tests, use the fantastic [Nox][nox-link] testrunner
|
|
322
|
+
(which we use) along with [our included noxfile][clu-noxfile].
|
|
323
|
+
|
|
324
|
+
… AND MORE!!! There really are a ton of useful things in here and one day I will list them (but not today).
|
|
325
|
+
Have fun with it!! [Download][download-link] CLU today and explore – if you want a full list of everything CLU
|
|
326
|
+
exports, install it and list them all in your terminal:
|
|
327
|
+
|
|
328
|
+
$ pip install -U python-clu
|
|
329
|
+
$ python -m clu
|
|
330
|
+
|
|
331
|
+
… which will give you a giant list that looks like this:
|
|
332
|
+
|
|
333
|
+
[](https://pypi.org/project/python-clu/)
|
|
334
|
+
|
|
335
|
+
<a name="dagger">†</a> – the original code for some modules in CLU (e.g.
|
|
336
|
+
[`clu.fs.appdirectories`][clu.fs.appdirectories], [`clu.repl.columnize`][clu.repl.columnize],
|
|
337
|
+
[`clu.version.read_version`][clu.version.read_version]) was vendored in from third-party code.
|
|
338
|
+
This has all been appropriately licensed and credits are inlined where due. Thanks to all CLU
|
|
339
|
+
contributors, big and small!
|
|
340
|
+
|
|
341
|
+
<!--- LINKS! LINKS! LINKS! -->
|
|
342
|
+
[pypi-link]: https://pypi.org/project/python-clu/
|
|
343
|
+
[download-link]: https://files.pythonhosted.org/packages/aa/da/b52556dd89b45f2267e8fc8972b10dfaad196e849c51bf143297851713ce/python_clu-0.11.6.tar.gz
|
|
344
|
+
[homage-replutilities-link]: https://github.com/fish2000/homage/blob/master/.script-bin/replutilities.py
|
|
345
|
+
[clu-tron-link]: https://tron.fandom.com/wiki/Clu
|
|
346
|
+
|
|
347
|
+
[appdirs-link]: https://github.com/ActiveState/appdirs
|
|
348
|
+
[coverage-link]: https://coverage.readthedocs.io/en/latest/
|
|
349
|
+
[git-link]: https://git-scm.com
|
|
350
|
+
[numpy-link]: https://numpy.org
|
|
351
|
+
[numpy-dtype-link]: https://numpy.org/doc/stable/user/basics.types.html
|
|
352
|
+
[bpython-link]: https://bpython-interpreter.org
|
|
353
|
+
[ipython-link]: https://ipython.org
|
|
354
|
+
[ptpython-link]: https://github.com/prompt-toolkit/ptpython
|
|
355
|
+
[semver-link]: https://pypi.org/project/semver/
|
|
356
|
+
[pytest-link]: https://docs.pytest.org/en/stable/
|
|
357
|
+
[nox-link]: https://nox.thea.codes/en/stable/
|
|
358
|
+
[lego-link]: https://www.lego.com/
|
|
359
|
+
[capsela-link]: https://hackaday.com/2017/09/15/retrotectactular-capsela-is-dead-long-live-capsela/
|
|
360
|
+
[robotix-link]: https://en.wikipedia.org/wiki/Robotix
|
|
361
|
+
|
|
362
|
+
[clu.config]: https://github.com/fish2000/CLU/tree/master/clu/config
|
|
363
|
+
[clu.config.abc]: https://github.com/fish2000/CLU/tree/master/clu/config/abc.py
|
|
364
|
+
[clu.config.env]: https://github.com/fish2000/CLU/tree/master/clu/config/env.py
|
|
365
|
+
[clu.config.filebase]: https://github.com/fish2000/CLU/tree/master/clu/config/filebase.py
|
|
366
|
+
[clu.config.keymap]: https://github.com/fish2000/CLU/tree/master/clu/config/keymap.py
|
|
367
|
+
[clu.config.keymapview]: https://github.com/fish2000/CLU/tree/master/clu/config/keymapview.py
|
|
368
|
+
[clu.config.ns]: https://github.com/fish2000/CLU/tree/master/clu/config/ns.py
|
|
369
|
+
[clu.config.proxy]: https://github.com/fish2000/CLU/tree/master/clu/config/proxy.py
|
|
370
|
+
|
|
371
|
+
[clu.constants]: https://github.com/fish2000/CLU/tree/master/clu/constants
|
|
372
|
+
[clu.constants.consts]: https://github.com/fish2000/CLU/tree/master/clu/constants/consts.py
|
|
373
|
+
[clu.constants.polyfills]: https://github.com/fish2000/CLU/tree/master/clu/constants/polyfills.py
|
|
374
|
+
|
|
375
|
+
[clu.fs]: https://github.com/fish2000/CLU/tree/master/clu/fs
|
|
376
|
+
[clu.fs.abc]: https://github.com/fish2000/CLU/tree/master/clu/fs/abc.py
|
|
377
|
+
[clu.fs.appdirectories]: https://github.com/fish2000/CLU/tree/master/clu/fs/appdirectories.py
|
|
378
|
+
[clu.fs.filesystem]: https://github.com/fish2000/CLU/tree/master/clu/fs/filesystem.py
|
|
379
|
+
[clu.fs.misc]: https://github.com/fish2000/CLU/tree/master/clu/fs/misc.py
|
|
380
|
+
[clu.fs.pypath]: https://github.com/fish2000/CLU/tree/master/clu/fs/pypath.py
|
|
381
|
+
|
|
382
|
+
[clu.importing]: https://github.com/fish2000/CLU/tree/master/clu/importing
|
|
383
|
+
[clu.importing.base]: https://github.com/fish2000/CLU/tree/master/clu/importing/base.py
|
|
384
|
+
[clu.importing.proxy]: https://github.com/fish2000/CLU/tree/master/clu/importing/proxy.py
|
|
385
|
+
|
|
386
|
+
[clu.repl]: https://github.com/fish2000/CLU/tree/master/clu/repl
|
|
387
|
+
[clu.repl.ansi]: https://github.com/fish2000/CLU/tree/master/clu/repl/ansi.py
|
|
388
|
+
[clu.repl.banners]: https://github.com/fish2000/CLU/tree/master/clu/repl/banners.py
|
|
389
|
+
[clu.repl.columnize]: https://github.com/fish2000/CLU/tree/master/clu/repl/columnize.py
|
|
390
|
+
[clu.repl.modules]: https://github.com/fish2000/CLU/tree/master/clu/repl/modules.py
|
|
391
|
+
|
|
392
|
+
[clu.scripts]: https://github.com/fish2000/CLU/tree/master/clu/scripts
|
|
393
|
+
[clu.scripts.dictroast]: https://github.com/fish2000/CLU/tree/master/clu/scripts/dictroast.py
|
|
394
|
+
[clu.scripts.repl]: https://github.com/fish2000/CLU/tree/master/clu/scripts/repl.py
|
|
395
|
+
[clu.scripts.treeline]: https://github.com/fish2000/CLU/tree/master/clu/scripts/treeline.py
|
|
396
|
+
|
|
397
|
+
[clu.testing]: https://github.com/fish2000/CLU/tree/master/clu/testing
|
|
398
|
+
[clu.testing.pytest]: https://github.com/fish2000/CLU/tree/master/clu/testing/pytest.py
|
|
399
|
+
[clu.testing.utils]: https://github.com/fish2000/CLU/tree/master/clu/testing/utils.py
|
|
400
|
+
|
|
401
|
+
[clu.typespace]: https://github.com/fish2000/CLU/tree/master/clu/typespace
|
|
402
|
+
[clu.typespace.namespace]: https://github.com/fish2000/CLU/tree/master/clu/typespace/namespace.py
|
|
403
|
+
|
|
404
|
+
[clu.version]: https://github.com/fish2000/CLU/tree/master/clu/version
|
|
405
|
+
[clu.version.git_version]: https://github.com/fish2000/CLU/tree/master/clu/version/git_version.py
|
|
406
|
+
[clu.version.read_version]: https://github.com/fish2000/CLU/tree/master/clu/version/read_version.py
|
|
407
|
+
[clu.version.VersionInfo]: https://github.com/fish2000/CLU/blob/9f64200a947dbdcbf7eca44b87d0d9efeb4c6de7/clu/version/__init__.py#L100-L248
|
|
408
|
+
|
|
409
|
+
[clu]: https://github.com/fish2000/CLU
|
|
410
|
+
[clu-testsuite]: https://github.com/fish2000/CLU/tree/master/tests
|
|
411
|
+
[clu-noxfile]: https://github.com/fish2000/CLU/blob/master/noxfile.py
|
|
412
|
+
|
|
413
|
+
[clu.abstract]: https://github.com/fish2000/CLU/tree/master/clu/abstract.py
|
|
414
|
+
[clu.all]: https://github.com/fish2000/CLU/tree/master/clu/all.py
|
|
415
|
+
[clu.application]: https://github.com/fish2000/CLU/tree/master/clu/application.py
|
|
416
|
+
[clu.csv]: https://github.com/fish2000/CLU/tree/master/clu/csv.py
|
|
417
|
+
[clu.dicts]: https://github.com/fish2000/CLU/tree/master/clu/dicts.py
|
|
418
|
+
[clu.dispatch]: https://github.com/fish2000/CLU/tree/master/clu/dispatch.py
|
|
419
|
+
[clu.enums]: https://github.com/fish2000/CLU/tree/master/clu/enums.py
|
|
420
|
+
[clu.exporting]: https://github.com/fish2000/CLU/tree/master/clu/exporting.py
|
|
421
|
+
[clu.extending]: https://github.com/fish2000/CLU/tree/master/clu/extending.py
|
|
422
|
+
[clu.keyvalue]: https://github.com/fish2000/CLU/tree/master/clu/keyvalue.py
|
|
423
|
+
[clu.mathematics]: https://github.com/fish2000/CLU/tree/master/clu/mathematics.py
|
|
424
|
+
[clu.naming]: https://github.com/fish2000/CLU/tree/master/clu/naming.py
|
|
425
|
+
[clu.predicates]: https://github.com/fish2000/CLU/tree/master/clu/predicates.py
|
|
426
|
+
[clu.repr]: https://github.com/fish2000/CLU/tree/master/clu/repr.py
|
|
427
|
+
[clu.sanitizer]: https://github.com/fish2000/CLU/tree/master/clu/sanitizer.py
|
|
428
|
+
[clu.stdio]: https://github.com/fish2000/CLU/tree/master/clu/stdio.py
|
|
429
|
+
[clu.typology]: https://github.com/fish2000/CLU/tree/master/clu/typology.py
|
|
430
|
+
|
|
431
|
+
[instakit]: https://github.com/fish2000/instakit
|
|
432
|
+
[instakit.processors.curves]: https://github.com/fish2000/instakit/blob/master/instakit/processors/curves.py
|
|
433
|
+
[instakit.processors.curves.CurveSet]: https://github.com/fish2000/instakit/blob/ad5591c88176c2c997d86833b93dde017545277f/instakit/processors/curves.py#L109-L240
|
|
434
|
+
[collections.abc.Mapping]: https://docs.python.org/3/library/collections.abc.html#collections.abc.Mapping
|
|
435
|
+
[collections.abc.MutableMapping]: https://docs.python.org/3/library/collections.abc.html#collections.abc.MutableMapping
|
|
436
|
+
[collections.ChainMap]: https://docs.python.org/3/library/collections.html#chainmap-objects
|
|
437
|
+
[reprlib.Repr]: https://docs.python.org/3/library/reprlib.html#reprlib.Repr
|
|
438
|
+
[sys.path]: https://docs.python.org/3/library/sys_path_init.html
|
|
439
|
+
[tempfile.NamedTemporaryFIle]: https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile
|
|
440
|
+
[types]: https://docs.python.org/3/library/types.html
|
|
441
|
+
[types.ModuleType]: https://docs.python.org/3/library/types.html#types.ModuleType
|
|
442
|
+
[types.FunctionType]: https://docs.python.org/3/library/types.html#types.FunctionType
|
|
443
|
+
[types.SimpleNamespace]: https://docs.python.org/3/library/types.html#additional-utility-classes-and-functions
|
|
444
|
+
[zipfile]: https://docs.python.org/3/library/zipfile.html
|
|
445
|
+
[dicts]: https://docs.python.org/3/tutorial/datastructures.html#dictionaries
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.12.2'
|
|
@@ -145,11 +145,23 @@ class Sanitizer(Format):
|
|
|
145
145
|
|
|
146
146
|
class Serializable(abc.ABC):
|
|
147
147
|
|
|
148
|
+
""" An abstract class for something “serializable” – furnishing two
|
|
149
|
+
functions. A “from_dict(…)” class method takes a standard dict,
|
|
150
|
+
and returns a corresponding instance of the serializable class.
|
|
151
|
+
|
|
152
|
+
The “to_dict(…)” instance method, by contrast, takes no arguments
|
|
153
|
+
and returns a plain dict based on the instance of the serializable
|
|
154
|
+
class. This dict is based on the class, and contains whatever the
|
|
155
|
+
“from_dict(…)” method expects.
|
|
156
|
+
"""
|
|
157
|
+
|
|
148
158
|
@classmethod
|
|
149
159
|
def from_dict(cls, instance_dict):
|
|
160
|
+
""" Returns an instance, per the plain dict passed """
|
|
150
161
|
...
|
|
151
162
|
|
|
152
163
|
def to_dict(self):
|
|
164
|
+
""" Returns a plain dict, representing the instance """
|
|
153
165
|
...
|
|
154
166
|
|
|
155
167
|
class Cloneable(abc.ABC):
|
|
@@ -442,6 +442,7 @@ class FlatOrderedSet(collections.abc.Set,
|
|
|
442
442
|
collections.abc.Reversible,
|
|
443
443
|
collections.abc.Hashable, clu.abstract.Cloneable,
|
|
444
444
|
clu.abstract.ReprWrapper,
|
|
445
|
+
clu.abstract.Serializable,
|
|
445
446
|
metaclass=clu.abstract.Slotted):
|
|
446
447
|
|
|
447
448
|
""" FlatOrderedSet is a structure designed to coalesce any nested
|
|
@@ -30,7 +30,7 @@ def determine_module(thing, name=None):
|
|
|
30
30
|
return None
|
|
31
31
|
|
|
32
32
|
import pickle
|
|
33
|
-
return pickle.whichmodule(thing,
|
|
33
|
+
return pickle.whichmodule(thing, name) # type: ignore
|
|
34
34
|
|
|
35
35
|
"""
|
|
36
36
|
NAME AND MODULE SEARCH FUNCTIONS: the “nameof(…)” and “moduleof(…)”
|
|
@@ -45,7 +45,7 @@ class ANSI(AliasingEnumMeta):
|
|
|
45
45
|
superkws = dict(kwargs)
|
|
46
46
|
if 'source' in superkws:
|
|
47
47
|
del superkws['source']
|
|
48
|
-
return super(
|
|
48
|
+
return super().__prepare__(name, bases, **superkws)
|
|
49
49
|
|
|
50
50
|
def __new__(metacls, name, bases, attributes, **kwargs):
|
|
51
51
|
""" Override for `type.__new__(…)` setting up a derived
|
|
@@ -98,10 +98,10 @@ class ANSI(AliasingEnumMeta):
|
|
|
98
98
|
attributes['__doc__'] = inspect.cleandoc(doc_string)
|
|
99
99
|
attributes['to_string'] = to_string
|
|
100
100
|
|
|
101
|
-
return super(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
return super().__new__(metacls, name,
|
|
102
|
+
bases,
|
|
103
|
+
attributes,
|
|
104
|
+
**kwargs)
|
|
105
105
|
|
|
106
106
|
def for_name(cls, name):
|
|
107
107
|
""" Get an enum member or alias member by name """
|
|
@@ -145,7 +145,7 @@ class ANSI(AliasingEnumMeta):
|
|
|
145
145
|
|
|
146
146
|
def _missing_(cls, value):
|
|
147
147
|
# Insert terminal256 lookup here
|
|
148
|
-
return super(
|
|
148
|
+
return super()._missing_(value)
|
|
149
149
|
|
|
150
150
|
@unique
|
|
151
151
|
class Text(ANSIBase, metaclass=ANSI, source=colorama.Fore):
|
|
@@ -230,6 +230,7 @@ ANSIFormatBase = NamedTuple('ANSIFormatBase', FIELDS)
|
|
|
230
230
|
class ANSIFormat(clu.abstract.Format,
|
|
231
231
|
clu.abstract.Cloneable,
|
|
232
232
|
clu.abstract.ReprWrapper,
|
|
233
|
+
clu.abstract.Serializable,
|
|
233
234
|
collections.abc.Hashable,
|
|
234
235
|
ANSIFormatBase):
|
|
235
236
|
|
|
@@ -653,8 +654,6 @@ class DocFormat(clu.abstract.Format):
|
|
|
653
654
|
cls = type(self)
|
|
654
655
|
if not self.isatty:
|
|
655
656
|
return cls.null
|
|
656
|
-
if not hasattr(cls, atx):
|
|
657
|
-
raise AttributeError(f"format not found: {atx!s}")
|
|
658
657
|
return getattr(cls, atx)
|
|
659
658
|
|
|
660
659
|
def put(self, string):
|
|
@@ -38,7 +38,7 @@ from clu.naming import nameof, qualified_import
|
|
|
38
38
|
from clu.predicates import ispublic, ismarkedprivate, listify
|
|
39
39
|
from clu.repl import columnize
|
|
40
40
|
|
|
41
|
-
# Set up the __all__
|
|
41
|
+
# Set up the __all__ list:
|
|
42
42
|
__all__ = list()
|
|
43
43
|
|
|
44
44
|
# predicate for star-importing:
|
|
@@ -46,7 +46,7 @@ ok_for_star_import = lambda name: ispublic(name) and not ismarkedprivate(name)
|
|
|
46
46
|
|
|
47
47
|
# MODULE EXPORT FUNCTIONS: given a module name, export
|
|
48
48
|
# either the module or its contents into a given namespace:
|
|
49
|
-
def star_export(modulename, namespace,
|
|
49
|
+
def star_export(modulename, namespace, all=__all__):
|
|
50
50
|
""" Safely bind everything a module exports to a namespace. """
|
|
51
51
|
try:
|
|
52
52
|
module = qualified_import(modulename)
|
|
@@ -55,9 +55,9 @@ def star_export(modulename, namespace, alltuple=__all__):
|
|
|
55
55
|
for name in dir(module):
|
|
56
56
|
if ok_for_star_import(name):
|
|
57
57
|
namespace[name] = getattr(module, name)
|
|
58
|
-
|
|
58
|
+
all += listify(name)
|
|
59
59
|
|
|
60
|
-
def module_export(modulename, namespace,
|
|
60
|
+
def module_export(modulename, namespace, all=__all__):
|
|
61
61
|
""" Safely bind a module to a namespace. """
|
|
62
62
|
try:
|
|
63
63
|
module = qualified_import(modulename)
|
|
@@ -65,7 +65,7 @@ def module_export(modulename, namespace, alltuple=__all__):
|
|
|
65
65
|
module = importlib.import_module(modulename)
|
|
66
66
|
name = nameof(module)
|
|
67
67
|
namespace[modulename] = namespace[name] = module
|
|
68
|
-
|
|
68
|
+
all += listify(name)
|
|
69
69
|
|
|
70
70
|
# Warm up sys.modules and friends:
|
|
71
71
|
import_clu_modules()
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-clu
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.2
|
|
4
4
|
Summary: CLU - Common Lightweight Utilities, or Command-Line Utilities (your pick)
|
|
5
5
|
Home-page: https://github.com/fish2000/clu
|
|
6
6
|
Download-URL: https://github.com/fish2000/clu/zipball/master
|
|
@@ -124,6 +124,7 @@ clu/version/__init__.py
|
|
|
124
124
|
clu/version/__main__.py
|
|
125
125
|
clu/version/git_version.py
|
|
126
126
|
clu/version/read_version.py
|
|
127
|
+
docs/.DS_Store
|
|
127
128
|
docs/Makefile
|
|
128
129
|
docs/make.bat
|
|
129
130
|
docs/build/doctrees/api.doctree
|
|
@@ -215,6 +216,15 @@ requirements/nox/tests.txt
|
|
|
215
216
|
scratch/direnv_transformed_env.py
|
|
216
217
|
scratch/inline-tests-ImportError-uggggh.ipynb
|
|
217
218
|
scratch/nteract.ipynb
|
|
219
|
+
scratch/images/clu-module-list-example-small.jpg
|
|
220
|
+
scratch/images/clu-module-list-example.jpg
|
|
221
|
+
scratch/images/clu-module-list-example.pxd
|
|
222
|
+
scratch/images/clu-testing-time-totals-example-small.jpg
|
|
223
|
+
scratch/images/clu-testing-time-totals-example.jpg
|
|
224
|
+
scratch/images/clu-testing-time-totals-example.pxd
|
|
225
|
+
scratch/images/construx-and-capsela-small.jpg
|
|
226
|
+
scratch/images/construx-and-capsela.jpg
|
|
227
|
+
scratch/images/construx-and-capsela.pxd
|
|
218
228
|
tests/__init__.py
|
|
219
229
|
tests/test_abstract.py
|
|
220
230
|
tests/test_all.py
|
|
Binary file
|