Skip to content

Commit

Permalink
Correct docstrings for tuple return types
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjholland committed May 17, 2024
1 parent ca62879 commit b660dbb
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
4 changes: 3 additions & 1 deletion pyprobe/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ def get_data_paths(
These must be keys of the cell info.
Returns:
Tuple[str, str]: The input and output paths for the data file.
Tuple[str, str]:
- str: The input path for the data file.
- str: The output path for the parquet file.
"""
if isinstance(filename, str):
filename_str = filename
Expand Down
3 changes: 2 additions & 1 deletion pyprobe/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def filter_numerical(
Args:
_data (pl.LazyFrame | pl.DataFrame): A LazyFrame object.
column (str): The column to filter on.
indices (int, list): A number or a list of numbers to filter by.
indices (Tuple[Union[int, range], ...]): A tuple of index
values to filter by.
"""
index_list = []
for index in indices:
Expand Down
4 changes: 3 additions & 1 deletion pyprobe/methods/differentiation/feng_2020.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def dQdV(
the parameters for the method
Returns:
Result: a result object containing the normalised incremental capacity
Tuple[NDArray[np.float64], NDArray[np.float64]]:
- NDArray: The voltage values.
- NDArray: The incremental capacity values.
"""
n = len(voltage)
V_range = voltage.max() - voltage.min()
Expand Down
6 changes: 6 additions & 0 deletions pyprobe/methods/ocv_fitting/Simple_OCV_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ def calc_electrode_capacities(
pe_stoich_limits (NDArray[np.float64]): The cathode stoichiometry limits.
ne_stoich_limits (NDArray[np.float64]): The anode stoichiometry limits.
cell_capacity (NDArray[np.float64]): The cell capacity.
Returns:
Tuple[float, float, float]:
- NDArray: The cathode capacity.
- NDArray: The anode capacity.
- NDArray: The stoichiometry offset.
"""
pe_capacity = cell_capacity / (pe_stoich_limits[1] - pe_stoich_limits[0])
ne_capacity = cell_capacity / (ne_stoich_limits[1] - ne_stoich_limits[0])
Expand Down
9 changes: 5 additions & 4 deletions pyprobe/procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ def process_readme(
readme_path (str): The path to the README.yaml file.
Returns:
dict: The titles of the experiments inside a procedure.
Fomat {title: experiment type}.
list: The cycle numbers inside the procedure.
list: The step numbers inside the procedure.
Tuple[Dict[str, str], List[int], List[int]]:
- dict: The titles of the experiments inside a procedure.
Format {title: experiment type}.
- list: The cycle numbers inside the procedure.
- list: The step numbers inside the procedure.
"""
with open(readme_path, "r") as file:
readme_dict = yaml.safe_load(file)
Expand Down

0 comments on commit b660dbb

Please sign in to comment.