diff --git a/docs/development.md b/docs/development.md index 94d4a61e6..72e784c5f 100644 --- a/docs/development.md +++ b/docs/development.md @@ -54,19 +54,25 @@ Most of Presidio's services are written in Go. The `presidio-analyzer` module, i Additional installation instructions: https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv 3. Create virtualenv for the project & Install all requirements in the Pipfile, including dev requirements - Install the Python packages for the analyzer in the `presidio-analyzer` folder, run: - `pipenv install --dev --sequential` - -4. Run all tests - - ``` - pipenv run pytest - ``` - -5. To run arbitrary scripts within the virtual env, start the command with `pipenv run`. For example: - 1. `pipenv run flake8 analyzer --exclude "*pb2*.py"` - 2. `pipenv run pylint analyzer` - 3. `pipenv run pip freeze` +Install the Python packages for the analyzer in the `presidio-analyzer` folder, run: + ``` + pipenv install --dev --sequential + ``` + +4. Download spacy model + ``` + pipenv run python -m spacy download en_core_web_lg + ``` + +5. Run all tests + ``` + pipenv run pytest + ``` + +6. To run arbitrary scripts within the virtual env, start the command with `pipenv run`. For example: + 1. `pipenv run flake8 analyzer --exclude "*pb2*.py"` + 2. `pipenv run pylint analyzer` + 3. `pipenv run pip freeze` #### Alternatively, activate the virtual environment and use the commands by starting a pipenv shell: @@ -142,13 +148,13 @@ pipenv install --dev --sequential 3. If you want to experiment with `analyze` requests, navigate into the `analyzer` folder and start serving the analyzer service: ```sh -pipenv run python __main__.py serve --grpc-port 3000 +pipenv run python app.py serve --grpc-port 3000 ``` 4. In a new `pipenv shell` window you can run `analyze` requests, for example: ``` -pipenv run python __main__.py analyze --text "John Smith drivers license is AC432223" --fields "PERSON" "US_DRIVER_LICENSE" --grpc-port 3000 +pipenv run python app.py analyze --text "John Smith drivers license is AC432223" --fields "PERSON" "US_DRIVER_LICENSE" --grpc-port 3000 ``` ## Load test diff --git a/docs/interpretability_logs.md b/docs/interpretability_logs.md index 6b25dcb66..85eb90869 100644 --- a/docs/interpretability_logs.md +++ b/docs/interpretability_logs.md @@ -50,7 +50,7 @@ The `textual_explanation` field in `AnalysisExplanation` class allows you to add Interpretability traces are enabled by default. Disable App Tracing by setting the `enabled` constructor parameter to `False`. PII entities are not stored in the Traces by default. Enable it by either set an evironment variable `ENABLE_TRACE_PII` to `True`, or you can set it directly in the command line, using the `enable-trace-pii` argument as follows: ```bash -pipenv run python __main__.py serve --grpc-port 3001 --enable-trace-pii True +pipenv run python app.py serve --grpc-port 3001 --enable-trace-pii True ``` ## Notes