Skip to content

Commit

Permalink
Use timing and levels sheets name when applying rather than path (#282)
Browse files Browse the repository at this point in the history
* Use timing and levels sheets name when applying rather than path

Signed-off-by: Jonathan Mendez <[email protected]>

* Simplify code per PR review

Signed-off-by: Jonathan Mendez <[email protected]>

* Remove unnecessary helper function per PR review

Signed-off-by: Jonathan Mendez <[email protected]>

---------

Signed-off-by: Jonathan Mendez <[email protected]>
  • Loading branch information
jonathanmendez authored Jun 8, 2023
1 parent 57ddccb commit a67430f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/nidigital_spi/measurement.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ def measure(
str(_resolve_relative_path(service_directory, pattern_file_path)),
)

selected_sites.apply_levels_and_timing(
str(_resolve_relative_path(service_directory, levels_file_path)),
str(_resolve_relative_path(service_directory, timing_file_path)),
)
levels_file_name = pathlib.Path(levels_file_path).stem
timing_file_name = pathlib.Path(timing_file_path).stem
selected_sites.apply_levels_and_timing(levels_file_name, timing_file_name)
selected_sites.burst_pattern(start_label="SPI_Pattern")
site_pass_fail = selected_sites.get_site_pass_fail()
passing_sites = [site for site, pass_fail in site_pass_fail.items() if pass_fail]
Expand Down Expand Up @@ -151,8 +150,7 @@ def _create_nidigital_session(
def _resolve_relative_path(
directory_path: pathlib.Path, file_path: Union[str, pathlib.Path]
) -> pathlib.Path:
if not isinstance(file_path, pathlib.Path):
file_path = pathlib.Path(file_path)
file_path = pathlib.Path(file_path)
if file_path.is_absolute():
return file_path
else:
Expand Down

0 comments on commit a67430f

Please sign in to comment.