bobtemplates.plone
bobtemplates.plone copied to clipboard
Honor "package.git.autocommit" variable
I think that, when in interactive mode, whatever I write for "package.git.autocommit" in my config file is not taken in consideration.
This PR should fix this behavior and aim at
- always honoring the provided variable
- ask only if nothing was provided and we are in "interactive" mode
I've manually tested as follows:
cdto a plone add-on folder- call
mrbob bobtemplates.plone:content_type -c config.mrbobwith and without the--non-interactiveswitch - in the config file, set
package.git.autocommittoy, ton, or do not set it (see below)
[variables]
# package.git.autocommit = y
author.name = Me
author.email = [email protected]
author.github.user = me
package.description = any
package.git.init = n
subtemplate_warning = y
dexterity_type_name = any
dexterity_type_desc = any
dexterity_type_icon_expr = tencent-qq
dexterity_type_supermodel = n
dexterity_type_base_class = Container
dexterity_type_global_allow = y
dexterity_type_filter_content_types = n
dexterity_type_create_class = y
dexterity_type_activate_default_behaviors = y
[Off-Topic] AFAICT, comments in the .editorconfig file should go on their line (my IDE complained and it's probably right :slightly_smiling_face: )
https://editorconfig.org/#file-format-details
HTH
P.S. thanks for the good work!
Thx for pointing that out, can you please add a changelog entry.
Also test are failing, mainly linting issues ;)
I think I've done what was necessary, but some automatic checks still fail (in a weird way).
I'll try to re-run them later to see if there is some glitch in the ci/cd machinery :slightly_smiling_face:
@MrTango please, I need assistance.
I think there is a failing test, but, AFAICT, it also fails on the main branch.
Unfortunately I've never tested Plone add-ons and I'm new to tox (and there a two tox.ini files :slightly_smiling_face: ), so I'm not really sure of my results.
Here is a screenshot of the last lines of a run of tox on the main branch (sx) and on my branch (dx):
I'm not very comfortable with the logs, but I think the relevant part is the following:
...
File ".../test_addon_all0/collective.task/src/collective/task/tests/test_vocab_available_tasks.py", line 30, in test_vocab_available_tasks
vocabulary.getTerm("sony-a7r-iii").title,
AttributeError: 'NoneType' object has no attribute 'title'
...
FAILED skeleton-tests/test_addon_all.py::test_addon_all - AssertionError: The tests inside the generated package are failing, please check the output above!