We previously had a convention of redundantly including the directory in relative links to reduce mistakes when moving content from one file to another. However, these days we have a broken link checker in test-documentation, and after #21237, MyST-Parser will check relative links (including fragments) when you run build-docs. Signed-off-by: Anders Kaseorg <anders@zulip.com>
		
			
				
	
	
	
		
			4.9 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	Zulip PyPI packages release checklist
Zulip manages the following three PyPI packages from the zulip/python-zulip-api repository:
- zulip: The package containing the Zulip API Python bindings.
- zulip_bots: The package containing Zulip's interactive bots.
- zulip_botserver: The package for Zulip's Botserver.
The python-zulip-api packages are often released all together. Here is a
checklist of things one must do before making a PyPI release:
- 
Increment __version__inzulip/__init__.py,ZULIP_BOTS_VERSIONinzulip_bots/setup.py, andZULIP_BOTSERVER_VERSIONinzulip_botserver/setup.py. They should all be set to the same version number.
- 
Set IS_PYPA_PACKAGEtoTrueinzulip_bots/setup.py. Note: Setting this constant toTruepreventssetup.pyfrom including content that should not be a part of the official PyPI release, such as logos, assets and documentation files. However, this content is required by the Zulip server repo to render the interactive bots on Zulip's integrations page. The server repo installs thezulip_botspackage directly from the GitHub repository so that this extra content is included in its installation of the package.
- 
Follow PyPI's instructions in Generating distribution archives to generate the archives for each package. It is recommended to manually inspect the build output for the zulip_botspackage to make sure that the extra files mentioned above are not included in the archives.
- 
Follow PyPI's instructions in Uploading distribution archives to upload each package's archives to TestPyPI, which is a separate instance of the package index intended for testing and experimentation. Note: You need to create a TestPyPI account for this step. 
- 
Follow PyPI's instructions in Installing your newly uploaded package to test installing all three packages from TestPyPI. 
- 
If everything goes well in step 5, you may repeat step 4, except this time, upload the packages to the actual Python Package Index. 
- 
Once the packages are uploaded successfully, set IS_PYPA_PACKAGEtoFalseinzulip_bots/setup.pyand commit your changes with the version increments. Push your commit topython-zulip-api. Create a release tag and push the tag as well. See the tag and the commit for the 0.8.1 release to see an example.
Now it is time to update the dependencies in the Zulip server repository:
- 
Increment PROVISION_VERSIONinversion.py. A minor version bump should suffice in most cases.
- 
Update the release tags in the Git URLs for zulipandzulip_botsinrequirements/common.in.
- 
Run tools/update-locked-requirementsto update the rest of the requirements files.
- 
Commit your changes and submit a PR! Note: See this example commit to get an idea of what the final change looks like. 
Other PyPI packages maintained by Zulip
Zulip also maintains two additional PyPI packages:
- fakeldap: A simple package for mocking LDAP backend servers for testing.
- virtualenv-clone: A package for cloning a non-relocatable virtualenv.
The release process for these two packages mirrors the release process for the
python-zulip-api packages, minus the steps specific to zulip_bots and the
update to dependencies required in the Zulip server repo.