Skip to content

Conversation

@gamboz
Copy link

@gamboz gamboz commented Feb 14, 2025

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 = me@example.com
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 🙂 )
https://editorconfig.org/#file-format-details

HTH

P.S. thanks for the good work!

@MrTango
Copy link
Contributor

MrTango commented Feb 19, 2025

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

@MrTango
Copy link
Contributor

MrTango commented Feb 19, 2025

Also test are failing, mainly linting issues ;)

@gamboz
Copy link
Author

gamboz commented Feb 20, 2025

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 🙂

@gamboz
Copy link
Author

gamboz commented Feb 23, 2025

@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 🙂 ), 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants