From 56f17d1759fba335212bfc125e8eba5b84b82bba Mon Sep 17 00:00:00 2001 From: "Ryan S. DeFever" Date: Mon, 12 Oct 2020 11:18:43 -0400 Subject: [PATCH] Pull version info from module level definition (#83) --- mosdef_cassandra/writers/inp_functions.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mosdef_cassandra/writers/inp_functions.py b/mosdef_cassandra/writers/inp_functions.py index e5bc480..a79f61d 100755 --- a/mosdef_cassandra/writers/inp_functions.py +++ b/mosdef_cassandra/writers/inp_functions.py @@ -2,10 +2,12 @@ import datetime import numpy as np import unyt as u +import mosdef_cassandra -import mosdef_cassandra.utils.convert_box as convert_box from unyt import dimensions + +import mosdef_cassandra.utils.convert_box as convert_box from mosdef_cassandra.utils.units import validate_unit, validate_unit_list @@ -61,13 +63,12 @@ def generate_input( # Check/convert kwargs units _check_kwarg_units(kwargs) _convert_kwarg_units(kwargs) - # Construct an input file section by section - inp_data = """ -! Generated by mosdef_cassandra version 0.2.1 on {} +! Generated by mosdef_cassandra version {} on {} """.format( - datetime.datetime.now() + mosdef_cassandra.__version__, + datetime.datetime.now(), ) # Extract some basic info