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

Open
wants to merge 4 commits into
base: 6.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 11 additions & 47 deletions docs/contributing/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ myst:
This guide describes the process of how to contribute to, and develop in, Plone core.
It expands upon {doc}`/contributing/index`.

```{important}
Although Plone core includes Volto—the React based, default frontend for Plone 6—this guide does not apply to Volto and its packages.
Although Plone core includes Volto — the React based, default frontend for Plone 6 — this guide does not apply to Volto and its packages.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert. Original punctuation is correct.

To contribute to Volto, see {doc}`../volto`.
```

This guide assumes that you have basic knowledge of how to use git and GitHub.
If you have never contributed to Plone, or you lack basic knowledge of how to use git and GitHub, you should first read {doc}`/contributing/first-time` for more information.

```{important}
You must {ref}`contributing-sign-and-return-the-plone-contributor-agreement-label` before your contribution can be accepted.
Please {ref}`contributing-sign-and-return-the-plone-contributor-agreement-label` before you contribute.
This is not optional, but a must before your contribution can be accepted.
Comment on lines +22 to +23
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert. The original language is deliberate and direct. Less is more.

```


Expand Down Expand Up @@ -73,67 +72,32 @@ On macOS, Developer Tools provides Clang for a C compiler.
On Linux, [GNU Compiler Collection (GCC)](https://gcc.gnu.org/) is a common option.



(contributing-core)=
## Install Plone core for development

The tool that installs Plone core is `buildout.coredev`.

The current default and development branch of `buildout.coredev` is `6.1`
Older versions are named according to their `major.minor` version.
Former versions are named according to their `major.minor` version.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert. The versions still exist and are active. "Former" implies the version no longer exists or is no longer active. "Older" is a broader term that works. An appropriate usage of "former" would be, "I wish the former President had remained former, instead of getting elected a second time." 😈

Its versions align with Plone's `major.minor` versions.

Use a separate directory for each version of Plone to which you want to contribute.
This will avoid switching between git branches, then re-running buildout, which can cause dependency conflicts between versions of Plone.
This will avoid switching between git branches, which can cause dependency conflicts between versions of Plone.
Copy link
Contributor

Choose a reason for hiding this comment

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

According to its README, "Git" is now capitalized. Originally it was "git", and occasionally "GIT", depending on your mood while using it, as the bulleted list in the README indicates.

Suggested change
This will avoid switching between git branches, which can cause dependency conflicts between versions of Plone.
This will avoid switching between Git branches, which can cause dependency conflicts between versions of Plone.


To set up a Plone 6 development environment, change your working directory to wherever you place your projects, and clone https://github.com/plone/buildout.coredev.
You can specify the branch that you want to check out with the `-b` option.
To set up a Plone 6 development environment, clone https://github.com/plone/buildout.coredev.

```shell
cd [MY_PROJECTS]
# clone a specific major.minor version branch
git clone -b 6.1 https://github.com/plone/buildout.coredev
git clone https://github.com/plone/buildout.coredev
cd buildout.coredev
```

````{important}
If you want to use a Python version that is not 3.11, follow these instructions.

Open the file {file}`bootstrap.sh` at the root of the repository.
Notice that the script expects Python 3.11 to be installed on your system and in your user's `PATH`.

```shell
#/bin/sh
`which python3.11` -m venv .
```

Edit it according to the Python version you want to use, then save and close the file.
After you have run the script, you should undo the change, otherwise you have a local change in git that you might accidentally commit.
````

Now run the script to install Plone 6.
Install Plone and run it:

```shell
./bootstrap.sh
make run
```

This will run for a long time if it's your first pull (approximately 10-20 minutes, depending on network speed and your hardware).

Once that's done, you can start an instance of Plone with the following command.

```shell
./bin/instance fg
```

```{include} /_inc/_create-classic-ui-instance.md
```

```{warning}
Ignore the warning about accessing the Plone backend through its Classic UI frontend.

Do not follow the instructions to install Volto.
They will not work with buildout.
To contribute to Volto, you will need to start over, and follow {doc}`../volto`.
```
See more `make` options/targets in the READMEs of the `buildout.coredev` repo.
Copy link
Contributor

Choose a reason for hiding this comment

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



(contributing-core-work-with-git-label)=
Expand Down