Skip to content

Commit

Permalink
Merge pull request #859 from IanCa/develop
Browse files Browse the repository at this point in the history
Minor fixes to install/misc
  • Loading branch information
VisLab authored Feb 17, 2024
2 parents 0ecd8c9 + 1db4823 commit 569e5a8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ exclude_patterns:
- "**/spec/"
- "**/test/"
- "**/tests/"
- "**/spec_tests/"
- "**/docs/"
- "Tests/"
- "**/vendor/"
Expand Down
4 changes: 2 additions & 2 deletions hed/models/base_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, file, file_type=None, worksheet_name=None, has_column_names=T
""" Constructor for the BaseInput class.
Parameters:
file (str or file-like or pandas dataframe): An xlsx/tsv file to open.
file (str or file-like or pd.Dataframe): An xlsx/tsv file to open.
file_type (str or None): ".xlsx" (Excel), ".tsv" or ".txt" (tab-separated text).
Derived from file if file is a filename. Ignored if pandas dataframe.
worksheet_name (str or None): Name of Excel workbook worksheet name to use.
Expand Down Expand Up @@ -554,7 +554,7 @@ def _open_dataframe_file(self, file, has_column_names, input_type):
elif input_type in self.TEXT_EXTENSION:
try:
self._dataframe = pandas.read_csv(file, delimiter='\t', header=pandas_header,
dtype=str, keep_default_na=True, na_values=["", "null"])
dtype=str, keep_default_na=True, na_values=("", "null"))
except Exception as e:
raise HedFileError(HedExceptions.INVALID_FILE_FORMAT, str(e), self.name) from e
# Convert nan values to a known value
Expand Down
4 changes: 0 additions & 4 deletions hed/models/spreadsheet_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ def __init__(self, file=None, file_type=None, worksheet_name=None, tag_columns=N
- An invalid dataframe was passed with size 0.
- An invalid extension was provided.
- A duplicate or empty column name appears.
:raises OSError:
- Cannot open the indicated file.
:raises KeyError:
- The specified worksheet name does not exist.
"""

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ include = ["hed*"]
namespaces = false

[tool.setuptools.package-data]
hed = ["schema/schema_data/*.xml"]
hed = ["schema/schema_data/*.xml", "resources/*.png"]

[tool.codespell]
skip = '*.git,*.pdf,*.xml,*.mediawiki,*.svg,versioneer.py,venv*,*.tsv,*.yaml,*.yml,*.json,*.rdf,*.jsonld,spec_tests'
Expand Down

0 comments on commit 569e5a8

Please sign in to comment.