bobtemplates.plone icon indicating copy to clipboard operation
bobtemplates.plone copied to clipboard

Honor "package.git.autocommit" variable

Open gamboz opened this issue 9 months ago • 4 comments

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:

  • cd to a plone add-on folder
  • call mrbob bobtemplates.plone:content_type -c config.mrbob with and without the --non-interactive switch
  • in the config file, set package.git.autocommit to y, to n, 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!

gamboz avatar Feb 14 '25 16:02 gamboz

Thx for pointing that out, can you please add a changelog entry.

MrTango avatar Feb 19 '25 13:02 MrTango

Also test are failing, mainly linting issues ;)

MrTango avatar Feb 19 '25 13:02 MrTango

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:

gamboz avatar Feb 20 '25 13:02 gamboz

@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):

Screenshot_2025-02-23_20-47-50

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!

gamboz avatar Feb 23 '25 19:02 gamboz