Skip to content

Commit

Permalink
update manifest
Browse files Browse the repository at this point in the history
  • Loading branch information
Koaha committed Nov 27, 2024
1 parent 5f18c90 commit 51d7091
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 39 deletions.
8 changes: 7 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
include LICENSE
include Readme.md
include Readme.md
include vital_sqi/resource/sqi_dict.json
include vital_sqi/resource/rule_dict.json
include tests/test_data/sqi_dict.json
include tests/test_data/rule_dict.json
include vital_sqi/resource/peak_dectector_list.txt
include vital_sqi/resource/citations.bib
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
'dateparser>=1.0.0',
'pyflowchart>=0.1.3'],
python_requires = '>=3.7',
include_package_data=True,
package_data={
"vital_sqi": ["resource/*.json"],
},
zip_safe = False,
url = 'https://github.com/meta00/vital_sqi',
license = 'MIT',
Expand Down
76 changes: 38 additions & 38 deletions vital_sqi/pipeline/pipeline_highlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,41 +394,41 @@ def get_qualified_ecg(

return signal_obj

import tempfile

if __name__ == "__main__":
# Example-based input files and parameters
file_in = os.path.abspath("tests/test_data/ppg_smartcare.csv")
# file_in = os.path.abspath("tests/test_data/example.edf")
sqi_dict = os.path.abspath("tests/test_data/sqi_dict.json")
rule_dict_filename = os.path.abspath("tests/test_data/rule_dict_test.json")
ruleset_order = {2: "skewness_1", 1: "perfusion"}
# output_dir = tempfile.gettempdir()
output_dir = "D:\Workspace\Oucru\\vital_sqi\outdir"

# Call the function under test
# signal_obj = get_qualified_ecg(
# file_name=file_in,
# sqi_dict_filename=sqi_dict,
# # signal_idx=6,
# # timestamp_idx=0,
# file_type="edf", # File type explicitly defined as in the example
# duration=30, # Duration parameter passed
# rule_dict_filename=rule_dict_filename,
# ruleset_order=ruleset_order,
# output_dir=output_dir,
# )

signal_obj = get_qualified_ppg(
file_name=file_in,
sqi_dict_filename=sqi_dict,
signal_idx=6,
timestamp_idx=0,
# file_type="edf", # File type explicitly defined as in the example
duration=30, # Duration parameter passed
rule_dict_filename=rule_dict_filename,
ruleset_order=ruleset_order,
output_dir=output_dir,
)

print(signal_obj.signals[0:100])
# import tempfile

# if __name__ == "__main__":
# # Example-based input files and parameters
# file_in = os.path.abspath("tests/test_data/ppg_smartcare.csv")
# # file_in = os.path.abspath("tests/test_data/example.edf")
# sqi_dict = os.path.abspath("tests/test_data/sqi_dict.json")
# rule_dict_filename = os.path.abspath("tests/test_data/rule_dict_test.json")
# ruleset_order = {2: "skewness_1", 1: "perfusion"}
# # output_dir = tempfile.gettempdir()
# output_dir = "D:\Workspace\Oucru\\vital_sqi\outdir"

# # Call the function under test
# # signal_obj = get_qualified_ecg(
# # file_name=file_in,
# # sqi_dict_filename=sqi_dict,
# # # signal_idx=6,
# # # timestamp_idx=0,
# # file_type="edf", # File type explicitly defined as in the example
# # duration=30, # Duration parameter passed
# # rule_dict_filename=rule_dict_filename,
# # ruleset_order=ruleset_order,
# # output_dir=output_dir,
# # )

# signal_obj = get_qualified_ppg(
# file_name=file_in,
# sqi_dict_filename=sqi_dict,
# signal_idx=6,
# timestamp_idx=0,
# # file_type="edf", # File type explicitly defined as in the example
# duration=30, # Duration parameter passed
# rule_dict_filename=rule_dict_filename,
# ruleset_order=ruleset_order,
# output_dir=output_dir,
# )

# print(signal_obj.signals[0:100])

0 comments on commit 51d7091

Please sign in to comment.