Opened 5 years ago
Closed 5 years ago
#14000 closed task (fixed)
Describe versioning of plugins on DevGuide page
| Reported by: | Cinc-th | Owned by: | Ryan J Ollos | 
|---|---|---|---|
| Priority: | normal | Component: | TracHacks | 
| Severity: | normal | Keywords: | |
| Cc: | Ryan J Ollos | Trac Release: | 
Description
There is no guide for setting the version of a plugin so one can see different variations:
- x.y
- x.y.z
- x.ydev
- ...
Todo
There should be some guidance on the DevGuide page regarding versioning. This should include instructions how to use the dev tag in versions.
Attachments (0)
Change History (5)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
I came up with the following. If this is nice enough I'll change the DevGuide page accordingly.
Version of your plugin
You should use the major.minor.micro semantic versioning scheme also used by Trac (version identification). Some additional guidance can be found in PEP:0440.
In the event that a defect or packaging distribution error is discovered after a release is made, the micro version number should be incremented and a new minor release created. Note that a filename cannot be reused when uploading to PyPI more than once, so the micro version must also be incremented in the event of a packaging or uploading error.
Development releases are created directly from the current source. These are not uploaded to PyPI and usually done by the user to get the latest snapshot. To distinguish them from final releases a dev suffix should be added. This can be done for you by creating a setup.cfg file in the same directory where setup.py is located with the following contents.
[egg_info] tag_build = dev
Development cycle
The proposed development and release cycle is described here. The current final version is 1.0.1. The next planned release version is 1.2.0.
- In setup.pyspecify the next version:setup( name='YourPluginsName', version='1.2.0', [...] ) 
- in setup.cfgadd the development tag as described before:[egg_info] tag_build = dev 
You may proceed with development now. Whenever a user is creating his own development release it will be marked like YourPluginName-1.2.0.dev0-py3.8.egg.
When creating a release do the following:
- Temporarily remove the entry from setup.cfg:#[egg_info] #tag_build = dev 
- Create a release version which will be named like YourPluginName-1.2.0-py3.8.egg. If you want to publish to PyPI see the Instructions below.
- After publishing the release version prepare the next development cycle by increasing the version number in setup.pyand putting back the development tag insetup.cfg:setup( name='YourPluginsName', # Note that the version number was changed from 1.2.0 to 1.3.0 # which will be the next release. version='1.3.0', [...] ) [egg_info] tag_build = dev 
comment:3 Changed 5 years ago by
| Summary: | Describe versioning of plugins on DevGude page → Describe versioning of plugins on DevGuide page | 
|---|
Typo police...
comment:5 Changed 5 years ago by
| Resolution: | → fixed | 
|---|---|
| Status: | new → closed | 
Added descriptions of the development cycle and how to chose a plugins version to DevGuide@version 34.




Some subset of TracDev/ReleaseChecklist may be useful to copy.