Package: rolling-pin
IntroductionRolling-pin is a library of generic tools for ETL work and visualization of JSON
blobs and python repositoriesSeedocumentationfor details.On the documentation main page, under theArchitecturesection, is a
dynamically generated dependency graph of rolling-pin's current architecture.
It is generated using the RepoETL class.If you look under theMetricssection you will find Radon code metric plots
and data of the rolling-pin source code, generated by the RadonETL class.Also have a look at thisJupyter notebook demofor a taste of what rolling-pin can do.InstallationPythonpip install rolling-pinDockerInstalldocker-desktopdocker pull thenewflesh/rolling-pin:latestDocker For DevelopersInstalldocker-desktopEnsure docker-desktop has at least 4 GB of memory allocated to it.git clone git@github.com:theNewFlesh/rolling-pin.gitcd rolling-pinchmod +x bin/rolling-pinbin/rolling-pin docker-startThe service should take a few minutes to start up.Runbin/rolling-pin --helpfor more help on the command line tool.Production CLIRolling-pin comes with a command line interface defined in command.py.Its usage pattern is:rolling-pin COMMAND [ARGS] [FLAGS] [-h --help]Commandsbash-completionPrints BASH completion code to be written to a _rolling-pin completion fileUsage:rolling-pin bash-completionzsh-completionPrints ZSH completion code to be written to a _rolling-pin completion fileUsage:rolling-pin zsh-completionconformCopies source files to target filepaths according to given conform file.Usage:rolling-pin conform [OPTIONS] SOURCEArgumentDescriptionsourceconform YAML filepathFlagArgumentDescriptionDefault--groupstextcomma separated list of groups to be conformedall--dryrun-Print out conform table instead of run conform---help-print help message-graphGenerate a dependency graph of a source repository and write it to a given filepathUsage:rolling-pin graph [OPTIONS] SOURCE TARGETArgumentDescriptionsourcerepository pathtargettarget filepathFlagArgumentDescriptionDefault--includetextinclude files that match this regex pattern.*.py$'--excludetextexclude files that match this regex patterntest--orienttextgraph orientationlr--help-print help message-plotWrite radon metrics plots of given repository to given filepath.Usage:rolling-pin plot [OPTIONS] SOURCE TARGETArgumentDescriptionsourcerepository pathtargetplot filepathFlagDescription--helpprint help messagetableWrite radon metrics tables of given repository to given directory.Usage:rolling-pin table [OPTIONS] SOURCE TARGETArgumentDescriptionsourcerepository pathtargettable directoryFlagDescription--helpprint help messagetomlGenerate a copy of a given TOML file with given edits indicated by flags. Flags
are evalauted in the following order: edit, delete, search. Flags may be
arbitrarily combined. Edit and delete flags may appear multiple times.Usage:rolling-pin toml [OPTIONS] SOURCEArgumentDescriptionsourceTOML filepathFlagArgumentDescription--edittextreplace key's value with given value, text is "=" separated key value pair in TOML format--deletetextdelete keys that match this regular expression--searchtextsearch for keys that match this regular expression--targettexttarget filepath to write to--help-print help messageExample Usageexample file>>>cat example.toml
[root]
a = 1
b = 2

[root.foo.bar]
x = "y"

[world]
hello = trueedit flag>>>rolling-pin toml foobar.toml --edit 'root.a=999'
[root]
a = 999
b = 2...

>>>rolling-pin toml foobar.toml \
        --edit 'root.a=[1, 2]'   \
        --edit 'root.b="xxx"'
[root]
a = [
    1,
    2,
]
b = "xxx"...

>>>rolling-pin toml foobar.toml --edit 'root.foo.bar="baz"'
...
hello = true

[root.foo]
bar = "baz"...delete flag>>>rolling-pin toml foobar.toml \
        --delete 'root.foo.bar'  \
        --delete 'root.a'
[root]
b = 2

[world]
hello = truesearch flag>>>rolling-pin toml foobar.toml --search 'root.foo|world'
[world]
hello = true

[root.foo.bar]
x = "y"Development CLIbin/rolling-pin is a command line interface (defined in cli.py) that works with
any version of python 2.7 and above, as it has no dependencies.Its usage pattern is:bin/rolling-pin COMMAND [-a --args]=ARGS [-h --help] [--dryrun]CommandsCommandDescriptionbuild-packageBuild production version of repo for publishingbuild-prodPublish pip package of repo to PyPibuild-publishRun production tests first then publish pip package of repo to PyPibuild-testBuild test version of repo for prod testingdocker-buildBuild image of rolling-pindocker-build-prodBuild production image of rolling-pindocker-containerDisplay the Docker container id of rolling-pindocker-destroyShutdown rolling-pin container and destroy its imagedocker-destroy-prodShutdown rolling-pin production container and destroy its imagedocker-imageDisplay the Docker image id of rolling-pindocker-prodStart rolling-pin production containerdocker-pushPush rolling-pin production image to Dockerhubdocker-removeRemove rolling-pin Docker imagedocker-restartRestart rolling-pin containerdocker-startStart rolling-pin containerdocker-stopStop rolling-pin containerdocsGenerate sphinx documentationdocs-architectureGenerate architecture.svg diagram from all import statementsdocs-fullGenerate documentation, coverage report, diagram and codedocs-metricsGenerate code metrics report, plots and tableslibrary-addAdd a given package to a given dependency grouplibrary-graph-devGraph dependencies in dev environmentlibrary-graph-prodGraph dependencies in prod environmentlibrary-install-devInstall all dependencies into dev environmentlibrary-install-prodInstall all dependencies into prod environmentlibrary-list-devList packages in dev environmentlibrary-list-prodList packages in prod environmentlibrary-lock-devResolve dev.lock filelibrary-lock-prodResolve prod.lock filelibrary-removeRemove a given package from a given dependency grouplibrary-searchSearch for pip packageslibrary-sync-devSync dev environment with packages listed in dev.locklibrary-sync-prodSync prod environment with packages listed in prod.locklibrary-updateUpdate dev dependencieslibrary-update-pdmUpdate PDMsession-labRun jupyter lab serversession-pythonRun python session with dev dependenciesstateState of rolling-pintest-coverageGenerate test coverage reporttest-devRun all teststest-fastTest all code excepts tests marked with SKIP_SLOWS_TESTS decoratortest-lintRun linting and type checkingtest-prodRun tests across all support python versionsversionFull resolution of repo: dependencies, linting, tests, docs, etcversion-bump-majorBump pyproject major versionversion-bump-minorBump pyproject minor versionversion-bump-patchBump pyproject patch versionzshRun ZSH session inside rolling-pin containerzsh-completeGenerate oh-my-zsh completionszsh-rootRun ZSH session as root inside rolling-pin containerFlagsShortLongDescription-a--argsAdditional arguments, this can generally be ignored-h--helpPrints command help message to stdout---dryrunPrints command that would otherwise be run to stdout