Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bobtemplates.plone to create Plone addon structure #25

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

erral
Copy link
Member

@erral erral commented Oct 15, 2022

Fixes #20

I had to do the following:

  • Add bobtemplates.plone as a dependency of this package so that it is installed to call it.
  • Use {{python_package_name}}.addon as the addon name, because bobtemplates.plone requires to use namespaced package names. If this changes in the future, we can change it here too @MrTango

@ericof
Copy link
Member

ericof commented Oct 15, 2022

@erral, thanks for this PR.
I was discussing with @jensens about the following:

  • Use pipx to run cookiecutter and then mr.bob
  • Create a new mr.bob template that follows the same structure we have in cookiecutter (i.e.: one level, no namespaces, already provide sane defaults for languages, and so on...)
  • Double check mxdev and Docker integration (as we had small problems with the new plone.org today)

@erral
Copy link
Member Author

erral commented Oct 16, 2022

regarding the 2nd one, I would modify the actual bobtemplate.plone addon template to remove the namespace requirement and for the sane defaults, perhaps add there in bobtemplates.plone a subtemplate providing them

@MrTango

@MrTango
Copy link

MrTango commented Oct 20, 2022

@erral i just merged today the fixes from @mamico
namespaces are no longer enforced and also multiple namespaces are working better.
I'll do a release soon.
I still have a PR for forms in the queue, i would like to merge before.

@erral
Copy link
Member Author

erral commented Oct 21, 2022

Thanks! When the release is ready, I will work on using it in this package, and I will also try to work on a subtemplate following Erico's suggestion

@erral erral force-pushed the bobtemplates branch 2 times, most recently from 01d2a4c to c2a94dd Compare October 30, 2022 16:49
@erral
Copy link
Member Author

erral commented Oct 30, 2022

See plone/bobtemplates.plone#526 for the starter template.

Right now this package only sets 2 values in the default Plone site it creates: the site title and the default language.

All other things that are created in the generated plone addon package are just empty folders for behaviors, serializers, services, content types, etc. which are already handled by bobtemplates.plone so can be ditched.

@erral
Copy link
Member Author

erral commented Oct 30, 2022

before merging this, we need to agree in the approach and have the bobtemplates.plone PR merged and a new version released, this way I will update the requirement version for bobtemplates.plone

@MrTango @jensens @ericof

Copy link
Member

@jensens jensens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First: thanks a lot!
Some changes before I would merge from my POV:

  • use plonecli and avoid using mr.bob directly. We want people to work with plonecli (and improve plonecli for Plone 6).
  • use pipx run plonecli create addon instead of adding bobtemplates.plone to the requirements.txt.
  • add pipx as the only new to requirements.txt (plan is to use pipx for other tools like isort/black/... in future, so it is good there for now.

@erral
Copy link
Member Author

erral commented Nov 1, 2022

right now it looks like it is not possible to pass the --config parameter that mr.bob uses to provide default answers in a non-interactive way to plonecli 😕

I'll keep looking at it.

@jensens
Copy link
Member

jensens commented Nov 1, 2022

LGTM now. If the other parts are merged and released (plonecli/bobtemplates.plone) this one can be merged too from my POV.

@jensens
Copy link
Member

jensens commented Dec 30, 2022

Whats the state here?

@ericof
Copy link
Member

ericof commented Dec 30, 2022

I would suggest we sprint on plonecli during Alpine sprint, then merge this

@erral
Copy link
Member Author

erral commented Dec 31, 2022

There is indeed a PR on plonecli to add a Plone site initializer subtemplate. But it just adds 2 settings site title and languages, and may be it is a bit poor subtemplate to add it to bobtemplates.plone, don't know...

We can neglect that, or improve it if more settings can be added to a site initializer... But I don't see what more can be added there...

@MrTango
Copy link

MrTango commented Jan 26, 2023

I'll be there too, happy to help ;)

Copy link
Member

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@erral erral requested a review from davisagli as a code owner October 3, 2023 08:20
@erral
Copy link
Member Author

erral commented Oct 3, 2023

Wait for plone/bobtemplates.plone#526 to be merged before this.

@erral
Copy link
Member Author

erral commented Apr 22, 2024

I have rebased on top of the changes last months... I will need a release for bobtemplates.plone to test this properly.

@jensens
Copy link
Member

jensens commented Apr 23, 2024

A bobtemplates.plone release sounds like a task for @MrTango ;-)

@MrTango
Copy link

MrTango commented May 7, 2024

@erral bobtemplates.plone is released in version 6.3.2 now, please test ;)

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.

Use Plone CLI instead of having a full add-on in here
5 participants