plone / plone.restapi

RESTful API for Plone.
http://plonerestapi.readthedocs.org/
84 stars 73 forks source link

updates the Makefile to ensure consistent installations of black and click. #1668

Closed Akshat2Jain closed 11 months ago

Akshat2Jain commented 1 year ago

Description

This PR updates the Makefile to ensure consistent installations of black and click. Currently, the Makefile installs the latest versions, while the CI process installs specific versions mentioned in the versions.cfg file. This PR aligns the installations in the Makefile with the versions specified in the versions.cfg file.

Changes Made

Reason for the Changes

This is pr is realated to #1655

mister-roboto commented 1 year ago

@Akshat2Jain thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

netlify[bot] commented 1 year ago

Deploy Preview for plone-restapi canceled.

Name Link
Latest commit c1a08832a688f6a2a27b36e2baa2edae4181eeef
Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/64b131688cc6fa0008db25b6
Akshat2Jain commented 1 year ago

@wesleybl Plz review

Akshat2Jain commented 12 months ago

Hey @wesleybl, I have made the changes, now it installed the correct version from the version.cfg

$ ./bin/black --version
black, 22.3.0 (compiled: yes)
Akshat2Jain commented 12 months ago

Hey @stevepiercy, I have changed the file name to 1668.internal

stevepiercy commented 12 months ago

There's a failing test, and I have no idea why it fails: https://github.com/plone/plone.restapi/actions/runs/5529801801/jobs/10088359044?pr=1668#step:10:205

stevepiercy commented 12 months ago

And now the failing test passes. ¯\_(ツ)_/¯

tisto commented 12 months ago

LGTM. Though, I am afraid we currently do not use versions.cfg as far as I can see. I'd suggest including it everywhere and cleaning it up. Or we just use base.cfg to fetch the black versions (seems like the easier way to go for now).

wesleybl commented 12 months ago

@tisto you are sure. versions.cfg is not used by buildout. So I'm +1 for revomering versions.cfg.

Looking closer, the buildout doesn't install black. Only the Makefile and the CI. So I think it would be better to create a constraints.txt, and use it in these places. So the install would just be something like:

pip install -c constraints.txt black

This simplifies the installation avoiding complications like:

https://github.com/plone/plone.restapi/blob/9097cfcb55a7b2a045a5c5e66c46cd04300798c2/.github/workflows/black.yml#L25

wesleybl commented 11 months ago

Closed in favor of #1671.