plone / buildout.coredev

Plone Core Development Buildout
http://docs.plone.org/develop/coredev/docs/
74 stars 75 forks source link

POC: use mxdev #931

Closed mauritsvanrees closed 1 month ago

mauritsvanrees commented 4 months ago

This uses the bin/manage buildout2pip command from https://github.com/plone/plone.releaser/pull/72 to create mxsources.txt and mxcheckouts.txt from the Buildout sources and checkouts. Then we add some more files to use this, and update the Makefile:

$ make help
clean                          Remove old virtualenv and creates a new one
help                           This help message
mxdev-generate                 mxdev: generate requirements and constraints files without pulling sources
mxdev-update                   mxdev: update requirements and constraints files and pull the sources
pip-bootstrap                  Pip: Bootstrap a venv for tests (future: several venvs with less installed)
pip-test                       Pip: Run only a few unit tests, as proof of concept.
pip-update                     Pip: Update a venv for tests (future: several venvs with less installed)
test-acceptance                Run acceptance tests
test                           Run tests

The Makefile targets starting with pip or mxdev are new.

Usage would be:

# Create/refresh the mxdev sources and checkouts (you need to use the `plone.releaser` branch from the linked PR (I committed the result):
bin/manage buildout2pip
# Create venvs/test/ installing `uv` and `mxdev`:
make pip-bootstrap
# Use mxdev to (re)generate requirements and constraints files:
make mxdev-generate
# Instead, you can call `make mxdev-update` to do the same plus pull the packages that should be checked out.
# Install all packages, which includes test packages: 
make pip-update
# Run the real unit tests (without any layers) of CMFPlone:
make pip-test

Some points of interest:

mauritsvanrees commented 1 month ago

Closing this in favour of https://github.com/plone/buildout.coredev/pull/945.