-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows compat #130
Windows compat #130
Conversation
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
cli/ecqm_dedupe.py
Outdated
@@ -56,8 +57,12 @@ def dedupe_data(fmt,bad_data_path, output_path,linker=None): #pylint: disable=un | |||
unique_records = deduped_record_mapping.drop_duplicates(subset=['cluster_id']) | |||
#cache results | |||
#TODO: make platform agnostic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pylint] reported by reviewdog 🐶
W0511: TODO: make platform agnostic (fixme)
Signed-off-by: Isaac Milarsky <imilarsky@gmail.com>
import pandas as pd | ||
import click | ||
from splink import block_on | ||
from deduplifhirLib.utils import use_linker | ||
|
||
|
||
CACHE_DIR = "/tmp/" | ||
CACHE_DIR = tempfile.gettempdir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From Python Docs:
A platform-specific location:
On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
Fix Paths Not Being Windows-Friendly
Problem
Right now the Paths in the CLI assume unix style paths. Although, we want to support Windows users.
Solution
Used the os and tempfile modules to make the CLI platform agnostic.
Result
Summary:
os.path.join
Test Plan
Sarah will run this on her Windows machine 🪟