-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add Standardize Python project configuration developer guide #1830
base: 6.0
Are you sure you want to change the base?
Conversation
First person to review this PR gets a 🍪 ! |
I would like to come back and rediscuss the usage of pre-commit.io in our projects / packages. |
@ericof Of course, I would love to have a sibling document, "Standardize Node.js project configuration", or something similarly named. |
I know that much, but for Plone 6 projects (with Volto) or for addons that have both packages (Python and JavaScript), we either have to ignore phone/meta and build something else or we have to maintain a crazy solution with a "fork" of pre-commit. |
@ericof That seems off-topic for this PR, which is just trying to document the status quo for how to apply plone/meta to a repository that is not a monorepo and contains only a Python package. Sure, we should work more on it but it's not a blocker here. |
@ericof could you open an issue in Also I could perhaps change some text to make it more explicit that the scope of Please let me know. Thank you! |
To lessen the effort of configuring a new project in the Plone GitHub organization, and to keep these projects current with latest configuration practices, the Plone community agreed upon a trusted set of configuration items. | ||
The Plone community manages these configuration items using the [`meta`](https://github.com/plone/meta) project. | ||
|
||
You can follow these practices in your own projects, or suggest new or alternative configuration items through the `meta` repository, sharing them with the rest of the Plone community. |
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.
I would call it plone/meta
or plone.meta
through, rather than just meta
. There are too many Metas to not disambiguate!
I think we should mention some limitations. It's currently only for use with repositories that have a single Python package at the top level of the repository (so, it can't be used with a monorepo that includes both frontend and backend, like the ones produced by cookieplone). It also doesn't currently work very well for projects that want to support multiple versions of Plone in the same branch.
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.
Done in 1657f29
git clone https://github.com/plone/meta.git | ||
cd meta/config | ||
python3 -m venv venv | ||
. venv/bin/activate |
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.
We generally avoid telling people to activate a virtualenv in the docs, because if they don't understand what they're doing it can lead to tricky situations to troubleshoot (i.e. they try to run commands in a new terminal where it isn't activated). So better to leave it inactive and give full paths to the commands in the virtualenv.
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.
This is mostly fine. But it should be updated to be in line with plone/meta#241 and not be merged until that PR is merged. For example, the config
directory that is important on the current main branch, will be almost empty or completely gone. See the comment I just added.
docs/developer-guide/standardize-python-project-configuration.md
Outdated
Show resolved
Hide resolved
@stevepiercy I started a review of the PR, but I stopped because I found out that the wording was wrong all over the place. To summarize: We need to standardize how do we call things and be consistent all over the place. Just to start with, what is a "Python project" in this context? |
docs/developer-guide/standardize-python-project-configuration.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Maurits van Rees <[email protected]>
meta
how-to guide #1827📚 Documentation preview 📚: https://plone6--1830.org.readthedocs.build/developer-guide/standardize-python-project-configuration.html