Prepost
Merging the prepost module into the toolbox. Some aspects in dlc.high_level need to re-evaluated at a later stage: the year and k_shape parameters should be part of the dlc post processing configuration file.
Merge request reports
Activity
41 value = sheet.cell(row_index, 1).value 42 setattr(self, name, value) 40 df_vars = pd.read_excel(self.filename, sheetname='Variables', 41 index_col='Name') 42 for name, value in zip(df_vars.index, df_vars.Value.values): 43 setattr(self, name.lower(), value) 43 44 if not hasattr(self, "res_path"): 44 raise Warning("The 'Variables' sheet of '%s' must contain the variable 'res_path' specifying the path to the result folder" % self.filename) 45 raise Warning("The 'Variables' sheet of '%s' must contain the " 46 "variable 'res_path' specifying the path to the " 47 "result folder" % self.filename) 45 48 self.res_path = os.path.join(os.path.dirname(self.filename), self.res_path) 46 49 47 50 #DLC sheet 48 sheet = wb.sheet_by_name("DLC") 49 self.dlc_df = pd.DataFrame({sheet.cell(0, col_index).value.lower(): [sheet.cell(row_index, col_index).value for row_index in range(2, sheet.nrows) if sheet.cell(row_index, 0).value != ""] for col_index in range(sheet.ncols)}) Added 1 commit:
- 2cb2166f - fixing a few issues in DLCHighLevel
mentioned in commit b50268ec
- setup.py 0 → 100644
7 puts up a scaffold for your new Python project. Learn more under: 8 http://pyscaffold.readthedocs.org/ 9 """ 10 11 from __future__ import division, absolute_import, print_function 12 13 # numpy.distutils will figure out if setuptools is available when imported 14 # this allows us to combine setuptools use_pyscaffold=True and f2py extensions 15 import setuptools 16 from numpy.distutils.core import setup 17 #from numpy.distutils.misc_util import Configuration 18 19 import sys 20 21 22 def setup_package_pyscaffold(): PyScaffold is just a tool that helps configuring setuptools in clean way (automatic version string setting from git, requirements/dependencies are read from a requirements.txt file, configuring of build paths, etc). It does not deviate from the standards from that respect. It is a pure python package so it is not a heavy dependency. I don't feel too strong about it either way, just thought it was convenient for setting up a package. You might argue why not learn how to properly configure setuptools all the way. I think this is just a bit shorter/quicker. I don't mind figuring out how to get the same config using setuptools directly though.