Skip to content

Contributing to Plone core: skip buildout, use magic #1936

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

Merged
merged 18 commits into from
Jun 11, 2025

Conversation

ksuess
Copy link
Member

@ksuess ksuess commented Apr 8, 2025

buildout.coredev can do without buildout.

@mauritsvanrees and @jensens created a Makefile support of a dev setup with straight forward package installation (uv) instead of buildout. This is awesome.

Fix plone/buildout.coredev#1014


📚 Documentation preview 📚: https://plone6--1936.org.readthedocs.build/contributing/core/index.html#install-plone-core-for-development

Copy link
Contributor

@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.

I'm not clear what the intent here is. I've heard arguments to both remove and keep buildout.

Personally, I think both buildout and pip should be removed as methods for contributing and installation, and move to uv and Cookieplone. It's absurd to have three methods to get started with Plone. There should be one and only one method.

Given the lack of accurate documentation for both buildout and pip methods, I'm fine with letting them wither and die.

@ksuess
Copy link
Member Author

ksuess commented Apr 8, 2025 via email

@jensens
Copy link
Member

jensens commented Apr 9, 2025

the mx* method in fact uses uv

@ksuess ksuess changed the title contributing: skip buildout, use magic contributing to Plone core: skip buildout, use magic Apr 18, 2025
@ksuess ksuess changed the title contributing to Plone core: skip buildout, use magic Contributing to Plone core: skip buildout, use magic Apr 18, 2025
@ksuess ksuess marked this pull request as ready for review April 18, 2025 13:21
Copy link
Contributor

@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.

The release managers ought to be involved in the switch from buildout to make. Has there been a discussion, decision, or announcement to switch?

This page was updated in #1671, taking over a month of review, discussion, and revisions. All the participants in that PR should also be involved in the discussion to switch. I'll request a review from them all.

I can't remember exactly, but there were some arguments made for keeping buildout. However, maybe that is not in the context of developing Plone core?

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

This part is fine, but sections later in the file assume that Plone was installed using buildout. (For example, the "Edit packages" section shows how to check out a new package from source by editing buildout.local.cfg.) We can't update only the installation instructions without also updating the other instructions that assume installation was done using buildout.

@ksuess ksuess force-pushed the instructions-for-setup-to-contribute-to-core-ploen branch from d321de3 to 007029f Compare May 15, 2025 06:07
@mauritsvanrees
Copy link
Member

@jensens see my comment #1936 (comment). Do we need to checkout plone/documentation?

Initially this was done in 2021 in this PR by Jens to ease contributions to the documentation. It can be useful to have the documentation right there in the coredev buildout.

But for me it would be fine to remove it from there. The .git directory of the docs is 434 MB. Even with a git clone depth of 1 (by CI on Jenkins or on GitHub Actions), it is still 11 MB that we pull in each time, even when it has no influence on the tests.

Also, I can never remember which directory contains the Plone documentation and which the few pages of the more internal buildout.coredev documentation. Locally I have this:

  • docs (coredev docs)
  • documentation/docs (docs.plone.org, where I never liked that this ends up in a sub directory)
  • src/docs (same as the second one, but this is probably from a time when I did not have the new Makefile and related files configured correctly yet)

@mauritsvanrees
Copy link
Member

Actually, when you run buildout, the documentation gets cloned to documentation/docs, but with make sources it ends up in src/docs. It seems to be configured fine in mxsources.ini:

[settings]
docs-directory = documentation
...
[docs]
...
target = ${settings:docs-directory}

It seems the target is ignored. Seems an error in mxdev.
I will open an issue there. And I am making a PR for buildout.coredev to remove the clone of the documentation.

mauritsvanrees
mauritsvanrees previously approved these changes Jun 6, 2025
Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

This looks good. Thank you!

I have been busy making changes to the Makefile part in plone/buildout.coredev#1020, which is ready for review. That is for Plone 6.2, but most of it can and should be copied to 6.1 as well. We can make improvement to the docs once that has landed (and has been battle tested).

But for now this docs PR is fine. Can be merged.

mauritsvanrees added a commit to plone/buildout.coredev that referenced this pull request Jun 6, 2025
mauritsvanrees added a commit to plone/buildout.coredev that referenced this pull request Jun 6, 2025
@stevepiercy
Copy link
Contributor

It can be useful to have the documentation right there in the coredev buildout.

It's OK to keep it, too. But if we keep it, we need to either update the command in the documentation to run all tests to .venv/bin/pytest --ignore=src/docs, create a Make command that does that instead such as make test-all, or create some other workaround.

I'll go along with what y'all think is best.

davisagli
davisagli previously approved these changes Jun 10, 2025
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

Nice work, thank you!

