Skip to content

Commit 75a154c

Browse files
authored
Merge pull request #101 from sfinkens/feature-release
Prepare for next release
2 parents 4b7ed3e + aeaedd4 commit 75a154c

File tree

9 files changed

+55
-57
lines changed

9 files changed

+55
-57
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ dist
77
pygac.egg-info
88
etc/*.cfg
99
gapfilled_tles/
10+
pygac/version.py

LICENSE renamed to LICENSE.txt

File renamed without changes.

MANIFEST.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include etc/*
2-
include testdata/*
32
include gapfilled_tles/*
4-
include pygac/*.pyx
53
include bin/pygac-*
4+
include LICENSE.txt
5+
include README.md
6+
include pygac/version.py

RELEASING.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,37 @@
77
values. To get the previous version run `git tag` and select the most
88
recent with highest version number.
99

10-
```
11-
loghub pytroll/pygac -u <github username> -st v<previous version> -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes" -plg backwards-incompatibility "Backwards incompatible changes"
12-
```
10+
```
11+
loghub pytroll/pygac -u <github username> -st v<previous version> -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes" -plg backwards-incompatibility "Backwards incompatible changes"
12+
```
1313

14-
This command will create a CHANGELOG.temp file which need to be added
15-
to the top of the CHANGLOG.md file. The same content is also printed
16-
to terminal, so that can be copy-pasted, too. Remember to update also
17-
the version number to the same given in step 5. Don't forget to commit
18-
CHANGELOG.md!
14+
This command will create a CHANGELOG.temp file which need to be added
15+
to the top of the CHANGLOG.md file. The same content is also printed
16+
to terminal, so that can be copy-pasted, too. Remember to update also
17+
the version number to the same given in step 5. Don't forget to commit
18+
CHANGELOG.md!
1919

20-
5. Bump up the version with
20+
5. Create a tag with the new version number, starting with a 'v', eg:
2121

22-
```
23-
bumpversion <level>
24-
```
22+
```
23+
git tag -a v<new version> -m "Version <new version>"
24+
```
2525

26-
where level is one of `major`, `minor`, or `patch`.
26+
For example if the previous tag was `v0.9.0` and the new release is a
27+
patch release, do:
2728

29+
```
30+
git tag -a v0.9.1 -m "Version 0.9.1"
31+
```
32+
33+
See [semver.org](http://semver.org/) on how to write a version number.
2834

2935
6. push changes to github `git push --follow-tags`
30-
7. Verify travis tests passed
31-
8. Deploy sdist (and wheel) to PyPI
36+
7. Verify github action unittests passed.
37+
8. Create a "Release" on GitHub by going to
38+
https://github.com/pytroll/pygac/releases and clicking "Draft a new release".
39+
On the next page enter the newly created tag in the "Tag version" field,
40+
"Version X.Y.Z" in the "Release title" field, and paste the markdown from
41+
the changelog (the portion under the version section header) in the
42+
"Describe this release" box. Finally click "Publish release".
43+
9. Verify the GitHub actions for deployment succeed and the release is on PyPI.

pygac/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@
2121
# You should have received a copy of the GNU General Public License
2222
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2323

24+
try:
25+
from pygac.version import version as __version__ # noqa
26+
except ModuleNotFoundError:
27+
raise ModuleNotFoundError(
28+
"No module named pygac.version. This could mean "
29+
"you didn't install 'pygac' properly. Try reinstalling ('pip "
30+
"install').")
31+
2432
import logging
25-
from pygac.version import __version__ # noqa
2633
from pygac.configuration import get_config, read_config_file # noqa
2734
from pygac.runner import get_reader_class, process_file # noqa
2835

pygac/version.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2", 'setuptools_scm_git_archive']
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools_scm]
6+
write_to = "pygac/version.py"

setup.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
[options]
2+
setup_requires =
3+
setuptools_scm
4+
setuptools_scm_git_archive
5+
16
[flake8]
27
max-line-length = 120

setup.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,13 @@
2121
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2222
"""The setup module."""
2323

24-
try:
25-
with open("./README", "r") as fd:
26-
long_description = fd.read()
27-
except IOError:
28-
long_description = ""
29-
30-
3124
from setuptools import setup
32-
import imp
3325
import sys
3426
import os
3527

3628
if __name__ == '__main__':
37-
version = imp.load_source('pygac.version', 'pygac/version.py')
29+
with open("README.md", "r") as fd:
30+
long_description = fd.read()
3831

3932
requirements = ['docutils>=0.3',
4033
'numpy>=1.8.0',
@@ -52,10 +45,9 @@
5245
requirements.append('python-dateutil>=2.8.0')
5346

5447
setup(name='pygac',
55-
version=version.__version__,
5648
description='NOAA AVHRR GAC/LAC reader and calibration',
57-
author='Abhay Devasthale, Martin Raspaud',
58-
author_email='martin.raspaud@smhi.se',
49+
author='The Pytroll Team',
50+
author_email='pytroll@googlegroups.com',
5951
classifiers=["Development Status :: 4 - Beta",
6052
"Intended Audience :: Science/Research",
6153
"License :: OSI Approved :: GNU General Public License v3 " +
@@ -65,6 +57,7 @@
6557
"Topic :: Scientific/Engineering"],
6658
url="https://github.com/pytroll/pygac",
6759
long_description=long_description,
60+
long_description_content_type='text/markdown',
6861
license='GPLv3',
6962

7063
packages=['pygac'],
@@ -77,8 +70,6 @@
7770
scripts=[os.path.join('bin', item) for item in os.listdir('bin')],
7871
data_files=[('etc', ['etc/pygac.cfg.template']),
7972
('gapfilled_tles', ['gapfilled_tles/TLE_noaa16.txt'])],
80-
test_suite="pygac.tests.suite",
81-
tests_require=[],
8273
python_requires='>=3.6',
8374
zip_safe=False
8475
)

0 commit comments

Comments
 (0)