Skip to content

Commit a43fc54

Browse files
authored
Merge pull request #85 from dpgrote/change_the_versioning
Change the versioning
2 parents 854ab37 + 147e470 commit a43fc54

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

PICMI_Python/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,21 @@ Some packages specify the version of the standard that is to be used. For new fe
3535
be updated. The update has several steps, updating the version number, adding a tag, pushing the changes, and updating the version
3636
of PyPI.
3737

38-
Currently, the version number is modified by hand by modifying the number in the setup.py file, incrementing the third
39-
number. After changing the file, make a commit with the change with a comment like "Version 0.0.16", updating the number of course.
38+
Currently, the version number is modified by hand by modifying the number in the `version.py` file, incrementing the second
39+
number, the minor release version. After changing the file, make a commit with the change with a comment like "Release 0.22.0",
40+
updating the version number of course.
4041
Please don't make any other changes in the commit. Note that it is ok to push a version update directly to the main branch assuming
4142
it has been approved.
4243

4344
Next, add a tag and push the changes to the repo:
4445

4546
```
46-
git tag -a 0.0.16 -m "Release 0.0.16"
47+
git tag -a 0.22.0 -m "Release 0.22.0"
4748
git push origin
4849
git push origin --tags
4950
```
5051

51-
Change the tag number as needed.
52+
Change the tag number as needed to match the version number.
5253

5354
The final step is to update the version on PyPI. It is recommended to use the twine command. Here are the commands:
5455

PICMI_Python/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from .version import __version__
2+
13
from .base import *
24
from .diagnostics import *
35
from .fields import *

PICMI_Python/setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
from setuptools import setup
66

7+
import version
8+
79
# Read the package requirements from the requirements.txt file
810
with open('requirements.txt') as f:
911
install_requires = [ line.strip('\n') for line in f.readlines() ]
1012

1113
setup(name = 'picmistandard',
12-
version = '0.0.22',
14+
version = version.__version__,
1315
description = 'Python base classes for PICMI standard',
1416
platforms = 'any',
1517
packages = ['picmistandard'],

PICMI_Python/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.22.0'

0 commit comments

Comments
 (0)