```

```{include} /_inc/_create-classic-ui-instance.md
```
To create and visit a new Plone site, visit http://localhost:8080, select the Classic UI distribution, and fill out and submit the form, ensuring you create a site with sample content against which you can test.
Copy link
Member

Choose a reason for hiding this comment

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

Why Classic UI specifically? I often install the Volto distribution if I'm working on backend changes that I want to test with Volto.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, of course, this should not recommend one of the distributions.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ksuess @davisagli the instructions on this page do not cover starting the Volto frontend and don't include how to start to develop in Volto. In fact, the second sentence of this page states the following.

Although Plone core includes Volto—the React based, default frontend for Plone 6—this guide does not apply to Volto and its packages. To contribute to Volto, see Contributing to Volto.

Unless and until the instructions on this page actually support Volto development, then we should use the previous version of this sentence, telling developers to select Classic UI.

In my testing, I couldn't even visit the Volto frontend because it doesn't get started. Maybe there is a way to do that, and if there is, then let's get it into this page.

Copy link
Member

Choose a reason for hiding this comment

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

@stevepiercy When I'm working on something that involves changes in both Volto and in the backend, I start Volto from the volto repository (as covered in https://plone6--1936.org.readthedocs.build/volto/contributing/developing-core.html#start-plone) and then I start the backend from the buildout.coredev repository (instead of running make backend-docker-start from the volto repository, which doesn't give the option to check out backend packages) and then create a site using the Volto distribution.

I'm totally okay with leaving that as out of scope for this PR (let's get this merged), but I think we should explain it somewhere (maybe it belongs under "Contributing to Volto", but it's really about contributing to the backend and then testing those changes with Volto before they're released)

Copy link
Member

Choose a reason for hiding this comment

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

(Maybe we should add a make frontend-docker-start command to buildout.coredev to parallel make backend-docker-start in the Volto repository, in case you just want to get the most recent Volto release running quickly for testing without cloning it separately)

Copy link
Contributor

Choose a reason for hiding this comment

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

@stevepiercy When I'm working on something that involves changes in both Volto and in the backend, I start Volto from the volto repository (as covered in https://plone6--1936.org.readthedocs.build/volto/contributing/developing-core.html#start-plone) and then I start the backend from the buildout.coredev repository (instead of running make backend-docker-start from the volto repository, which doesn't give the option to check out backend packages) and then create a site using the Volto distribution.

Are you saying that you have two clones, one each for volto and buildout.coredev as siblings or something?

I'm totally okay with leaving that as out of scope for this PR (let's get this merged),

Yeah, I think it is out of scope here.

but I think we should explain it somewhere (maybe it belongs under "Contributing to Volto", but it's really about contributing to the backend and then testing those changes with Volto before they're released)

Are you saying, for example, adding or editing a plone.restapi endpoint in your buildout.coredev checkout, then running tests in your volto checkout? If so, we don't have that in the docs yet. It never occurred to me to have the two checkouts talk to each other. I guess as long as the backend runs on the same host and port that the volto checkout requires, it's all good, right?

Copy link
Member

Choose a reason for hiding this comment

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

@stevepiercy Yeah, that's right, there's no actual configuration to make the two repositories work with each other, it's just based on the convention of running the backend on port 8080, and Volto expecting one there by default.

@ksuess ksuess dismissed stale reviews from davisagli, mauritsvanrees, and stevepiercy via 652da03 June 10, 2025 05:33
davisagli
davisagli previously approved these changes Jun 10, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Approved in Plone Documentation Jun 10, 2025
@davisagli
Copy link
Member

@stevepiercy Okay to merge from your perspective?

@stevepiercy
Copy link
Contributor

@davisagli see my comment at #1936 (comment). I'll try again later today to see if that is still the case, blocking a merge, unless someone else can verify first.

@davisagli
Copy link
Member

@stevepiercy We removed the documentation from being included in plone/buildout.coredev#1022, so I don't think there's more work needed in relation to that comment.

@stevepiercy stevepiercy self-requested a review June 11, 2025 06:44
@github-project-automation github-project-automation bot moved this from Approved to In Progress in Plone Documentation Jun 11, 2025
@stevepiercy
Copy link
Contributor

@davisagli @ksuess see comment at #1936 (comment). I reverted that change.

I also ran through the page to ensure it works as described and intended, and the plone/documentation repo is no longer checked out, so .venv/bin/pytest works.

=== 2 failed, 871 passed, 6 skipped, 4200352 warnings in 624.19s (0:10:24) ===

So the documentation is correct, but there are some broken tests.

Merging as soon as it's all green.

I'm also happy if someone wants to expand this page to include contributing to Volto.

@stevepiercy stevepiercy merged commit ae75dbd into 6.0 Jun 11, 2025
3 checks passed
@stevepiercy stevepiercy deleted the instructions-for-setup-to-contribute-to-core-ploen branch June 11, 2025 07:31
@github-project-automation github-project-automation bot moved this from In Progress to Done in Plone Documentation Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

a 'make help' could help
5 participants