Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
David Pollack committed Jul 15, 2020
1 parent f281950 commit 4200436
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
36 changes: 21 additions & 15 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/interpretability_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4200436

Please sign in to comment.