File tree Expand file tree Collapse file tree 13 files changed +155
-17
lines changed
Expand file tree Collapse file tree 13 files changed +155
-17
lines changed Original file line number Diff line number Diff line change 2424 board_release_train :
2525 runs-on : ubuntu-latest
2626 env :
27- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2827 TRAIN : ' release-train'
2928 BOARDING : ${{ github.event.ref == 'refs/tags/auto-release' && 'boarding-auto' || 'boarding' }}
3029 MAIN_BRANCH : ' master'
@@ -110,6 +109,8 @@ jobs:
110109 - name : ' Create PR ${{ env.BOARDING }} --> ${{ env.TRAIN }}'
111110 # --head is the branch where the changes were developed
112111 # --base is the branch you want to merge the changes into
112+ env :
113+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
113114 run : |
114115 gh pr create --head "${{ env.BOARDING }}" --base "${{ env.TRAIN }}" \
115116 --title "Boarding '${{ steps.user_branch.outputs.USER_BRANCH }}' on Release Train - Merging into ${{ env.TRAIN }} Branch" \
@@ -141,5 +142,6 @@ jobs:
141142 # ############# Merge ##############
142143 - name : ' Merge PR ${{ env.BOARDING }} --> ${{ env.TRAIN }}'
143144 run : gh pr merge "${{ env.BOARDING }}" --auto --delete-branch --squash
144-
145+ env :
146+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
145147 # HEAD is now at ${{ env.TRAIN }}
Original file line number Diff line number Diff line change 2626jobs :
2727 # RUN Job when 'boarding-auto --> 'release-train' PR is merged
2828 merge_rt_in_release :
29- # ALLOWED Head Branches
30- # if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'boarding-auto')
31- # if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
32- if : github.event_name == 'pull_request' && github.event.action == 'closed'
33- # && github.event.pull_request.head.ref == 'boarding-auto' && github.event.pull_request.merged == true
29+ if : github.event.pull_request.merged == true && startsWith(github.head_ref, 'boarding-auto')
3430 # github.event.pull_request.auto_merge_enabled
3531
3632 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -3,6 +3,40 @@ Changelog
33=========
44
55
6+ 1.12.4 (2024-02-09)
7+ ===================
8+
9+ **Improved Code Coverage. **
10+
11+
12+ Changes
13+ ^^^^^^^
14+
15+ fix
16+ """
17+ - dynamic runtime loading of all CookiecutterException subclasses from cookiecutter
18+
19+ test
20+ """"
21+ - unit-test *Exception Classifier * and cover all possible returned values
22+
23+ documentation
24+ """""""""""""
25+ - add docstrings
26+
27+ ci
28+ ""
29+ - use pat with Commit, PR, Workflow Trigger in merge-to-rt Workflow
30+
31+ refactor
32+ """"""""
33+ - Exception Classifier more readable code and comment on *critical * / *not-critical * classification decisions
34+
35+ release
36+ """""""
37+ - bump version to 1.12.4
38+
39+
6401.12.3 (2024-02-08)
741===================
842
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.3 /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.4 /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.3 ..master
280+ :target: https://github.com/boromir674/cookiecutter-python-package/compare/v1.12.4 ..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.3 '
33+ release = '1.12.4 '
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.3 "
13+ version = " 1.12.4 "
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 1- __version__ = '1.12.3 '
1+ __version__ = '1.12.4 '
22
33from . import _logging # noqa
Original file line number Diff line number Diff line change 22
33
44class ContextVariableDoesNotExist (Exception ):
5+ """Raised when a Context Variable does not exist, in a dict-like object."""
6+
57 pass
Original file line number Diff line number Diff line change @@ -14,4 +14,6 @@ def post_main(request):
1414
1515
1616class CheckWebServerError (Exception ):
17+ """Raised on Connection Error, when Requesting a Web Server's Future."""
18+
1719 pass
Original file line number Diff line number Diff line change 1818
1919
2020def error_2_str (error ):
21- if isinstance (error , UndefinedVariableInTemplate ):
21+
22+ recognized_non_critical = {UndefinedVariableInTemplate }
23+ recognized_critical = set (exceptions ['critical' ]).difference (recognized_non_critical )
24+
25+ ## Mark NON Critical for program execution ##
26+ # Program should potentially be able to handle that exception and proceed
27+ if isinstance (error , tuple (recognized_non_critical )):
28+ # We 'mark as non-critical', when we find out-of-scope variables (when a
29+ # template uses a variable which is not defined in the context),
30+ # anticipating the injection of out-of-scope variables programmatically.
2231 return 'non-critical'
2332
24- if isinstance (error ,
25- tuple (set (exceptions ['critical' ]).difference (set ([UndefinedVariableInTemplate ])))
26- ):
33+ ## Mark CRITICAL for program execution ##
34+ # Program's execution should potentially stop, as unable to handle exception
35+ if isinstance (error , tuple (recognized_critical )):
36+ # We Classify as Critical, all our Generator's backend engine Exceptions
37+ # which are cokiecutter exceptions, but we exclude
38+ # UndefinedVariableInTemplate and we add our Generator's exceptions:
39+ # - ContextVariableDoesNotExist
2740 return 'critical'
You can’t perform that action at this time.
0 commit comments