Skip to content

Commit

Permalink
Attempt to fix doc version
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpitkin committed Nov 24, 2017
1 parent db2bc00 commit cf83f8a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
17 changes: 13 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import sys
import os
import re

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -23,8 +24,6 @@
# Insert Requests' path into the system.
sys.path.insert(0, os.path.abspath('../../psrqpy'))

import psrqpy

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -65,10 +64,20 @@
# built documents.
#

def readfile(filename):
with open(filename, 'r') as fp:
filecontents = fp.read()
return filecontents

VERSION_REGEX = re.compile("__version__ = \"(.*?)\"")
CONTENTS = readfile(os.path.join("../../psrqpy", "__init__.py"))

VERSION = VERSION_REGEX.findall(CONTENTS)[0]

# The short X.Y version.
version = psrqpy.__version__
version = VERSION
# The full version, including alpha/beta/rc tags.
release = psrqpy.__version__
release = VERSION

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion psrqpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

""" A Python tool for interacting with the ATNF pulsar catalogue """

__version__ = "0.3.2"
__version__ = "0.3.3"

from .search import QueryATNF
from .pulsar import Pulsar, Pulsars
Expand Down

0 comments on commit cf83f8a

Please sign in to comment.