-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
updates the Makefile to ensure consistent installations of black and click. #1668
Conversation
@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:
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! |
✅ Deploy Preview for plone-restapi canceled.
|
@wesleybl Plz review |
news/1668.bugfix
Outdated
@@ -0,0 +1 @@ | |||
updates the Makefile to ensure consistent installations of black and click. @Akshat2Jain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the issue number in the file name.
Ops, we don't have an issue.
Use the internal extension.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but I'm not familiar with that term . what exactly you meant by 'internal extension.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same way that we have the .bugfix
, we also have the .internal
. The options are here:
https://github.com/plone/plone.restapi/blob/master/pyproject.toml
We use .internal
, when the change is interest only to the package developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no issue , so should I name the file as 1668.internal
Makefile
Outdated
@@ -44,7 +44,7 @@ update: ## Update Make and Buildout | |||
bin/buildout: bin/pip | |||
bin/pip install --upgrade pip | |||
bin/pip install -r requirements-5.2.txt | |||
bin/pip install black || true | |||
bin/pip install --upgrade click==$(awk '/^click =/{print $NF}' versions.cfg) black==$(awk '/^black =/{print $NF}' versions.cfg) || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like black wasn't installed:
$ make black
if [ -f "bin/black" ]; then bin/black src/ ; fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like black wasn't installed:
$ make black if [ -f "bin/black" ]; then bin/black src/ ; fi
but it shows black version 23.3.0
, so it means black is installed
@wesleybl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It must have been installed before you update the code in the Makefile. You can run a make clean
to remove the previous installation. Then if you run make
again you will see that black
is not installed. The error occurs:
bin/pip install --upgrade click== black== || true
ERROR: Could not find a version that satisfies the requirement click== (from versions: 0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, 0.7, 1.0, 1.1, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 5.0, 5.1, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.dev0, 6.7, 7.0, 7.1, 7.1.1, 7.1.2, 8.0.0a1, 8.0.0rc1, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.1.4)
ERROR: No matching distribution found for click==
Hey @wesleybl, I have made the changes, now it installed the correct version from the version.cfg
|
Hey @stevepiercy, I have changed the file name to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A grammar fix, and then I approve the news item. I have not tested the Makefile.
news/1668.internal
Outdated
@@ -0,0 +1 @@ | |||
updates the Makefile to ensure consistent installations of black and click. @Akshat2Jain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updates the Makefile to ensure consistent installations of black and click. @Akshat2Jain | |
Updated the Makefile to ensure consistent installations of black and click. @Akshat2Jain |
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 |
And now the failing test passes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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). |
@tisto you are sure. Looking closer, the buildout doesn't install
This simplifies the installation avoiding complications like: plone.restapi/.github/workflows/black.yml Line 25 in 9097cfc
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See: #1668 (comment)
Maybe it's better to create another PR.
Closed in favor of #1671. |
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
OR
Reason for the Changes
OR
This is pr is realated to #1655