Commit Graph

50 Commits

Author SHA1 Message Date
Sharon Hart
fc6f198c1d Remove run.bat (#1626) 2025-06-11 13:16:06 +03:00
Sharon Hart
4752166f76 From Pipenv to Poetry (#1391)
* Add more tomls

* fix cli versioning

* Drop pipfile

* Drop pipfile

* Drop pipfile

* keep pipfile

* keep pipfile

* without pipfile

* typo

* typo

* typo

* typo

* typo

* typo

* typo

* typo

* readmes

* drop requires

* add requires

* w/o readme

* w/o readme

* w/o readme

* pdm run

* migrate to pdm

* migrate to pdm

* readme rename

* Fix versioning and docker building

* Fix versioning and docker building

* Fix versioning and docker building

* change build be

* change build be

* PDM_VENV_WITH_PIP

* source-includes

* source-includes

* source-includes

* compose logs

* compose logs

* skip hanging

* skip hanging

* skip hanging

* skip hanging

* readd test

* fix test

* remove test

* remove test

* docs and dockerfiles

* Try with poetry

* Try with poetry

* Try with poetry

* Try with poetry

* drop numpy

* version

* no-root

* fix version extraction

* docs and dockerfiles

* revert test

* comment hanging test

* try clause
2024-06-02 12:59:21 +03:00
Sharon Hart
cb0184afa2 Add Ruff linter + Apply Ruff fix (#1379)
* Add Ruff linter + Apply Ruff fix

* Move up linting

* Move up linting

* Move up linting

* docs

* docs
2024-05-12 10:16:47 +03:00
Sharon Hart
18090c60c6 install from pipfile (#1152) 2023-08-23 11:27:33 +03:00
Sharon Hart
d459d44ff5 Lock with 3.8, drop building on 3.7 for 3.11 (#1080) 2023-06-01 15:32:33 +03:00
Avishay Balter
e561c465d1 remove --sequential from pipenv sync (#921) 2022-09-22 11:53:53 +03:00
Omri Mendels
70c9c7ce12 Bumped PIL to version 9.0.0 and replaced python 3.6 with 3.10 (#815) 2022-01-20 13:54:49 +02:00
Omri Mendels
492128123a Update development.md (#769) 2021-09-13 14:34:30 +03:00
Omri Mendels
e5d83e4c9b Minor bug fixes in docs (#580) 2021-03-01 18:20:30 +02:00
Omri Mendels
61ed5452b8 Feature/rename interpretability (#553) 2021-02-25 13:00:45 +02:00
Nava Vaisman Levy
a229ec79da Add usage samples (#551)
* usage samples

* add curl sample, make postman collection downloadable
2021-02-24 19:37:09 +02:00
Sharon Hart
ed2073bf13 Development Documentation (#542)
* Development documentation additions

* Move development guidelines

* Move development guidelines

* Move development guidelines

* Update docs/development.md

Co-authored-by: Nava Vaisman Levy <navalev@users.noreply.github.com>

* CR

Co-authored-by: sharon <sharon.hart@microsoft.com>
Co-authored-by: Nava Vaisman Levy <navalev@users.noreply.github.com>
2021-02-23 12:57:05 +02:00
Nava Vaisman Levy
632bae171e Image redactor fix pipfile lock (#534) 2021-02-21 10:14:06 +02:00
Omri Mendels
800975f6c0 Added mkdocs for docs generation (#531) 2021-02-18 13:39:26 +02:00
Sharon Hart
b577c34d91 Rename to Image Redactor (#523)
* Rename to Image Redactor

* Rename to Image Redactor

* placeholder fix

* Rebase

* uppercase

* remove requirements.txt

* Changed files

Co-authored-by: sharon <sharon.hart@microsoft.com>
2021-02-16 18:13:35 +02:00
Sharon Hart
ae22909c7b Add testing documentation (#514)
* Add tests documentation

* some modifications

* cr changes - spacing typos

Co-authored-by: sharon <sharon.hart@microsoft.com>
Co-authored-by: Omri Mendels <omri374@users.noreply.github.com>
2021-02-15 13:13:17 +02:00
Sharon Hart
e9db047beb Add local build script (#511)
* Add run script

* Add documentation

* Add documentation

* Add documentation

* Add documentation

* Add env file with defaults for compose

* Add condition

* Sleep a minute before running tests

* Update script

Co-authored-by: sharon <sharon.hart@microsoft.com>
2021-02-14 17:33:31 +02:00
omri374
48b959e99e reverting changes for a different PR 2021-01-31 12:15:06 +02:00
omri374
119bc04c11 docs refresh + placeholders 2021-01-31 11:16:23 +02:00
sharon
7ba6a671c0 fix documentation 2021-01-14 10:48:18 +02:00
sharon
46d26478a6 Add pre-commit documentation 2021-01-13 15:40:23 +02:00
omri374
5582665315 Removed everything but the analyzer for V2 2021-01-03 12:12:52 +02:00
Zeid Marouf
f112837e93 docs: fix typo in development instructions (#365) 2020-09-07 08:31:30 +03:00
David Pollack
e5fe414fd6 [WIP] analyzer - multiple languages and nlp engines (#312)
* analyzer - multiple languages and nlp engines

Initially this was my attempt to use stanza, which is an nlp engine by
Stanford.  But generally, it's an update to allow for one to add NLP
engines and custom recognizers more easily.  Specifically, I
standardized the format of the recognizers, removed use of global
variables when possible, and removed a lot of hard-coding of defaults.

I am thinking of using presidio for several non-english projects at work
and these are several of the changes that I made.

Below is a list of the changes in list form:

* make spacy and/or stanza optional
  * remove requirement of en_core_web_lg from install
* allow predefined recognizers to take parameters
  * this allows for easily using these as non-english recognizers
* create config files for different NLP engines
* create tests for stanza
* make all spacy and stanza tests optional
* create a Dockerfile for an anaconda-based image
  * pytorch is built with MKL and is much faster on cpu from conda
* completely rewrote the IBAN recognizer
  * the current version only recognizes IBANs if they are the entirety
    of the string.  This version will find IBANs in sentences.
* fixed some tests
* created a `run.sh` file, so just run dockers without rebuilding them

"Breaking" Changes:

* I would like to use [black](https://github.com/psf/black), but it's
  not super friendly with pylint.  My suggestion is to drop pylint and
  use black instead.
* Default spacy model is `en` rather than `en_core_web_lg` and no spacy
  models are downloaded by default.  The idea is to let the user choose
  which models they want.  For non-english users, it saves a lot of time
  at installation because you don't need to install the large spacy
  model that you aren't using.

Signed-off-by: David Pollack <d.pollack@solvemate.com>

* spacy required, spacy-stanza, update tests

* made spacy required
* using spacy-stanza for stanza models
* refactor tests to use pytest
* make one test reliant on big model optional

* refactor tests to pytest

All tests have been refactored to use pytest.  Previously, there was a
mix of unittest, pytest and miscellaneous global initializations.  This
commit moves everything to pytest.  There is now extensive use of
fixtures instead of global variables and parametrized tests instead of
duplicated code for each test.  The major difference is that
parametrized tests are not individually named.

* changes based on PR comments

* fixes to Dockerfiles

* remove sys.path.append

* fix pipeline errors (i.e. install spacy model)

this installs the big spacy model by default in the Docker and the Azure
pipeline.

* fix rebase errors

* use Pattern class

* update docs

* use PresidioLogger

* linting fixes

* move imports to top level

* edits based on PR-review

* add documentation and doc strings
* change yaml field names to be more logical

* fix pipelines based on PR comments
2020-07-22 17:58:44 +03:00
Omri Mendels
569b1000e3 Update development.md 2020-07-19 13:09:05 +03:00
Omri Mendels
f44dee613a Update development.md 2020-07-19 12:10:28 +03:00
Nava Vaisman Levy
0b5148bf09 Documentation Minor Updates (#334)
* doc minor updates

* open swagger sepc with swagger UI

* docs reformatting

* exclude docs from ci trigger

* fix swagger editor link
2020-07-07 11:37:22 +03:00
balteravishay
f6e5ae408e Pull Request Validation Changes (#284)
* python and tag

* full version

* pythonver

* .

* .

* version

* continueOnError

* .

* .

* .

* indent

* pyton version mark unused tasks

* only golangdockerfile

* python some back

* git diff or

* or

* or

* change python steps.

* .

* version again

* .

* .

* .

* .

* version

* script

* merge python

* '

* new build_deps

* debug

* debug

* .

* .

* debug

* .

* .

* .

* .

* publish condition

* .

* .

* fixes

* .

* pull right label

* fix labels

* .

* .

* cache from for golang base

* remove temp code

* paralllel deps

* fix vars

* .

* change from source to .

* file docs

* build release docs

* .

* .

* new order

* SetBuildDep

* fixes

* .

* .

* ץ

* depends on for base container

* fix

* .

* fix golang

* fix branch names

* test

* display name

* version

* change analyzer folder name only

* add credscan

* update docs

* change package name

* fix imports

* variable group name

* lint errs

* fix

* lint

* adding tests dockerfile

* .

* fixes PR

* golang env

* w display name

* .

* fix

* names first

* indent

* .

* .

* fix all names and inline script

* fix targettype

* .

* .

* golang env

* .

* .

* fix last PR

* import

* .

* build and use tests container

* .

* fix python code

* functional tests

* try separate twine in CI

* fix dockerfile

* with template

* indent

* .

* remove dep ensure

* indent

* no working folder

* remove TTY from docker

* fix main.py

* try publish

* fix if

* fix

* names

* publish functional test results

* fix authenticate to twine

* fix name

* display name

* smaller dockerfile

* colon

* update to v1

* parallel runs

* without param

* wait for tasks

* fix extra s

* wait by name

* only wait for analyzer

* temp upload wheel without pararm

* try with home

* add verbose

* wait for analyzer

* opt out w. TODO

* output test results

* .

* export results

* test

* with param upload only

* with all

* fix sc

* without wheel

* start build with security analysis.

* move to right place

* update makefile

* fix makefile

* fix makefile

* only python

* only python

* fix publish

* .

* dist

* fix dist

* artifact_is_ado

* fix dist

* presidio-analyzer*

* maintain wheel

* copyt wheel

* PythonStage

* .

* fix

* FIX

* .

* dont build container

* fix

* fix get wheel

* without copy

* mv

* display name

* fix dist publish

* with all

* with all

* remove hard coded values

* maintain go tests in local environment

* fix test results file

* run presidio makefile

* workingDirectory

* remove registry when local build

* with registry

* fix indent

* tagging base image

* fix python env and go test folder

* fix

* dep ensure

* install dep

* with doc and pr stage only

* with stages

* with docs and stages

* set fail on error

* with tesseract-ocr

* sudo

* without sudo

* with sudo on install and build

* try fix build

* copy after dep ensure

* shopt

* .

* try with export

* remove extra files

* new order

* new order

* test

* .

* .

* go get

* with ls

* ls

* debug locally

* debug

* fix

* debug

* debug

* remove go get

* mod vendor

* dep specific

* remove mod flag

* echo

* debugs

* unset goroot

* .

* with gobin

* fix dep

* without sudo

* ocr dev

* libtesseract-dev

* remove all debug

Co-authored-by: Omri Mendels <omri374@users.noreply.github.com>
2020-03-24 22:13:19 +02:00
balteravishay
b0bdea321a Multi stage pipeline (#266) 2020-03-09 11:06:50 +02:00
Omri Mendels
2d8c7d33df Fixed links (#268) 2020-03-03 22:30:41 +02:00
Omri Mendels
80fea8f1c5 Update development.md 2019-12-31 22:22:01 +02:00
Omri Mendels
4565feeb5d added TOC and windows clarifications 2019-12-16 16:54:54 +02:00
Omri Mendels
5890a9a4fe Update development.md
Rearranged stuff, moved the grpc stuff to the genproto repo (see PR there). Emphasized what's optional and what's not
2019-12-16 16:54:54 +02:00
balteravishay
6b4acdd7a5 Fix Current make file throws errors if container registry is undefined (#226) 2019-09-23 12:04:12 +03:00
Omri Mendels
cbcfe5ff53 Added information on updating genproto (#199)
* Added information on updating genproto
2019-08-24 19:53:12 +03:00
Elad Iwanir
90a98b759a Fixing merge conflicts from master (#171)
* Fixed typo on string #74 (#103)

* Default transformation (#94)

* This commit introduce the support of default transformation for undeclared fields in the anonymizer, which can be overrided by the user if supplied another default within the anonymizer template.

* Streams bug fixes (#92)

* Deployment script (#95)

New simplified deployment scripts + unified tags

* Analyzer redesign + supporting custom recognizers

This commit is the first part of the redesign of the analyzer service, and contains the following:

    1. Separates spacy and recognizers logic to different files.

    2. Implements a base class for all the recognizers,(which in future custom recognizers will inherit)

    3. Moves the analyzer logic from main to analyzer_engine class

    4. Removes the detected text from the analyzer result.


Future commits will contain the following:

    1. Dynamic loading of the pre-defined recognizers. [link](https://dev.azure.com/csedevil/Presidio-internal/_sprints/taskboard/Presidio%20Crew/Presidio-internal/02%20-%20Testable%20custom%20models)

    2. Add new pattern recognizer via api call, [work item](https://dev.azure.com/csedevil/Presidio-internal/_sprints/taskboard/Presidio%20Crew/Presidio-internal/02%20-%20Testable%20custom%20models)

    3. Improve remove duplicates logic [bug](https://dev.azure.com/csedevil/Presidio-internal/_workitems/edit/597) and [bug](https://dev.azure.com/csedevil/Presidio-internal/_workitems/edit/596/)

    4. Re-support context model. [work item](https://dev.azure.com/csedevil/Presidio-internal/_sprints/taskboard/Presidio%20Crew/Presidio-internal/02%20-%20Testable%20custom%20models)


Current Design:
![image](https://user-images.githubusercontent.com/13463870/52433948-edc69480-2b16-11e9-98d7-8923fdc9fb8a.png)

* Presidio support for language code in template (#98)

Configure a language code on the request level and not the field level. All requests should have one language

* Fix Bug #604 - Refactor test assertions + some pylint fixes (#100)

* Fix Bug #604 - Refactor test assertions + some pylint fixes

* fix spaces in spacy_recognizer.py

* Update test_spacy_recognizer.py

Fix PR comment regarding Bug 617

* fixed bug: changed 'push' to 'pull' in Makefile (#102)

* Bug666 - Adding pylint to the Analyzer microservice (#105)

* Adding pylint for the analyzer microservice

* Ll bug610 - Fix bug in IBAN recognizers + additional test fixes (#101)

* Fix Bug 610: iban recognizer and fix additional tests
* Ignoring 0 score patterns, removed predefined 0 score patterns from code.

* All fields (#107)

support for requesting all fields (entities) and language refactor

* New functionality: Support custom pattern recognizers (#104)

Adding a new service for persisting recognizers
Adding API support for adding, removing and listing recognizers
Analyzer service now calls the recognizers store to get new recognizers to be used during analysis

* Entities list for all fields true (#111)

Bug fix with all_fields = True

* (Re)Enable context support in analyzer (#114)

This PR introduces estimation of surrounding words (aka context). It also introduces generic NLP classes for accessing metadata extracted by an NLP engine (specifically tokens, lemmas, NER, stopwords and punctuation). SpacyRecognizer no longer runs spacy but only processes the metadata processed by the NLP Engine. In the current implementation, Spacy is the implementation of the NLP engine.

* Add public path to makefile (#121)

* updated docker file to support correct spacy version

* added public path for push release

* Update Dockerfile.python.deps

* replaced registry with public mcr

* updated docs and samples based on new changes in dev (#120)

* updated docs and samples based on new changes in dev

* updated text change suggestion

* reverted registry change

* a post-upgrade e2e test (#112)

Runs e2e tests on the newly deployed code

* Build deps - adding build number to python&golang dependency containers (#122)

* adding presidio-dependency images versioning

* updating installation notes with dependency label

* add CI as code

* presidio deps ci yaml file

* add triggers to deps CI yaml

* separate CIs for golang and python

* adding presidio-dependency images versioning

* updating installation notes with dependency label

* Bug fixes - based on bugbash (#126)

* Bug 906 - CONTEXT_SUFFIX_COUNT is not used and PREFIX is used instead

* Bug 909 -  Context not working with upper case / mixed case

* Bug 908 - support context with substrings

* Bug 907 - Context window size is off by 1 index

* Revert yaml (#137)

* Revert "Build deps - adding build number to python&golang dependency containers (#122)"

This reverts commit c054770582.

* Change deployment script to mcr (#130)

* updated docker file to support correct spacy version

* changed registry to mcr

* fixed the mcr url

* Updated readme and documentation(#125)

* Update README.MD

* Bug 911 fix (#131)

* Bug 911 fix
When the persistent recognizers store is empty there should be no error log line when requesting for the hash value

* changed genproto branch to master.

* Updating genproto to master branch

* Updated CI badge for new Presidio-CI pipeline

* bug fix - mcr latest tag was not correct
2019-05-30 10:05:47 +03:00
Avishay balter
bf3b4d95e1 update dev 2019-05-26 09:55:44 +03:00
Avishay balter
292f954b34 update docs 2019-05-26 09:55:44 +03:00
Omri Mendels
cf6cb8ba31 Minor documentation changes 2019-05-22 20:55:20 +03:00
Elad Iwanir
7a8f3ba40e Updating docs 2019-05-22 20:55:20 +03:00
Itye Richter
d38a8cb8b0 expanded the windows support doc 2019-05-22 20:55:20 +03:00
Elad Iwanir
8c148fe3fb Update docs to reflect pipenv changes 2019-05-22 20:55:20 +03:00
Omri Mendels
99ff639552 fixed typo 2019-05-02 09:48:04 +03:00
Omri Mendels
5e8be072f6 Updated readme and documentation(#125) 2019-05-01 12:31:37 +03:00
balteravishay
956ae904f2 Revert yaml (#137)
* Revert "Build deps - adding build number to python&golang dependency containers (#122)"

This reverts commit c054770582.
2019-05-01 12:07:11 +03:00
balteravishay
c054770582 Build deps - adding build number to python&golang dependency containers (#122)
* adding presidio-dependency images versioning

* updating installation notes with dependency label

* add CI as code

* presidio deps ci yaml file

* add triggers to deps CI yaml

* separate CIs for golang and python

* adding presidio-dependency images versioning

* updating installation notes with dependency label
2019-04-30 15:30:47 +03:00
Tomer Rosenthal
0e476618ee Image support (#87) 2019-01-08 14:25:59 +02:00
Tomer Rosenthal
8b642e20a2 Version 0.1.1 (#82)
* Docs (#80)

* Fixed Anonymizer duplicates bug (#81)
2018-12-19 21:37:43 +02:00
Tomer Rosenthal
3945113f40 Version 0.1.0 (#78) 2018-12-18 11:27:04 +02:00
torosent
300ebe5e2a Initial docs version 2018-08-05 14:42:38 +03:00