refresh

This is an enc plumbing command.

Uses generate-config underneath.

Automatically Refresh/regenerate an enc repo’s important directive files. This is required because director files are mostly made and edited to facilitate ease of human interaction. enc generate-config generates directive files which are easily read and processed by other enc commands. As there may be several director files so enc refresh command is provided for the ease of user. Supported Director-directive files are:

Director File

Directive File

.enc/config

.enc/.config

Files are picked-up for refreshing if the directive file is older than the director file or if force mode is enabled.

Note: Must be run from working-tree/process-stage repo root.

usage: enc refresh [-h] [-v | -q] [-f] [{.enc/config} ...]

Positional Arguments

director_files

Possible choices: .enc/config

Optional parameter. The value for this parameter is director files whose directive files need to be refreshed. This parameter can be supplied 0 or multiple times. All the supplied files must be within supported director files.. All the directive files are refreshed if this option is absent.

Named Arguments

-v, --verbose
Specify verbosity level as -v, -vv or -vvv.

By default the VCS (Git) or OS call command logs are always displayed. For more fine grain tuning on the verbosity of logs use: -v to show INFO logs additionally. -vv to show INFO and DEBUG logs additionally. -vvv to show INFO, DEBUG and TRACE logs, this level also enables exception tracebacks.

-q, --quiet
Quiet logs as -q, -qq or -qqq.

By default the VCS (Git) or OS call command logs are always displayed. For more fine grain tuning on quietness of logs use: -q to Disable VCS (git) or OS call command logs and WARNINGS; ERROR and FATAL will still show. -qq to Additionally disable ERRORS; FATAL logs will still show. -qqq to Disable full logging.

-f, --force

start processing in force mode.

Default: False

Examples

All commands are run in a working-tree repo root initialised by:

enc init {non_existing_process_stage} -k {key_file} -qq

1) Normal run

Run command on repo root to refresh all the directive files.

enc refresh
# Run from repo root
StrictCLITest(command).run()

2) Refresh certain directive file

Refresh only certain directive file in case enc refresh supports many director files.

enc refresh .enc/config
StrictCLITest(command).run()

3) Refresh certain multiple directive files

Multiple director files can be specified if only the corresponding directive files need to be refreshed.

enc refresh .enc/config .enc/config .enc/config
StrictCLITest(command).run()

4) Force mode enables processing always

Usually directive files are picked-up for processing if it is older than the director file. To refresh all directive files even when they’re newer than the director files use -f or --force option.

enc refresh -f
StrictCLITest(command).run()

5) Force mode enables processing for certain director files

Usually directive files are picked-up for processing if it is older than the director file. To refresh certain directive files even when they’re newer than the director files use -f or --force option.

enc refresh .enc/config .enc/config -f
StrictCLITest(command).run()

Command text in {} such as {non_existing_process_stage} and {key_file} are test fixtures. Check them out at ../_static/enc-cli-help.md.