Maintenance#
This chapter describes the maintenance structure of icalendar.
icalendar Maintainers#
Currently the maintainers are the following people.
Maintainers need the following permissions.
Adminaccess to the repository.These can be enabled by a current maintainer or a GitHub organization administrator in the settings.
MaintainerorOwneraccess to the PyPI project.Each owner and maintainer needs a PyPI account. All PyPI accounts require two-factor authentication (2FA) enabled. Owners can invite either new owners or maintainers in the collaboration Section on PyPI. Releases publish through Trusted Publishing, which owners manage on the project's Publishing page.
Maintaineraccess to the Read the Docs project.Existing maintainers can invite another maintainer through the Maintainers page.
Environments/Configure PyPIaccess for GitHub Workflows to grant new releases from tags.Organization owners and repository administrators can grant this access in , or at PyCalendar/icalendar, by adding their GitHub username to the list of Required Reviewers.
OwnerorManageraccess toicalendar-coc@googlegroups.comThis Google Group is used for managing Code of Conduct infringement reports.
Managers may manage and moderate messages, whereasOwners may also manage members. Management is performed through Google Groups icalendar-coc settings.Registeredaccess to the OSS Fuzz issue tracker for icalendar.icalendar contributors use this issue tracker for managing Fuzz testing issues that arise from time to time. New issues do not get immediately disclosed to the public, and require that you register with a Google Account. Add your Google Account's email address to google/oss-fuzz, and create a pull request, to request the following access:
instant notification about fuzzing errors
undisclosed fuzzing issues
Existing issues will be disclosed after some time to the public.
- Maintainer in
pyproject.toml Maintainers should be mentioned with or without email address in the
pyproject.tomlfile's maintainers' section.- Coveralls
Create an account on Coveralls. This will allow you to see the results of Coveralls runs over time.
It doesn't grant you permission to configure the Coveralls GitHub app. That requires Owner permission in the GitHub organization PyCalendar. To configure the Coveralls app for icalendar, contact an owner of the PyCalendar organization.
Collaborators#
Collaborators have write access to the repository. As a collaborator, you can
merge pull requests,
initiate a new release, and
become a Code owner.
The maintainers of icalendar want to have as many knowledgeable people with write access taking responsibility as possible for these reasons:
a constant flow of fixes and new features
better code review
lower bus factor and backup
future maintainers
Nobody should merge their own pull requests. If you like to review or merge pull requests of other people and you have shown that you know how to contribute, you can ask to become a collaborator. A maintainer may ask if you would like to become one.
Code owner#
A code owner is a type of collaborator or maintainer who is responsible for a specific part of the code. Code owners are automatically requested for review when someone opens a pull request that modifies code that they own.
You may ask, or be invited, to become a code owner as part of becoming a collaborator or maintainer.
When doing so, you or the inviter may submit a pull request to update the .github/CODEOWNERS file.
See also
Release versions#
See also
New releases#
This section explains how to create a new release on PyPI.
Its examples were used for the 7.0.0 release of icalendar, a major release. Adjust the examples for the current release as needed.
Since collaborators and maintainers have write access to the repository, they can start the release process.
However, only people with Environments/Configure PyPI access can approve an automated release to PyPI.
Update the Windows to Olson mapping in the
windows_to_olsonmodule.make woIf there are any changes to the module, then open a pull request and merge it.
Determine the new version of icalendar.
make new-versionNote
make new-version reads the version from the
mainbranch. For a backport release on a*.xbranch, setVERSIONmanually instead.Copy and paste the new version into an environment variable to use in subsequent commands during the release process.
export VERSION=7.0.0
Update the
mainbranch.git checkout main git pull
If you'll create a new major release, update
.github/workflows/tests.ymlto include the new release branch in the list of branches that trigger the CI checks.push: branches: - main - 8.x tags: - v*
Update the change log
CHANGES.rstwith the change log entries in/newsusing towncrier.make changesAdd the changes, create a commit on the
mainbranch, and push the changes to prepare a release of this version.git add CHANGES.rst news/ docs/conf.py git add .github/workflows/tests.yml # Only for a new major release git commit -m "version $VERSION" git push # to PyCalendar/icalendar
Confirm the CI checks are running on the commit and pass before continuing, either at the end of the pull request or under the repository tab Actions. No tag should be pushed until CI is green on the version commit. If CI is not running, no release can be issued.
Create a tag for the release on its release branch
*.x, push, and make sure the CI checks are running.First, make sure you're on the
mainbranch and it's current, in case someone else updatedmainwhile tests ran.git checkout main git pull
Next, depending on the release type, do one of the following.
For a major release, create a new branch, and check it out.
git switch -c 8.x
For a minor or patch release, check out the existing branch, and update it.
git checkout 8.x git pull
Next, merge
maininto the release branch.git merge main
Next, push changes upstream, changing the command according to the release type.
For a major release, push, create, and track the upstream branch.
git push -u upstream 8.x # to PyCalendar/icalendar
For a minor or patch release, just push.
git push # to PyCalendar/icalendar
Next, create a tag, and push the tag.
Warning
Once a tag is pushed to the repository, it must not be re-tagged or deleted. This creates issues for downstream repositories. See #1033.
git tag "v$VERSION" git push upstream "v$VERSION" # to PyCalendar/icalendar
In the CI checks under the repository tab Actions, the
deploy-tag-to-pypianddeploy-github-releasejobs will wait for a manual approval. Maintainers listed as Required Reviewers in will receive an email:Subject: Deployment review in PyCalendar/icalendar tests: PyPI is waiting for your review
Approve the deployment under Actions. The approval window is 30 days. If it expires, push a new tag with a bumped version number.
Update the version switcher file
docs/_static/version-switcher.json.Note
This file is configured in
docs/conf.pyon all branches to use the version on themainbranch, which is "latest" on Read the Docs.json_url = "https://icalendar.readthedocs.io/en/latest/_static/version-switcher.json"
The following examples were used for the 7.0.0 release.
Check out the
mainbranch and update it.git checkout main git pull
When cutting a new major release version, update
docs/_static/version-switcher.jsonto match that version.Duplicate the second previous major version stanza and renumber it to the first previous version. In other words, duplicate the
5.xstanza, and renumber the copy to6.x.{ "version": "6.x", "url": "https://icalendar.readthedocs.io/en/6.x/" },
Next, edit the array item for the previous version to reflect the current major release.
{ "name": "7.x (stable)", "version": "v7.0.0", "url": "https://icalendar.readthedocs.io/en/stable/", "preferred": "true" },
When cutting a minor or patch release version, update
docs/_static/version-switcher.jsonto match that version's tag name.{ "name": "7.x (stable)", "version": "v7.0.1", "url": "https://icalendar.readthedocs.io/en/stable/", "preferred": "true" },
For all releases, add, commit, and push the changes.
git add docs/_static/version-switcher.json git commit -m "Update version switcher for $VERSION" git push # to PyCalendar/icalendar
Revert the change in the earlier step by updating the Sphinx configuration file
docs/conf.pyto show the version warning banner on themainbranch, which is "latest" on Read the Docs.git checkout main git pull
html_theme_options = { # ... "show_version_warning_banner": True,
git add docs/conf.py git commit -m "Restore version warning banner for 'latest' on Read the Docs" git push # to PyCalendar/icalendar
If you cut a new major release version, update the Sphinx configuration file
docs/conf.pyon the previous numbered major release branch to show the version warning banner. For example, when releasing 7.0.0, check out6.x, and update it as shown.git checkout 6.x git pull
html_theme_options = { # ... "show_version_warning_banner": True,
git add docs/conf.py git commit -m "Show version warning banner for previous major version 6.x on Read the Docs" git push # to PyCalendar/icalendar
Manually trigger the "latest" version on Read the Docs. To the right in the row for "latest," click the ellipsis …, and from the pop-up menu select Rebuild version.
Advance the
*.xstable branch to the new tag so it stays current for future backports.Note
If the stable branch is behind the latest tag, set it to the tag before starting any backport. For example, if
8.xis atv8.0.0butv8.0.1has been released, reset it.git checkout 8.x && git reset --hard v8.0.1
git checkout 8.x git pull git merge main git push # to PyCalendar/icalendar
Add a comment to each of the issues mentioned in the new release.
This is included in v7.0.0.
Pre-releases#
Pre-releases use PEP 440 suffixes: 8.0.0a1, 8.0.0b1, 8.0.0rc1.
The release steps are the same as a standard release, with the following differences.
The tag goes on main, not on a *.x branch.
When the stable branch is eventually cut, follow the standard process from New releases.
After you create the GitHub release, check that the This is a pre-release checkbox is set on the release page. The workflow sets it automatically for PEP 440 pre-release version tags. If the checkbox is not set, edit the release on GitHub and set it manually before the release is widely announced.
When commenting on issues, use the qualifier so users know the version is not stable:
This is included in v8.0.0a1 (alpha).
Backport releases#
A backport release cherry-picks specific commits onto a *.x stable branch to ship a fix without taking everything on main.
Set the version:
export VERSION=7.3.2
Check that the stable branch is at the latest published tag. If it's behind, advance it first (see the last step of New releases).
git checkout 8.x git pull
Cherry-pick the commits from
main:git cherry-pick <commit-hash> [<commit-hash> ...]
Conflicts between branches are common, usually around error types or control-flow that diverged. After resolving any conflicts, run
pytestto confirm that tests pass.Add a news fragment in
news/, then build the change log:make changesCommit and push to the stable branch:
git add CHANGES.rst news/ git commit -m "version $VERSION" git push # to PyCalendar/icalendar
Confirm CI passes, then tag:
git tag "v$VERSION" git push upstream "v$VERSION"
Warning
Tags can't be moved or deleted once pushed. If a release turns out to be broken, cut a new version. Don't attempt to retag. See #1033.
Approve the
deploy-tag-to-pypianddeploy-github-releasejobs in GitHub Actions when they appear. Only maintainers listed as Required Reviewers in can approve. The approval window is 30 days. After that, you'd need to retag the commit with a new version.Comment on each fixed issue:
This is fixed in v7.3.2.
Security releases#
A security release follows the Backport releases process, with an embargo until the fix ships.
Don't discuss the vulnerability publicly until the fix is released. If someone files a public issue, ask them to use GitHub's private vulnerability reporting instead, and close the public issue.
Open a draft GitHub Security Advisory. Request a CVE from the advisory form. The advisory stays private until you publish it.
Develop the fix in the GHSA's private fork, or in a local branch not pushed until release day.
Coordinate with the other maintainers on timing before tagging.
Release the fix as a backport patch and as the next
mainrelease simultaneously.After PyPI confirms the release, publish the GHSA. Coordinate the public announcement with the docs maintainer.
Links#
This section contains useful links for maintainers and collaborators.
To remove private information from an iCalendar file for bug reports, use icalendar-anonymizer either through its website or install it locally.
Updating Python versions#
When adding support for a new Python version, or removing support for an old one, the following files need to be updated:
.github/workflows/tests.ymlUpgrade Python versions.
.github/workflows/*.pyAdd or remove the Python version from the test matrix.
tox.iniUpdate the
envlistto include or remove the Python version.pyproject.tomlUpdate the
requires-pythonline and theclassifierslist.docs/reference/versions-branches.rstUpdate the compatibility information.
docs/contribute/maintenance.rstUpdate this list if any new files need to be modified.
- Branch Protection Rules
Update the branch protection rules so that they match the required test names.
Remember to write tests that completely cover the changes, and update any documentation that mentions supported Python versions.