Skip to content
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

Read data from setup.cfg and pypirc #144

Open
mauritsvanrees opened this issue Oct 29, 2015 · 1 comment
Open

Read data from setup.cfg and pypirc #144

mauritsvanrees opened this issue Oct 29, 2015 · 1 comment
Labels

Comments

@mauritsvanrees
Copy link
Member

Just an idea.

We supply data so that entry points can use it and override it. I have some entry points that simply override a value and do nothing else: no computations, no writing, nothing. See https://github.com/plone/plone.releaser/blob/ca9a5bbeac7b54d4a145e4a3434ec8374b756aa5/plone/releaser/release.py#L24
It would be nice if that can be done in setup.cfg for an individual package. And probably in pypirc too for all packages.

The three top most hooks from plone.releaser could look like this when done in a setup.cfg:

[zest.releaser]
prereleaser.data =
# A simple string:
    nothing_changed_yet = *add item here*
# A list:
    required_changelog_text =
        New:
        Fixes:
postreleaser.data =
# A few lines of text:
    nothing_changed_yet =
        New:
        - *add item here*
        Fixes:
        - *add item here*

Note that the difference between a list and a few lines of text is probably hard to do. Maybe only support simple strings.

Note that the hooks in plone.releaser are meant for all packages: the Plone release team (including myself) uses it for releasing core Plone packages. So if the release team wants to get rid of those hooks, the alternative would be to put those in pypirc.

We would put the handling of this in utils.run_hooks. We could allow more granularity, same as we do for hooks in setup.cfg: have prereleaser.{before,middle,after}.data.

Use case: I want to put the above setup.cfg in zest.releaser itself so that we have 'New' and 'Fixes' headers added during postrelease. :-) Does that in itself sound like a good idea?

@reinout
Copy link
Collaborator

reinout commented Oct 30, 2015

Using setup.cfg in this way: fine.

Mandatory new/fixes in our own changelog: hmmm. Initially, I'm not in favour. Normally we release very very quickly, often there's only one new or one fixed item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants