Package: f8s
IntroductionFramework for building K8s-ready Flask applications.Seedocumentationfor details.InstallationPythonpip install f8sDockerInstalldocker-desktopdocker pull theNewFlesh/f8s:[version]Docker For DevelopersInstalldocker-desktopEnsure docker-desktop has at least 4 GB of memory allocated to it.git clone git@github.com:theNewFlesh/f8s.gitcd f8schmod +x bin/f8sbin/f8s docker-startThe service should take a few minutes to start up.Runbin/f8s --helpfor more help on the command line tool.ZSH Setupbin/f8smust be run from this repository's top level directory.Therefore, if using zsh, it is recommended that you paste the following line
in your ~/.zshrc file:alias f8s="cd [parent dir]/f8s; bin/f8s"Replace[parent dir]with the parent directory of this repositoryRunning thezsh-completecommand will enable tab completions of the cli
commands, in the next shell session.For example:f8s [tab]will show you all the cli options, which you can press
tab to cycle throughf8s docker-[tab]will show you only the cli options that begin with
"docker-"Quickstart GuideThis repository contains a suite commands for the whole development process.
This includes everything from testing, to documentation generation and
publishing pip packages.These commands can be accessed through:The VSCode task runnerThe VSCode task runner side barA terminal running on the host OSA terminal within this repositories docker containerRunning thezsh-completecommand will enable tab completions of the CLI.
See the zsh setup section for more information.Command GroupsDevelopment commands are grouped by one of 10 prefixes:CommandDescriptionbuildCommands for building packages for testing and pip publishingdockerCommon docker commands such as build, start and stopdocsCommands for generating documentation and code metricslibraryCommands for managing python package dependenciessessionCommands for starting interactive sessions such as jupyter lab and pythonstateCommand to display the current state of the repo and containertestCommands for running tests, linter and type annotationsversionCommands for bumping project versionsquickstartDisplay this quickstart guidezshCommands for running a zsh session in the container and generating zsh completionsCommon CommandsHere are some frequently used commands to get you started:CommandDescriptiondocker-restartRestart containerdocker-startStart containerdocker-stopStop containerdocs-fullGenerate documentation, coverage report, diagram and codelibrary-addAdd a given package to a given dependency grouplibrary-graph-devGraph dependencies in dev environmentlibrary-removeRemove a given package from a given dependency grouplibrary-searchSearch for pip packageslibrary-updateUpdate dev dependenciessession-labRun jupyter lab serverstateState oftest-devRun all teststest-lintRun linting and type checkingzshRun ZSH session inside containerzsh-completeGenerate ZSH completion scriptDevelopment CLIbin/f8s 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.
Commands generally do not expect any arguments or flags.Its usage pattern is:bin/f8s COMMAND [-a --args]=ARGS [-h --help] [--dryrun]CommandsThe following is a complete list of all available development commands:CommandDescriptionbuild-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 Docker imagedocker-build-from-cacheBuild Docker image from cached imagedocker-build-prodBuild production imagedocker-containerDisplay the Docker container iddocker-destroyShutdown container and destroy its imagedocker-destroy-prodShutdown production container and destroy its imagedocker-imageDisplay the Docker image iddocker-prodStart production containerdocker-pull-devPull development image from Docker registrydocker-pull-prodPull production image from Docker registrydocker-push-devPush development image to Docker registrydocker-push-dev-latestPush development image to Docker registry with dev-latest tagdocker-push-prodPush production image to Docker registrydocker-push-prod-latestPush production image to Docker registry with prod-latest tagdocker-removeRemove Docker imagedocker-restartRestart Docker containerdocker-startStart Docker containerdocker-stopStop Docker 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 PDMquickstartDisplay quickstart guidesession-labRun jupyter lab serversession-pythonRun python session with dev dependenciessession-serverRunn application server inside Docker containerstateState of repository and Docker containertest-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 versionversion-commitTag with version and commit changes to masterzshRun ZSH session inside Docker containerzsh-completeGenerate oh-my-zsh completionszsh-rootRun ZSH session as root inside Docker containerFlagsShortLongDescription-a--argsAdditional arguments, this can generally be ignored-h--helpPrints command help message to stdout--dryrunPrints command that would otherwise be run to stdoutProduction CLIf8s comes with a command line interface defined in command.py.Its usage pattern is:f8s COMMAND [ARGS] [FLAGS] [-h --help]Commandsbash-completionPrints BASH completion code to be written to a _f8s completion fileUsage:f8s bash-completionzsh-completionPrints ZSH completion code to be written to a _f8s completion fileUsage:f8s zsh-completion