-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated README to include blocked-list and restructured * Adding minor suggestion by Guy Co-authored-by: Guy Dumais <dumais.guy@gmail.com> * update the readme with the blocked-list details * update with new REST route * Update README.md Co-authored-by: koryf <101284003+koryf@users.noreply.github.com> * Update README.md Co-authored-by: koryf <101284003+koryf@users.noreply.github.com> * keeping the old REST path until 3.0 is released. * Update pii_dict format according to deid 3.0.0beta3 * Fix failing pre-commit hook fails on directories (#17) * Add test for get flagged lines * Skip PII flag check for directories --------- Co-authored-by: ketakipai <ketaki@private-ai.com> Co-authored-by: ketakipai <110412492+ketakipai@users.noreply.github.com> Co-authored-by: Guy Dumais <dumais.guy@gmail.com> Co-authored-by: Guy Dumais <guy@private-ai.com> Co-authored-by: koryf <101284003+koryf@users.noreply.github.com>
- Loading branch information
1 parent
f2b7fa6
commit 8bf1476
Showing
8 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pytest==7.2.1 | ||
pytest-check==2.1.2 | ||
python-dotenv==0.19.0 | ||
requests==2.28.1 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Credit card number: 1234 5678 9101 1123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PII_CHECK:OFF | ||
Some content in between the flags. Ideally this content won't be checked for PII. | ||
Below is a dummy PII to check this | ||
Credit card number: 1234 5678 9101 1123 | ||
CVV: 123 | ||
PII_CHECK:ON | ||
|
||
Some content where the check will be performed. | ||
Credit card number: 1234 5678 9101 1123 | ||
CVV: 123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Here's some content. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./dir_with_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import pytest_check as check | ||
from pii_check.pii_check_hook import get_flagged_lines | ||
|
||
|
||
def test_get_flagged_lines(): | ||
files = [ | ||
"tests/test_data/dir_with_files/file_with_pii.txt", "tests/test_data/dir_with_files/file_without_pii.txt", | ||
"tests/test_data/dir_with_files/file_with_pii_flag_on", "tests/test_data/dir_with_files/file_with_pii_flag_off", | ||
"tests/test_data/dir_with_files/file_with_pii_flag", "tests/test_data/symlink_of_dir_with_files" | ||
] | ||
res = get_flagged_lines(files) | ||
check.equal(res, [(1, 6, 'tests/test_data/dir_with_files/file_with_pii_flag')]) | ||
|