python-clu 0.8.5__tar.gz → 0.10.1__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.10.1/.bumpversion.toml +32 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/MANIFEST.in +1 -1
- {python-clu-0.8.5 → python_clu-0.10.1}/Makefile +2 -2
- {python-clu-0.8.5 → python_clu-0.10.1}/PKG-INFO +37 -2
- python_clu-0.10.1/clu/__version__.py +1 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/filebase.py +2 -3
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/keymap.py +2 -2
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/ns.py +94 -75
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/proxy.py +9 -9
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/exporting.py +1 -1
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/extending.py +29 -29
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/filesystem.py +16 -19
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/base.py +3 -2
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/keyvalue.py +7 -7
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/ansi.py +0 -2
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/dictroast.py +9 -8
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/repl.py +3 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/treeline.py +19 -27
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/utils.py +3 -3
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/__init__.py +5 -5
- {python-clu-0.8.5 → python_clu-0.10.1}/noxfile.py +2 -2
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/PKG-INFO +37 -2
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/SOURCES.txt +1 -1
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/requires.txt +1 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/dev.txt +1 -1
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/install.txt +1 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/setup.py +1 -1
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_config.py +5 -4
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_exporting.py +10 -6
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_extending.py +6 -8
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_keyvalue.py +12 -10
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_version.py +6 -6
- python-clu-0.8.5/.bumpversion.cfg +0 -16
- python-clu-0.8.5/clu/__version__.py +0 -1
- {python-clu-0.8.5 → python_clu-0.10.1}/.coveragerc +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/.editorconfig +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/.gitchangelog.rc +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/.gitignore +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/.landscape.yml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/.travis.yml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/ABOUT.md +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/CHANGELOG.md +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/CLASSIFIERS.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/CODE_OF_CONDUCT.md +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/COPYING.md +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/LICENSE.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/README.md +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/appveyor.yml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/__main__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/abstract.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/all.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/api/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/api/__main__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/application.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/compilation/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/compilation/compiledb.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/compilation/macros.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/abc.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/base.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/codecs.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/env.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/fieldtypes.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/jsonfile.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/picklefile.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/tomlfile.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/formats/yamlfile.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/keymapview.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/config/settings.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/__main__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/consts.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/data.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/enums.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/exceptions.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/constants/polyfills.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/csv.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/dicts.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/dispatch.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/enums.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/abc.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/appdirectories.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/misc.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/pypath.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/fs/sourcetree.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/__main__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/importing/proxy.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/mathematics.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/naming.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/predicates.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/banners.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/boilerplate.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/boilerplate_copy.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/cli/print_version.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/columnize.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repl/modules.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/repr.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/sanitizer.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/.gitignore +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/README.md +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/ansicolors.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/boilerplate.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/forkumask.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-bpython.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-ipython.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-ptpython.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/repl-pyzo.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/legacy/xdg-runtime.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/scripts/prediversus.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/shelving/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/shelving/redat.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/shelving/redis.conf +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/stdio.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/hook.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/obsolete.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/testing/pytest.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/typespace/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/typespace/__main__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/typespace/namespace.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/typology.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/__main__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/git_version.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/clu/version/read_version.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/codecov.yml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/conftest.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/Makefile +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/api.doctree +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/environment.pickle +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/generated/clu.doctree +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/doctrees/index.doctree +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/.buildinfo +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_sources/api.rst.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_sources/generated/clu.rst.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_sources/index.rst.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/alabaster.css +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/basic.css +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/badge_only.css +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.svg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-bold.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal.woff +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/fonts/lato-normal.woff2 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/css/theme.css +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/custom.css +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/doctools.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/documentation_options.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/file.png +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/jquery-3.6.0.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/jquery.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/badge_only.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/html5shiv-printshiv.min.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/html5shiv.min.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/js/theme.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/language_data.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/minus.png +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/plus.png +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/pygments.css +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/searchtools.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/underscore-1.13.1.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/_static/underscore.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/api.html +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/generated/clu.html +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/genindex.html +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/index.html +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/objects.inv +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/py-modindex.html +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/search.html +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/html/searchindex.js +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/build/man/clu.1 +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/make.bat +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/api.rst +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/conf.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/generated/clu.rst +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/docs/source/index.rst +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/autohook.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/post-push/00-coverage.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/pre-push/00-noop.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/pre-push/01-direnv-stdlib.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/coverage.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/display-issues.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/git-pushex +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/hooks/scripts/noop.sh +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/mypy.ini +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/pyproject.toml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/pytest.ini +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/dependency_links.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/entry_points.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/top_level.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/python_clu.egg-info/zip-safe +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/pytype.cfg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/changelog.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/docs.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/codecov.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/docs.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/manifest.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/repl.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/nox/tests.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/tox.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/requirements/typecheck.txt +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/scratch/direnv_transformed_env.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/scratch/inline-tests-ImportError-uggggh.ipynb +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/scratch/nteract.ipynb +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/setup.cfg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/1-58.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/3471426989_aa8e83cac5_o.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/3472236406_1fbf1a567d_o.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/8600JC.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/8ba.png +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/IMG_20180505_205153567.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/cheetah-003.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/config/clu-config.toml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/config/yodogg.toml +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/shutterstock_90194617.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodata/09163d51421853.5608b3c2a1be0.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodata/5d0227342500004e12e3506d.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodata/BlackCat2_large-22.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodogg/Serval_Cat_Kitten-706.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodogg/Servals_Thoiry_19801.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/data/yodogg/video-pride-serval.jpg +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_abstract.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_all.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_boilerplate.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_config_abc.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_csv.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_dicts.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_dispatch.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_enum_aliases.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_abc.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_appdirectories.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_filesystem.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_fs_misc.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_importing.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_mathematics.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_naming.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_predicates.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_repl_columnize.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_repl_modules.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_repr.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_scripts_repl.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_typespace_namespace.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/test_typology.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/.tm_properties +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/__init__.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/config.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/exporting.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tests/yodogg/yodogg/iheard.py +0 -0
- {python-clu-0.8.5 → python_clu-0.10.1}/tox.ini +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
[tool.bumpversion]
|
|
3
|
+
current_version = "0.10.1"
|
|
4
|
+
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
5
|
+
serialize = ["{major}.{minor}.{patch}"]
|
|
6
|
+
search = "{current_version}"
|
|
7
|
+
replace = "{new_version}"
|
|
8
|
+
regex = true
|
|
9
|
+
ignore_missing_version = false
|
|
10
|
+
ignore_missing_files = false
|
|
11
|
+
tag = true
|
|
12
|
+
sign_tags = true
|
|
13
|
+
tag_name = "v{new_version}"
|
|
14
|
+
tag_message = "Bump version: {current_version} → {new_version}"
|
|
15
|
+
allow_dirty = false
|
|
16
|
+
commit = true
|
|
17
|
+
message = "Bumped version: {current_version} → {new_version}"
|
|
18
|
+
moveable_tags = []
|
|
19
|
+
commit_args = ""
|
|
20
|
+
setup_hooks = []
|
|
21
|
+
pre_commit_hooks = []
|
|
22
|
+
post_commit_hooks = []
|
|
23
|
+
|
|
24
|
+
[[tool.bumpversion.files]]
|
|
25
|
+
filename = "setup.py"
|
|
26
|
+
search = """__version__ = '{current_version}'"""
|
|
27
|
+
replace = """__version__ = '{new_version}'"""
|
|
28
|
+
|
|
29
|
+
[[tool.bumpversion.files]]
|
|
30
|
+
filename = "clu/__version__.py"
|
|
31
|
+
search = """__version__ = '{current_version}'"""
|
|
32
|
+
replace = """__version__ = '{new_version}'"""
|
|
@@ -47,10 +47,10 @@ twine-upload: cython sdist wheel
|
|
|
47
47
|
twine upload -s $(PROJECT_BASE)/dist/*
|
|
48
48
|
|
|
49
49
|
bump:
|
|
50
|
-
|
|
50
|
+
bump-my-version bump patch --verbose
|
|
51
51
|
|
|
52
52
|
bigbump:
|
|
53
|
-
|
|
53
|
+
bump-my-version bump minor --verbose
|
|
54
54
|
|
|
55
55
|
check: clean-test-artifacts
|
|
56
56
|
check-manifest -v
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-clu
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.1
|
|
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
|
|
@@ -29,6 +29,41 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
License-File: LICENSE.txt
|
|
31
31
|
License-File: COPYING.md
|
|
32
|
+
Requires-Dist: Click>=7.0
|
|
33
|
+
Requires-Dist: colorama>=0.4.0
|
|
34
|
+
Requires-Dist: dataclasses>=0.6; python_version < "3.7"
|
|
35
|
+
Requires-Dist: dbx-stopwatch>=1.6
|
|
36
|
+
Requires-Dist: enum34>=1.1.0; python_version < "3.4"
|
|
37
|
+
Requires-Dist: heapdict>=1.0.0
|
|
38
|
+
Requires-Dist: humanize>=1.0.0
|
|
39
|
+
Requires-Dist: importlib-metadata>=1.4.0; python_version < "3.8"
|
|
40
|
+
Requires-Dist: mock>=4.0.0
|
|
41
|
+
Requires-Dist: multidict>=4.7.0
|
|
42
|
+
Requires-Dist: packaging
|
|
43
|
+
Requires-Dist: pout>=0.8.13
|
|
44
|
+
Requires-Dist: pygments>=2.0.0
|
|
45
|
+
Requires-Dist: PyYAML>=5.3.0
|
|
46
|
+
Requires-Dist: redis>=3.4.0
|
|
47
|
+
Requires-Dist: setuptools>=30.0.0
|
|
48
|
+
Requires-Dist: six>=1.10.0
|
|
49
|
+
Requires-Dist: termcolor>=1.1.0
|
|
50
|
+
Requires-Dist: toml>=0.10.0
|
|
51
|
+
Requires-Dist: wheel>=0.34.0
|
|
52
|
+
Requires-Dist: zict>=0.1.2
|
|
53
|
+
Requires-Dist: zipp>=2.0.0
|
|
54
|
+
Dynamic: author
|
|
55
|
+
Dynamic: author-email
|
|
56
|
+
Dynamic: classifier
|
|
57
|
+
Dynamic: description
|
|
58
|
+
Dynamic: description-content-type
|
|
59
|
+
Dynamic: download-url
|
|
60
|
+
Dynamic: home-page
|
|
61
|
+
Dynamic: keywords
|
|
62
|
+
Dynamic: license
|
|
63
|
+
Dynamic: license-file
|
|
64
|
+
Dynamic: platform
|
|
65
|
+
Dynamic: requires-dist
|
|
66
|
+
Dynamic: summary
|
|
32
67
|
|
|
33
68
|
CLU – Common Lightweight Utilities (née Command-Line Utilities)
|
|
34
69
|
==================================================
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.10.1'
|
|
@@ -9,8 +9,7 @@ import sys
|
|
|
9
9
|
abstract = abc.abstractmethod
|
|
10
10
|
|
|
11
11
|
from clu.constants.enums import System, SYSTEM
|
|
12
|
-
|
|
13
|
-
from clu.config.base import NamespacedMutableMapping
|
|
12
|
+
from clu.config.keymap import Nested
|
|
14
13
|
from clu.fs.appdirectories import AppDirs
|
|
15
14
|
from clu.fs.filesystem import TemporaryName, Directory
|
|
16
15
|
from clu.fs.misc import extension, filesize
|
|
@@ -138,7 +137,7 @@ class FileName(clu.abstract.AppName, metaclass=abc.ABCMeta):
|
|
|
138
137
|
return Directory(root_dir.realpath()).subpath(file_name)
|
|
139
138
|
|
|
140
139
|
@export
|
|
141
|
-
class FileBase(
|
|
140
|
+
class FileBase(Nested, FileName): # type: ignore
|
|
142
141
|
|
|
143
142
|
""" The FileBase abstract base class furnishes two methods:
|
|
144
143
|
|
|
@@ -71,11 +71,11 @@ class FrozenFlat(FrozenKeyMap, clu.abstract.ReprWrapper,
|
|
|
71
71
|
if updates:
|
|
72
72
|
self.dictionary.update(**updates)
|
|
73
73
|
|
|
74
|
-
def nestify(self, cls=None):
|
|
74
|
+
def nestify(self, cls=None, walker=flatwalk):
|
|
75
75
|
""" Articulate a flattened KeyMap instance out into one that is nested. """
|
|
76
76
|
if cls is None:
|
|
77
77
|
cls = FrozenNested
|
|
78
|
-
return cls(tree=articulate(self.dictionary, walker=
|
|
78
|
+
return cls(tree=articulate(self.dictionary, walker=walker))
|
|
79
79
|
|
|
80
80
|
def __iter__(self):
|
|
81
81
|
yield from self.dictionary
|
|
@@ -188,82 +188,14 @@ __all__, __dir__ = exporter.all_and_dir()
|
|
|
188
188
|
def test():
|
|
189
189
|
|
|
190
190
|
from clu.testing.utils import inline
|
|
191
|
-
from clu.config.keymap import Flat
|
|
191
|
+
from clu.config.keymap import Flat, Nested
|
|
192
|
+
from clu.config.keymap import nestedmaps, flatdict, arbitrary
|
|
192
193
|
from clu.fs.filesystem import which
|
|
193
194
|
from pprint import pprint
|
|
194
195
|
import os, re, textwrap
|
|
195
196
|
|
|
196
|
-
flat = Flat()
|
|
197
|
-
|
|
198
|
-
javaprop_re = re.compile(r"^(?P<name>[\w\.]+): “(?P<value>.*)”", re.IGNORECASE | re.MULTILINE)
|
|
199
|
-
java_source = textwrap.dedent("""
|
|
200
|
-
package ost.%s;
|
|
201
|
-
|
|
202
|
-
import java.util.Enumeration;
|
|
203
|
-
import java.util.Properties;
|
|
204
|
-
|
|
205
|
-
public class ShowJavaSystemProperties {
|
|
206
|
-
|
|
207
|
-
public static void main(String... args) {
|
|
208
|
-
Properties properties = System.getProperties();
|
|
209
|
-
Enumeration names = properties.propertyNames();
|
|
210
|
-
while (names.hasMoreElements()) {
|
|
211
|
-
String name = (String) names.nextElement();
|
|
212
|
-
String value = properties.getProperty(name);
|
|
213
|
-
System.out.println(name + ": “" + value + "”");
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
""" % exporter.dotpath)
|
|
219
|
-
|
|
220
|
-
@inline.precheck
|
|
221
|
-
def load_java_system_properties():
|
|
222
|
-
""" Load the Java JDK’s system properties """
|
|
223
|
-
from clu.fs.filesystem import back_tick, TemporaryName
|
|
224
|
-
from clu.naming import dotpath_to_prefix
|
|
225
|
-
|
|
226
|
-
with TemporaryName(prefix="show-java-system-properties-",
|
|
227
|
-
suffix="java",
|
|
228
|
-
randomized=True) as java_file:
|
|
229
|
-
java_file.write(java_source)
|
|
230
|
-
java_path = java_file.realpath()
|
|
231
|
-
output = back_tick(f"java {java_path}")
|
|
232
|
-
|
|
233
|
-
assert not java_file.exists
|
|
234
|
-
|
|
235
|
-
for line in output.splitlines():
|
|
236
|
-
match = javaprop_re.match(line)
|
|
237
|
-
if match:
|
|
238
|
-
# BEWARE: dotpath_to_prefix(…) does a casefold():
|
|
239
|
-
name = dotpath_to_prefix(match.group('name'),
|
|
240
|
-
sep=NAMESPACE_SEP, end='')
|
|
241
|
-
value = match.group('value')
|
|
242
|
-
flat[name] = value
|
|
243
|
-
|
|
244
|
-
pprint(flat)
|
|
245
|
-
|
|
246
|
-
@inline.precheck
|
|
247
|
-
def show_java_system_properties():
|
|
248
|
-
""" Show namespaced Java system properties """
|
|
249
|
-
count = flat.namespace_count()
|
|
250
|
-
plural = count == 1 and '' or 's'
|
|
251
|
-
|
|
252
|
-
print(f"* {count} namespace{plural} total:")
|
|
253
|
-
print()
|
|
254
|
-
|
|
255
|
-
for namespace in flat.namespaces():
|
|
256
|
-
namespaces = split_ns(namespace)
|
|
257
|
-
print(f"+ {namespace}:")
|
|
258
|
-
for nskey, value in flat.items(*namespaces):
|
|
259
|
-
bare_key = strip_ns(nskey)
|
|
260
|
-
key = nskey.replace(prefix_for(*namespaces), '', 1)
|
|
261
|
-
print(f" {key} : “{value}”")
|
|
262
|
-
assert key.endswith(bare_key)
|
|
263
|
-
print()
|
|
264
|
-
|
|
265
|
-
print("- «unprefixed»:")
|
|
266
|
-
pprint(flat.submap(unprefixed=True), indent=4)
|
|
197
|
+
flat = Flat(flatdict())
|
|
198
|
+
nested = Nested(nestedmaps())
|
|
267
199
|
|
|
268
200
|
@inline
|
|
269
201
|
def test_flat_validate_ns():
|
|
@@ -277,6 +209,18 @@ def test():
|
|
|
277
209
|
for namespace in flat.freeze().namespaces():
|
|
278
210
|
assert validate_ns(*split_ns(namespace))
|
|
279
211
|
|
|
212
|
+
@inline
|
|
213
|
+
def test_nested_validate_ns():
|
|
214
|
+
""" Validate a Nested keymap’s namespaces """
|
|
215
|
+
for namespace in nested.namespaces():
|
|
216
|
+
assert validate_ns(*split_ns(namespace))
|
|
217
|
+
|
|
218
|
+
@inline
|
|
219
|
+
def test_frozennested_validate_ns():
|
|
220
|
+
""" Validate a FrozenNested keymap’s namespaces """
|
|
221
|
+
for namespace in nested.freeze().namespaces():
|
|
222
|
+
assert validate_ns(*split_ns(namespace))
|
|
223
|
+
|
|
280
224
|
@inline
|
|
281
225
|
def test_validate_ns_errors():
|
|
282
226
|
""" Check “validate_ns(…)” error conditions """
|
|
@@ -290,9 +234,84 @@ def test():
|
|
|
290
234
|
except ValueError as exc:
|
|
291
235
|
assert "namespace contains separator" in str(exc)
|
|
292
236
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
237
|
+
namespaces = ('yo', 'dogg')
|
|
238
|
+
key = 'iheard'
|
|
239
|
+
nskey = "yo:dogg:iheard"
|
|
240
|
+
value = "you like this sort of thing"
|
|
241
|
+
|
|
242
|
+
@inline
|
|
243
|
+
def test_concatenate_ns():
|
|
244
|
+
assert concatenate_ns(*namespaces) == "yo:dogg"
|
|
245
|
+
|
|
246
|
+
@inline
|
|
247
|
+
def test_prefix_for():
|
|
248
|
+
assert prefix_for(*namespaces) == "yo:dogg:"
|
|
249
|
+
|
|
250
|
+
@inline
|
|
251
|
+
def test_strip_ns():
|
|
252
|
+
assert strip_ns(nskey) == "iheard"
|
|
253
|
+
|
|
254
|
+
@inline
|
|
255
|
+
def test_split_ns():
|
|
256
|
+
assert tuple(split_ns(nskey)) == ('yo', 'dogg', 'iheard')
|
|
257
|
+
assert split_ns(nskey) == ['yo', 'dogg', 'iheard']
|
|
258
|
+
|
|
259
|
+
@inline
|
|
260
|
+
def test_startswith_ns():
|
|
261
|
+
assert startswith_ns(namespaces, ('yo', 'dogg'))
|
|
262
|
+
|
|
263
|
+
@inline
|
|
264
|
+
def test_unpack_ns():
|
|
265
|
+
assert unpack_ns(nskey) == (key, list(namespaces))
|
|
266
|
+
assert unpack_ns(nskey) == ('iheard', ['yo', 'dogg'])
|
|
267
|
+
|
|
268
|
+
@inline
|
|
269
|
+
def test_pack_ns():
|
|
270
|
+
assert pack_ns(key, *namespaces) == nskey
|
|
271
|
+
assert pack_ns(key, *namespaces) == "yo:dogg:iheard"
|
|
272
|
+
|
|
273
|
+
@inline
|
|
274
|
+
def test_get_ns():
|
|
275
|
+
assert get_ns(nskey) == "yo:dogg"
|
|
276
|
+
|
|
277
|
+
@inline
|
|
278
|
+
def test_get_ns_and_key():
|
|
279
|
+
assert get_ns_and_key(nskey) == ("yo:dogg", 'iheard')
|
|
280
|
+
|
|
281
|
+
@inline
|
|
282
|
+
def test_compare_ns():
|
|
283
|
+
assert compare_ns(namespaces, ('yo', 'dogg'))
|
|
284
|
+
|
|
285
|
+
appname = 'testing'
|
|
286
|
+
envkey = "TESTING_YO_DOGG_IHEARD"
|
|
287
|
+
|
|
288
|
+
@inline
|
|
289
|
+
def test_concatenate_env():
|
|
290
|
+
assert concatenate_env(*namespaces) == "YO_DOGG"
|
|
291
|
+
assert concatenate_env(*chain(tuplize(appname), namespaces)) == "TESTING_YO_DOGG"
|
|
292
|
+
assert concatenate_env(*chain(tuplize(appname), namespaces, tuplize(key))) == "TESTING_YO_DOGG_IHEARD"
|
|
293
|
+
|
|
294
|
+
@inline
|
|
295
|
+
def test_prefix_env():
|
|
296
|
+
assert prefix_env(appname, *namespaces) == "TESTING_YO_DOGG_"
|
|
297
|
+
|
|
298
|
+
@inline
|
|
299
|
+
def test_pack_env():
|
|
300
|
+
assert pack_env(appname, key, *namespaces) == "TESTING_YO_DOGG_IHEARD"
|
|
301
|
+
|
|
302
|
+
@inline
|
|
303
|
+
def test_unpack_env():
|
|
304
|
+
assert unpack_env(envkey) == (appname, key, list(namespaces))
|
|
305
|
+
assert unpack_env(envkey) == ('testing', 'iheard', ['yo', 'dogg'])
|
|
306
|
+
|
|
307
|
+
@inline
|
|
308
|
+
def test_nskey_from_env():
|
|
309
|
+
assert nskey_from_env(envkey) == (appname, pack_ns(key, *namespaces))
|
|
310
|
+
assert nskey_from_env(envkey) == ('testing', "yo:dogg:iheard")
|
|
311
|
+
|
|
312
|
+
@inline
|
|
313
|
+
def test_nskey_to_env():
|
|
314
|
+
assert nskey_to_env(appname, nskey) == "TESTING_YO_DOGG_IHEARD"
|
|
296
315
|
|
|
297
316
|
return inline.test(100)
|
|
298
317
|
|
|
@@ -162,7 +162,7 @@ def test():
|
|
|
162
162
|
|
|
163
163
|
from clu.testing.utils import inline
|
|
164
164
|
from clu.config.ns import unpack_ns
|
|
165
|
-
from clu.config.keymap import FrozenFlat, Flat
|
|
165
|
+
from clu.config.keymap import FrozenFlat, Flat, Nested
|
|
166
166
|
from clu.config.keymap import nestedmaps, flatdict
|
|
167
167
|
from pprint import pprint
|
|
168
168
|
|
|
@@ -311,19 +311,19 @@ def test():
|
|
|
311
311
|
return test_fn
|
|
312
312
|
|
|
313
313
|
# Add inline test functions using the metafunction test generators:
|
|
314
|
-
inline.add_function(test_one_fn(FrozenFlat, KeyMapView, flatdict), '
|
|
315
|
-
inline.add_function(test_two_fn(FrozenFlat, KeyMapView, flatdict), '
|
|
316
|
-
inline.add_function(test_one_fn(Flat, KeyMapView, flatdict), '
|
|
317
|
-
inline.add_function(test_one_fn(Flat, KeyMapProxy, flatdict), '
|
|
314
|
+
inline.add_function(test_one_fn(FrozenFlat, KeyMapView, flatdict), 'test_one_frozenflat_keymapview')
|
|
315
|
+
inline.add_function(test_two_fn(FrozenFlat, KeyMapView, flatdict), 'test_two_frozenflat_keymapview')
|
|
316
|
+
inline.add_function(test_one_fn(Flat, KeyMapView, flatdict), 'test_one_flat_keymapview')
|
|
317
|
+
inline.add_function(test_one_fn(Flat, KeyMapProxy, flatdict), 'test_one_flat_keymapproxy')
|
|
318
318
|
inline.add_function(test_two_fn(Flat, KeyMapProxy, flatdict,
|
|
319
|
-
KeyMapView), '
|
|
319
|
+
KeyMapView), 'test_two_flat_keymapproxy')
|
|
320
320
|
|
|
321
321
|
# N.B. These two take FUCKING FOREVER to run:
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
inline.add_function(test_one_fn(Nested, KeyMapView, nestedmaps), 'test_one_nested_keymapview')
|
|
323
|
+
inline.add_function(test_one_fn(Nested, KeyMapProxy, nestedmaps), 'test_one_nested_keymapproxy')
|
|
324
324
|
|
|
325
325
|
@inline
|
|
326
|
-
def
|
|
326
|
+
def test_view_proxy_exceptions():
|
|
327
327
|
""" View/Proxy error conditions """
|
|
328
328
|
try:
|
|
329
329
|
KeyMapView(None)
|
|
@@ -555,7 +555,7 @@ class ExporterBase(collections.abc.MutableMapping,
|
|
|
555
555
|
path = self.datafile()
|
|
556
556
|
|
|
557
557
|
# Yield out a proper shelving database instance:
|
|
558
|
-
with shelve.open(os.fspath(path), writeback=True) as shelving:
|
|
558
|
+
with contextlib.closing(shelve.open(os.fspath(path), writeback=True)) as shelving:
|
|
559
559
|
yield shelving
|
|
560
560
|
|
|
561
561
|
def exports(self):
|
|
@@ -12,8 +12,8 @@ import zict # type: ignore
|
|
|
12
12
|
|
|
13
13
|
iterchain = chain.from_iterable
|
|
14
14
|
|
|
15
|
-
from clu.constants.consts import CPYTHON, pytuple
|
|
16
|
-
from clu.predicates import typeof, tuplize, attr
|
|
15
|
+
from clu.constants.consts import CPYTHON, QUALIFIER, pytuple
|
|
16
|
+
from clu.predicates import typeof, tuplize, attr, pyattr
|
|
17
17
|
from clu.exporting import Exporter
|
|
18
18
|
|
|
19
19
|
exporter = Exporter(path=__file__)
|
|
@@ -148,15 +148,12 @@ class DoubleDutchRegistry(clu.abstract.ReprWrapper,
|
|
|
148
148
|
|
|
149
149
|
def funcname(self, key):
|
|
150
150
|
function = self.cache[key]
|
|
151
|
-
name =
|
|
152
|
-
signature = inspect.signature(function)
|
|
151
|
+
name = pyattr(function, 'name', 'qualname')
|
|
152
|
+
signature = str(inspect.signature(function)).strip('[]').split(QUALIFIER)[0]
|
|
153
153
|
return f"{name!s}{signature!s}"
|
|
154
154
|
|
|
155
155
|
def inner_repr(self):
|
|
156
|
-
from pprint import pformat
|
|
157
156
|
most = max(len(self.keyname(key)) for key in self)
|
|
158
|
-
# cacheout = { self.keyname(key) : self.cache[key] for key in self }
|
|
159
|
-
# return "\n%s" % pformat(cacheout, indent=4)
|
|
160
157
|
out = ""
|
|
161
158
|
for key in self:
|
|
162
159
|
out += " %s : %s \n" % (self.keyname(key).ljust(most),
|
|
@@ -260,25 +257,24 @@ __all__, __dir__ = exporter.all_and_dir()
|
|
|
260
257
|
|
|
261
258
|
def test():
|
|
262
259
|
|
|
263
|
-
from clu.config.abc import FlatOrderedSet as FOSet
|
|
264
|
-
from clu.config.base import NamespacedMutableMapping as NaMutMap
|
|
260
|
+
from clu.config.abc import KeyMap, FlatOrderedSet as FOSet
|
|
265
261
|
from clu.testing.utils import pout, inline
|
|
266
262
|
|
|
267
263
|
@inline
|
|
268
|
-
def
|
|
264
|
+
def test_pairs_and_products():
|
|
269
265
|
pair = []
|
|
270
266
|
product = []
|
|
271
267
|
|
|
272
|
-
for
|
|
273
|
-
pair.append(tuple(str(
|
|
268
|
+
for mro_tuple in ω(FOSet, KeyMap):
|
|
269
|
+
pair.append(tuple(str(element) for element in mro_tuple))
|
|
274
270
|
|
|
275
|
-
for
|
|
276
|
-
product.append(tuple(str(
|
|
271
|
+
for mro_tuple in dot_product(FOSet.__mro__, KeyMap.__mro__):
|
|
272
|
+
product.append(tuple(str(element) for element in mro_tuple))
|
|
277
273
|
|
|
278
274
|
# pout.v(pair[:10], product[:10])
|
|
279
275
|
|
|
280
|
-
sorter = lambda
|
|
281
|
-
retros = lambda
|
|
276
|
+
sorter = lambda two_tuple: ''.join(iterchain(two_tuple))
|
|
277
|
+
retros = lambda two_tuple: ''.join(reversed(list(iterchain(two_tuple))))
|
|
282
278
|
|
|
283
279
|
assert sorted(pair, key=sorter) == sorted(product, key=sorter)
|
|
284
280
|
assert sorted(pair, key=retros) == sorted(product, key=retros)
|
|
@@ -286,9 +282,9 @@ def test():
|
|
|
286
282
|
assert pair == product
|
|
287
283
|
|
|
288
284
|
@inline
|
|
289
|
-
def
|
|
290
|
-
pairs = list(ω(FOSet,
|
|
291
|
-
products = list(dot_product(FOSet.mro(),
|
|
285
|
+
def test_pair_mro():
|
|
286
|
+
pairs = list(ω(FOSet, KeyMap))
|
|
287
|
+
products = list(dot_product(FOSet.mro(), KeyMap.mro()))
|
|
292
288
|
|
|
293
289
|
print()
|
|
294
290
|
print("PAIRS »", len(pairs))
|
|
@@ -297,14 +293,14 @@ def test():
|
|
|
297
293
|
assert set(pairs) == set(products) # REALLY.
|
|
298
294
|
|
|
299
295
|
@inline
|
|
300
|
-
def
|
|
296
|
+
def test_extend_pairtype():
|
|
301
297
|
|
|
302
298
|
class __extend__(ΩΩ(int, int)): # type: ignore
|
|
303
299
|
|
|
304
300
|
__name__ = "Coordinate"
|
|
305
301
|
|
|
306
|
-
def ratio(
|
|
307
|
-
x, y =
|
|
302
|
+
def ratio(point_tuple):
|
|
303
|
+
x, y = point_tuple
|
|
308
304
|
return x / y
|
|
309
305
|
|
|
310
306
|
assert Ω(2, 3).ratio() == 2 / 3
|
|
@@ -313,14 +309,14 @@ def test():
|
|
|
313
309
|
|
|
314
310
|
__name__ = "NamespacedKey"
|
|
315
311
|
|
|
316
|
-
def pack(
|
|
317
|
-
ns, key =
|
|
312
|
+
def pack(two_tuple):
|
|
313
|
+
ns, key = two_tuple
|
|
318
314
|
return f"{ns}:{key}"
|
|
319
315
|
|
|
320
316
|
assert Ω('yo', 'dogg').pack() == "yo:dogg"
|
|
321
317
|
|
|
322
318
|
@inline
|
|
323
|
-
def
|
|
319
|
+
def test_doubledutch_function():
|
|
324
320
|
|
|
325
321
|
@doubledutch
|
|
326
322
|
def yodogg(x, y):
|
|
@@ -334,6 +330,8 @@ def test():
|
|
|
334
330
|
def yodogg(x, y): # pragma: no cover
|
|
335
331
|
return f"WAT: {x}, {y}"
|
|
336
332
|
|
|
333
|
+
assert yodogg('yo', 'dogg').startswith("WAT")
|
|
334
|
+
|
|
337
335
|
assert yodogg.remove(str)
|
|
338
336
|
assert not yodogg.remove(complex)
|
|
339
337
|
|
|
@@ -345,12 +343,14 @@ def test():
|
|
|
345
343
|
def yodogg(x: float, y: float):
|
|
346
344
|
return f"FLTS: {x}, {y}"
|
|
347
345
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
346
|
+
default_return = yodogg(object(), object())
|
|
347
|
+
assert default_return is None
|
|
348
|
+
assert yodogg(10, 20).startswith("INTS")
|
|
349
|
+
assert yodogg('yo', 'dogg').startswith("STRS")
|
|
350
|
+
assert yodogg(3.14, 2.78).startswith("FLTS")
|
|
352
351
|
|
|
353
352
|
print()
|
|
353
|
+
|
|
354
354
|
regcount = len(yodogg.registry)
|
|
355
355
|
print(f"REGISTRY ({regcount} items) »", repr(yodogg.registry))
|
|
356
356
|
|
|
@@ -676,12 +676,11 @@ class Directory(BaseFSName,
|
|
|
676
676
|
Specify an optional “suffix” parameter to filter the list by a
|
|
677
677
|
particular file suffix (leading dots unnecessary but unharmful).
|
|
678
678
|
"""
|
|
679
|
-
if
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
(direntry.name for direntry in iterscan))))
|
|
679
|
+
if self.exists:
|
|
680
|
+
with os.scandir(self.realpath(source)) as iterscan:
|
|
681
|
+
yield from filter(suffix_searcher(suffix),
|
|
682
|
+
filter(non_dotfile_matcher,
|
|
683
|
+
(direntry.name for direntry in iterscan)))
|
|
685
684
|
|
|
686
685
|
def ls_la(self, suffix=None, source=None):
|
|
687
686
|
""" List all files, including files whose name starts with a dot.
|
|
@@ -697,11 +696,10 @@ class Directory(BaseFSName,
|
|
|
697
696
|
commands I ever learned, and it reads better than `ls_a()` which
|
|
698
697
|
I think looks awkward and goofy.)
|
|
699
698
|
"""
|
|
700
|
-
if
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
(direntry.name for direntry in iterscan)))
|
|
699
|
+
if self.exists:
|
|
700
|
+
with os.scandir(self.realpath(source)) as iterscan:
|
|
701
|
+
yield from filter(suffix_searcher(suffix),
|
|
702
|
+
(direntry.name for direntry in iterscan))
|
|
705
703
|
|
|
706
704
|
def subpath(self, subpath, source=None, requisite=False):
|
|
707
705
|
""" Returns the path to a subpath of the instances’ target path. """
|
|
@@ -731,13 +729,12 @@ class Directory(BaseFSName,
|
|
|
731
729
|
Specify an optional “pattern” parameter to filter the list
|
|
732
730
|
by a particular regex pattern, as applied to directory names.
|
|
733
731
|
"""
|
|
734
|
-
if
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
if direntry.is_dir()))))
|
|
732
|
+
if self.exists:
|
|
733
|
+
with os.scandir(self.realpath(source)) as iterscan:
|
|
734
|
+
yield from map(lambda dirname: self.directory(dirname),
|
|
735
|
+
filter(re_searcher(pattern),
|
|
736
|
+
(direntry.name for direntry in iterscan \
|
|
737
|
+
if direntry.is_dir())))
|
|
741
738
|
|
|
742
739
|
def makedirs(self, subpath=None, mode=0o755):
|
|
743
740
|
""" Creates any parts of the target directory path that don’t
|
|
@@ -943,7 +940,7 @@ class Directory(BaseFSName,
|
|
|
943
940
|
dotpaths.update(path_to_dotpath(os.path.join(root, filename),
|
|
944
941
|
relative_to=self.name)
|
|
945
942
|
for filename in filenames)
|
|
946
|
-
|
|
943
|
+
yield from sorted(dotpaths)
|
|
947
944
|
|
|
948
945
|
def suffix_histogram(self, subdir=None,
|
|
949
946
|
source=None,
|
|
@@ -13,6 +13,7 @@ import abc
|
|
|
13
13
|
import collections.abc
|
|
14
14
|
import clu.abstract
|
|
15
15
|
import clu.dicts
|
|
16
|
+
import copy
|
|
16
17
|
import importlib
|
|
17
18
|
import importlib.abc
|
|
18
19
|
import importlib.machinery
|
|
@@ -288,8 +289,8 @@ class ArgumentSink(collections.abc.Callable,
|
|
|
288
289
|
and/or keyword arguments
|
|
289
290
|
"""
|
|
290
291
|
instance = super().__new__(cls)
|
|
291
|
-
instance.args = args
|
|
292
|
-
instance.kwargs = kwargs
|
|
292
|
+
instance.args = copy.deepcopy(args)
|
|
293
|
+
instance.kwargs = copy.deepcopy(kwargs)
|
|
293
294
|
return instance
|
|
294
295
|
|
|
295
296
|
def __call__(self, function):
|
|
@@ -58,7 +58,7 @@ class CLUInterface(AppDirs):
|
|
|
58
58
|
self.migrate_from_previous()
|
|
59
59
|
|
|
60
60
|
# Configure zicts for key-value I/O:
|
|
61
|
-
self.zfile = zict.File(str(self.datadir)
|
|
61
|
+
self.zfile = zict.File(str(self.datadir))
|
|
62
62
|
self.zutf8 = zict.Func(dump=attr(plistlib, 'dumps', 'writePlistToString'),
|
|
63
63
|
load=attr(plistlib, 'loads', 'readPlistFromString'),
|
|
64
64
|
d=self.zfile)
|
|
@@ -125,15 +125,15 @@ class CLUInterface(AppDirs):
|
|
|
125
125
|
|
|
126
126
|
def keys(self):
|
|
127
127
|
""" Return an iterable with all of the keys in this key-value store. """
|
|
128
|
-
|
|
128
|
+
yield from self.zfunc.keys()
|
|
129
129
|
|
|
130
130
|
def values(self):
|
|
131
131
|
""" Return an iterable with all of the values in this key-value store. """
|
|
132
|
-
|
|
132
|
+
yield from self.zfunc.values()
|
|
133
133
|
|
|
134
134
|
def items(self):
|
|
135
135
|
""" Return an iterable yielding (key, value) for all items in this key-value store. """
|
|
136
|
-
|
|
136
|
+
yield from self.zfunc.items()
|
|
137
137
|
|
|
138
138
|
def as_dict(self):
|
|
139
139
|
""" Return a plain dict with the key-value stores’ contents. """
|
|
@@ -245,17 +245,17 @@ def update(dictish=NoDefault, **updates):
|
|
|
245
245
|
@export
|
|
246
246
|
def keys():
|
|
247
247
|
""" Return an iterable with all of the keys in the key-value store. """
|
|
248
|
-
|
|
248
|
+
yield from interface.keys()
|
|
249
249
|
|
|
250
250
|
@export
|
|
251
251
|
def values():
|
|
252
252
|
""" Return an iterable with all of the values in the key-value store. """
|
|
253
|
-
|
|
253
|
+
yield from interface.values()
|
|
254
254
|
|
|
255
255
|
@export
|
|
256
256
|
def items():
|
|
257
257
|
""" Return an iterable yielding (key, value) for all items in the key-value store. """
|
|
258
|
-
|
|
258
|
+
yield from interface.items()
|
|
259
259
|
|
|
260
260
|
# NO DOCS ALLOWED:
|
|
261
261
|
export(interface, name='interface')
|