File tree Expand file tree Collapse file tree 12 files changed +54
-11
lines changed
Expand file tree Collapse file tree 12 files changed +54
-11
lines changed Original file line number Diff line number Diff line change 22Changelog
33=========
44
5+ 1.12.5 (2024-02-11)
6+ ===================
7+
8+ We add `--offline ` as optional CLI flag to the `generate-python ` CLI.
9+ We keep the default behaviour of the CLI to be `online `, ie to make Async Http requests.
10+
11+
12+ Changes
13+ ^^^^^^^
14+
15+ feature
16+ """""""
17+ - add CLI option to deactivate Async Http requests for PyPI and RTD web servers
18+
19+ dev
20+ """
21+ - run with --offline flag the Snapshot Update Scripts
22+
23+ release
24+ """""""
25+ - bump version to 1.12.5
26+
27+
5281.12.5-dev1 (2024-02-10)
629========================
730
Original file line number Diff line number Diff line change @@ -275,9 +275,9 @@ Free/Libre and Open Source Software (FLOSS)
275275
276276.. Github Releases & Tags
277277
278- .. |commits_since_specific_tag_on_master | image :: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.12.5-dev1 /master?color=blue&logo=github
278+ .. |commits_since_specific_tag_on_master | image :: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/v1.12.5/master?color=blue&logo=github
279279 :alt: GitHub commits since tagged version (branch)
280- :target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.12.5-dev1 ..master
280+ :target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.12.5..master
281281
282282.. |commits_since_latest_github_release | image :: https://img.shields.io/github/commits-since/boromir674/cookiecutter-python-package/latest?color=blue&logo=semver&sort=semver
283283 :alt: GitHub commits since latest release (by SemVer)
Original file line number Diff line number Diff line change 3030author = 'Konstantinos Lampridis'
3131
3232# The full version, including alpha/beta/rc tags
33- release = '1.12.5-dev1 '
33+ release = '1.12.5'
3434
3535# -- General configuration ---------------------------------------------------
3636
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api"
1010# # Also renders on pypi as 'subtitle'
1111[tool .poetry ]
1212name = " cookiecutter_python"
13- version = " 1.12.5-dev1 "
13+ version = " 1.12.5"
1414description = " 1-click Generator of Python Project, from Template with streamlined \" DevOps\" using a powerful CI/CD Pipeline."
1515authors = [" Konstantinos Lampridis <k.lampridis@hotmail.com>" ]
1616maintainers = [" Konstantinos Lampridis <k.lampridis@hotmail.com>" ]
Original file line number Diff line number Diff line change 1515
1616# ## RUN Generator in Interactive Mode, prompting/asking for user input ###
1717echo
18- .tox/dev/bin/generate-python --config-file .github/biskotaki.yaml -o /tmp/
18+ .tox/dev/bin/generate-python --offline -- config-file .github/biskotaki.yaml -o /tmp/
1919
2020# ## UPDATE SHAPSHOT, by Copying all Generated files and folders recursively ###
2121INTERACTIVE_SHAPSHOT=${INTERACTIVE_SHAPSHOT:- tests/ data/ snapshots/ biskotaki-interactive}
Original file line number Diff line number Diff line change 1414
1515# ## RUN Generator in Non-Interactive Mode ###
1616echo
17- .tox/dev/bin/generate-python --no-input --config-file .github/biskotaki.yaml -o /tmp/
17+ .tox/dev/bin/generate-python --offline -- no-input --config-file .github/biskotaki.yaml -o /tmp/
1818
1919
2020# ## UPDATE SHAPSHOT, by Copying all Generated files and folders recursively ###
Original file line number Diff line number Diff line change 1- __version__ = '1.12.5-dev1 '
1+ __version__ = '1.12.5'
22
33from . import _logging # noqa
Original file line number Diff line number Diff line change 1717def generate (
1818 # interactive=True,
1919 no_input = False , # INTERACTIVE ON by Default
20+ offline = False ,
2021 extra_context = None ,
2122 replay = False ,
2223 overwrite = False ,
@@ -49,10 +50,11 @@ def generate(
4950 web_servers = WEB_SERVERS ,
5051 no_input = no_input ,
5152 extra_context = extra_context ,
53+ offline = offline ,
5254 )
5355 )
5456 print ('Extra context: ' , request .extra_context )
55- ## GENERATION ##
57+ ## GENERATION from Template; delegate to Cookiecutter callable ##
5658 project_dir = generator (
5759 os .path .abspath (os .path .join (my_dir , '..' )), # template dir path
5860 checkout = checkout ,
Original file line number Diff line number Diff line change @@ -15,9 +15,18 @@ def pre_main(request):
1515 # making http request to web servers hosting endpoints for APIs
1616
1717 # Checkers are initialized as 'Activated'
18- # if User Config is True and Default Config is False
1918
20- request .check = Engine .create (request .config_file , request .default_config )
19+ # Activate Async HTTP only if all below are True:
20+ # - User did not pass the --offline CLI flag
21+ # - User did not pass the --default-config CLI flag
22+ # - User passed a Config file YAML
23+
24+ # Activate: if User Config is given and Default Config is False
25+ deactivate_signal : bool = bool (request .default_config )
26+ if request .offline :
27+ deactivate_signal = True
28+
29+ request .check = Engine .create (request .config_file , deactivate_signal )
2130
2231 # Start Requesting Futures! - Hosting Service: PyPI, Read The Docs
2332 request .check_results = request .check .check (request .web_servers )
Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ class Request:
1414 extra_context : dict
1515 check : Any = attr .ib (default = None )
1616 check_results : Union [None , Iterable [CheckWebServerResult ]] = attr .ib (default = None )
17+ offline : bool = False
You can’t perform that action at this time.
0 commit comments