Skip to content

Commit

Permalink
clean up and add notes to history #1327
Browse files Browse the repository at this point in the history
  • Loading branch information
emlys committed Jun 15, 2023
1 parent 2f78045 commit 8d61c18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 6 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,16 @@ Unreleased Changes
* Updated the package installation instructions in the API docs for clarity
and also to highlight the ease of installation through ``conda-forge``.
https://github.com/natcap/invest/issues/1256
* ``utils.build_lookup_from_csv`` now accepts kwargs for ``pandas.read_csv``
(`#1319 <https://github.com/natcap/invest/issues/1319>`_)
* ``utils.build_lookup_from_csv`` has been deprecated and its functionality
has been merged into ``utils.read_csv_to_dataframe``
(`#1319 <https://github.com/natcap/invest/issues/1319>`_),
(`#1327 <https://github.com/natcap/invest/issues/1327>`_)
* Workbench
* Fixed a bug where sampledata downloads failed silently (and progress bar
became innacurate) if the Workbench did not have write permission to
the download location. https://github.com/natcap/invest/issues/1070
* Forest Carbon
* The biophysical table is now case-insensitive.
* HRA
* Fixed a bug in HRA where the model would error when all exposure and
consequence criteria were skipped for a single habitat. The model now
Expand Down
4 changes: 2 additions & 2 deletions src/natcap/invest/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,8 @@ def expand_path(path, base_path):


def read_csv_to_dataframe(
path, index_col=None, usecols=None, cols_to_lower=True,
vals_to_lower=True, expand_path_cols=[], sep=None, engine='python',
path, index_col=False, usecols=None, cols_to_lower=True,
vals_to_lower=True, expand_path_cols=None, sep=None, engine='python',
encoding='utf-8-sig', **kwargs):
"""Return a dataframe representation of the CSV.
Expand Down
3 changes: 1 addition & 2 deletions src/natcap/invest/wave_energy.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,8 +743,7 @@ def execute(args):
# arrays. Also store the amount of energy the machine produces
# in a certain wave period/height state as a 2D array
machine_perf_dict = {}
machine_perf_data = utils.read_csv_to_dataframe(
args['machine_perf_path'], cols_to_lower=False, vals_to_lower=False)
machine_perf_data = utils.read_csv_to_dataframe(args['machine_perf_path'])
# Get the wave period fields, starting from the second column of the table
machine_perf_dict['periods'] = machine_perf_data.columns.values[1:]
# Build up the height field by taking the first column of the table
Expand Down

0 comments on commit 8d61c18

Please sign in to comment.