Skip to content

Commit

Permalink
Update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
shanosborne committed Jan 23, 2020
1 parent 7373e47 commit 8dcb20d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ This repository follows the principles of ["Semantic Versioning"](https://semver
> 2. MINOR version when you add functionality in a backwards compatible manner, and
> 3. PATCH version when you make backwards compatible bug fixes.
When releasing a new version, developers should change the version number in `setup.py`, merge this change in a PR, and then release the package via the GitHub interface.

License
-------

Expand Down
23 changes: 17 additions & 6 deletions fgscountrate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,28 @@
from ._astropy_init import *
# ----------------------------------------------------------------------------

import os
import sys
from pkg_resources import get_distribution, DistributionNotFound
import pkg_resources

module_path = pkg_resources.resource_filename('fgscountrate', '')
setup_path = os.path.normpath(os.path.join(module_path, '../setup.py'))

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
# package is not installed
__version__ = "unknown"
with open(setup_path) as f:
data = f.readlines()

for line in data:
if 'VERSION =' in line:
__version__ = line.split(' ')[-1].replace("'", "").strip()

except FileNotFoundError:
print('Could not determine fgscountrate version')
__version__ = '0.0.0'

__minimum_python_version__ = "3.5"


class UnsupportedPythonError(Exception):
pass

Expand All @@ -25,4 +36,4 @@ class UnsupportedPythonError(Exception):

from .fgs_countrate_core import *
from .utils import *
from .conversions import *
from .conversions import *
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

from setuptools import setup, find_packages

VERSION = '1.0.0'

INSTALL_REQUIRES = [
'numpy',
'pytest',
Expand All @@ -16,7 +18,7 @@
]

setup(name='fgscountrate',
version='0.0',
version=VERSION,
description='JWST FGS countrate estimation',
long_description='JWST FGS countrate and magnitude estimation and related functionality.',
classifiers=[
Expand Down

0 comments on commit 8dcb20d

Please sign in to comment.