Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
path: dist/

- name: Sign Distribution
uses: sigstore/gh-action-sigstore-python@v2.1.1
uses: sigstore/gh-action-sigstore-python@v3.4.0
with:
inputs: |
./dist/*.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "hec-dss-python"
version = "0.1.29"
version = "0.1.30"
description = "Python wrapper for the HEC-DSS file database C library."
authors = ["Hydrologic Engineering Center"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = hecdss
version = 0.1.29
version = 0.1.30
author = Hydrologic Engineering Center
author_email =hec.dss@usace.army.mil
description = Python wrapper for the HEC-DSS file database C library.
Expand Down
320 changes: 178 additions & 142 deletions src/hecdss/dss_csv.py

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions src/hecdss/dsspath.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@ def print(self):
print("e:" + self.path.E)
print("f:" + self.path.F)

def path_to_list(self) -> list[str]:
"""
Convert the DSS path to a list of its components.

Returns:
list: A list containing the components of the DSS path.
"""
return [self.A, self.B, self.C, self.D, self.E, self.F]

def path_to_dict(self) -> dict[str, str]:
"""
Convert the DSS path to a dictionary of its components.
Expand Down
5 changes: 2 additions & 3 deletions src/hecdss/irregular_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,15 @@ def print_to_console(self):
line += f", Note: {self.notes[i]}"
print(line)

def to_csv(self, file_path: str, with_metadata: bool = True) -> None:
def to_csv(self, file_path: str) -> None:
"""
Exports the IrregularTimeSeries object to a .csv file.

Parameters:
file_path (str): The path to the .csv file where the data will be exported.
with_metadata (bool): Whether to include metadata in the exported file.
"""
from .dss_csv import timeseries_to_csv
timeseries_to_csv(self, file_path, with_metadata)
timeseries_to_csv(self, file_path)
print(f"Wrote IrregularTimeSeries to .csv file at {file_path}.")

@staticmethod
Expand Down
5 changes: 2 additions & 3 deletions src/hecdss/paired_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ def curve_count(self):
# values is ROW-MAJOR, each sublist represents a row of curve values for each ordinate
return len(self.values[0])

def to_csv(self, file_path: str, with_metadata: bool = True) -> None:
def to_csv(self, file_path: str) -> None:
"""
Exports the PairedData instance to a .csv file.

Parameters:
file_path (str): The path to the .csv file where the data will be exported.
with_metadata (bool): Whether to include metadata in the exported file.
"""
from .dss_csv import paired_data_to_csv
paired_data_to_csv(self, file_path, with_metadata)
paired_data_to_csv(self, file_path)
print(f"Wrote PairedData to .csv file at {file_path}.")

# def to_data_frame(self, include_index=False):
Expand Down
5 changes: 2 additions & 3 deletions src/hecdss/regular_timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,15 @@ def print_to_console(self):
row += f", {self.notes[i]}"
print(row)

def to_csv(self, file_path: str, with_metadata: bool = True) -> None:
def to_csv(self, file_path: str) -> None:
"""
Exports the RegularTimeSeries data to a .csv file.

Args:
file_path (str): The path to the .csv file where the data will be exported.
with_metadata (bool): Whether to include metadata in the exported file.
"""
from .dss_csv import timeseries_to_csv
timeseries_to_csv(self, file_path, with_metadata)
timeseries_to_csv(self, file_path)
print(f"Wrote RegularTimeSeries to .csv file at {file_path}.")

def _get_interval_interval(self):
Expand Down
Loading
Loading