From 8297cf976e7cc1a9ab761eb285cb3c8bd65ddee7 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 5 Jul 2022 19:53:40 +0200 Subject: [PATCH] docs(build): Update example files --- python-naive/README.md | 2 +- .../examples/config.ini.example | 4 ++-- .../requirements.in | 0 .../requirements.txt | 0 .../update-firewall-source.py} | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) rename python-naive/examples/{rich-and-config => update-firewall-source}/examples/config.ini.example (80%) rename python-naive/examples/{rich-and-config => update-firewall-source}/requirements.in (100%) rename python-naive/examples/{rich-and-config => update-firewall-source}/requirements.txt (100%) rename python-naive/examples/{rich-and-config/rich-and-config.py => update-firewall-source/update-firewall-source.py} (98%) diff --git a/python-naive/README.md b/python-naive/README.md index ae0ee2a..d63243b 100644 --- a/python-naive/README.md +++ b/python-naive/README.md @@ -62,4 +62,4 @@ Above example of a Python project with all of Rich, `configparser` and `inflect` ├── requirements.txt └── update-firewall-source.py ``` -You can see real-life example file content over at [examples/rich-and-config](examples/rich-and-config). Cookiecutter has generated all necessary dependencies with pinned versions and a `update-firewall-source.py` script file to get you started. +You can see real-life example file content over at [examples/update-firewall-source](examples/update-firewall-source). Cookiecutter has generated all necessary dependencies with pinned versions and a `update-firewall-source.py` script file to get you started. diff --git a/python-naive/examples/rich-and-config/examples/config.ini.example b/python-naive/examples/update-firewall-source/examples/config.ini.example similarity index 80% rename from python-naive/examples/rich-and-config/examples/config.ini.example rename to python-naive/examples/update-firewall-source/examples/config.ini.example index 9ed14a3..d8fe1fe 100644 --- a/python-naive/examples/rich-and-config/examples/config.ini.example +++ b/python-naive/examples/update-firewall-source/examples/config.ini.example @@ -1,12 +1,12 @@ [DEFAULT] -self_name = rich-and-config +self_name = update-firewall-source tmp_base_dir = /tmp/%(self_name)s state_base_dir = /var/lib/%(self_name)s state_files_dir = %(state_base_dir)s/state state_file_retention = 50 state_file_name_prefix = state- state_file_name_suffix = .log -rich_and_config_some_option = "http://localhost:8000/api/query" +update_firewall_source_some_option = "http://localhost:8000/api/query" another_option = "first" [this-is-a-section] diff --git a/python-naive/examples/rich-and-config/requirements.in b/python-naive/examples/update-firewall-source/requirements.in similarity index 100% rename from python-naive/examples/rich-and-config/requirements.in rename to python-naive/examples/update-firewall-source/requirements.in diff --git a/python-naive/examples/rich-and-config/requirements.txt b/python-naive/examples/update-firewall-source/requirements.txt similarity index 100% rename from python-naive/examples/rich-and-config/requirements.txt rename to python-naive/examples/update-firewall-source/requirements.txt diff --git a/python-naive/examples/rich-and-config/rich-and-config.py b/python-naive/examples/update-firewall-source/update-firewall-source.py similarity index 98% rename from python-naive/examples/rich-and-config/rich-and-config.py rename to python-naive/examples/update-firewall-source/update-firewall-source.py index 103cf95..1fc6b69 100644 --- a/python-naive/examples/rich-and-config/rich-and-config.py +++ b/python-naive/examples/update-firewall-source/update-firewall-source.py @@ -31,7 +31,7 @@ class CONST(object): # an empty string. An example config.ini file may give a sane config example value here, removing that value # still results in a valid file. CFG_KNOWN_DEFAULTS = [ - {"key": "self_name", "value": "rich-and-config", "empty_ok": False}, + {"key": "self_name", "value": "update-firewall-source", "empty_ok": False}, {"key": "tmp_base_dir", "value": os.path.join(CFG_THIS_FILE_DIRNAME, "data/tmp/%(self_name)s"), "empty_ok": False}, {"key": "state_base_dir", "value": os.path.join(CFG_THIS_FILE_DIRNAME, "data/var/lib/%(self_name)s"), @@ -40,7 +40,7 @@ class CONST(object): {"key": "state_file_retention", "value": "50", "is_global": False, "empty_ok": True}, {"key": "state_file_name_prefix", "value": "state-", "is_global": False, "empty_ok": True}, {"key": "state_file_name_suffix", "value": ".log", "is_global": False, "empty_ok": True}, - {"key": "rich_and_config_some_option", "value": "http://localhost:8000/api/query", "is_global": True, + {"key": "update_firewall_source_some_option", "value": "http://localhost:8000/api/query", "is_global": True, "empty_ok": False}, {"key": "another_option", "value": "first", "is_global": True, "empty_ok": True} ]