Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version numbers in py files pulled from VERSION.txt #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.3.4
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
project = "FIFE"
copyright = "2018 - 2020, Institute for Defense Analyses"
author = "Institute for Defense Analyses"
release = "1.3.4"
release = open("VERSION.txt", "r").read()
extensions = ["sphinx.ext.napoleon", "sphinx.ext.autodoc", "m2r"]
html_theme = "sphinx_rtd_theme"
source_suffix = [".rst", ".md"]
3 changes: 1 addition & 2 deletions fife/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
PARTICULAR PURPOSE. See the GNU Affero General Public License for more details
(a copy is included in the LICENSE file).
"""

__version__ = "1.3.4"
__version__ = open("VERSION.txt").read()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does open need a second "r" argument?

Copy link
Member

@jamesmckownbishop jamesmckownbishop Oct 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work when someone calls import fife; fife.__version__? I think it won't because VERSION.txt is in the parent directory.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="fife",
version="1.3.4",
version=open("VERSION.txt", "r").read(),
description=(
"Finite-Interval Forecasting Engine: Machine learning models "
"for discrete-time survival analysis and multivariate time series "
Expand Down