pyannotators-patterns 0.6.23__tar.gz → 0.7.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/.gitignore +0 -6
  2. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/.pre-commit-config.yaml +9 -6
  3. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/Dockerfile +4 -4
  4. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/Jenkinsfile +31 -89
  5. pyannotators_patterns-0.7.2/PKG-INFO +97 -0
  6. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/README.md +12 -52
  7. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/conf.py +1 -0
  8. pyannotators_patterns-0.7.2/pyproject.toml +90 -0
  9. pyannotators_patterns-0.7.2/setup.py +54 -0
  10. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/src/pyannotators_patterns/__init__.py +1 -2
  11. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/src/pyannotators_patterns/named_pattern_recognizer.py +24 -30
  12. pyannotators_patterns-0.7.2/src/pyannotators_patterns/patterns.py +219 -0
  13. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/assertions.py +12 -4
  14. pyannotators_patterns-0.7.2/tests/test_coords.py +40 -0
  15. pyannotators_patterns-0.7.2/tests/test_credit_cards.py +58 -0
  16. pyannotators_patterns-0.7.2/tests/test_emails.py +58 -0
  17. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/test_mgrs.py +10 -7
  18. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/test_tel.py +11 -12
  19. pyannotators_patterns-0.7.2/tests/test_zip.py +52 -0
  20. pyannotators_patterns-0.7.2/tox.ini +51 -0
  21. pyannotators_patterns-0.6.23/MIGRATION.md +0 -166
  22. pyannotators_patterns-0.6.23/PKG-INFO +0 -157
  23. pyannotators_patterns-0.6.23/pyproject.toml +0 -88
  24. pyannotators_patterns-0.6.23/src/pyannotators_patterns/patterns.py +0 -260
  25. pyannotators_patterns-0.6.23/tests/test_annotator.py +0 -172
  26. pyannotators_patterns-0.6.23/tests/test_coords.py +0 -42
  27. pyannotators_patterns-0.6.23/tests/test_credit_cards.py +0 -111
  28. pyannotators_patterns-0.6.23/tests/test_emails.py +0 -75
  29. pyannotators_patterns-0.6.23/tests/test_zip.py +0 -60
  30. pyannotators_patterns-0.6.23/trivy +0 -0
  31. pyannotators_patterns-0.6.23/trivy-html-template.tpl +0 -148
  32. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/.bumpversion.cfg +0 -0
  33. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/.github/workflows/main.yml +0 -0
  34. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/.readthedocs.yml +0 -0
  35. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/AUTHORS.md +0 -0
  36. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/CHANGELOG.md +0 -0
  37. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/LICENSE +0 -0
  38. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/RELEASE.md +0 -0
  39. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/bumpversion.py +0 -0
  40. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/.gitignore +0 -0
  41. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/CHANGELOG.md +0 -0
  42. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/LICENSE +0 -0
  43. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/_static/.gitkeep +0 -0
  44. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/_templates/.gitkeep +0 -0
  45. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/docs/index.rst +0 -0
  46. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/mypy.ini +0 -0
  47. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/data/coords-document.json +0 -0
  48. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/data/coords.json +0 -0
  49. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/data/mgrs-document.json +0 -0
  50. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/data/mgrs.json +0 -0
  51. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/data/tel-document.json +0 -0
  52. {pyannotators_patterns-0.6.23 → pyannotators_patterns-0.7.2}/tests/data/tel.json +0 -0
@@ -129,9 +129,3 @@ dmypy.json
129
129
  .idea/
130
130
  .groovylintrc.json
131
131
  .emailNotif
132
- uv.lock
133
-
134
- # SBOMs
135
- **/sbom*.json
136
- **/trivy*.html
137
- **/audit*.json
@@ -1,14 +1,17 @@
1
1
  repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- rev: v0.3.0
2
+ - repo: https://github.com/ambv/black
3
+ rev: 19.3b0
4
4
  hooks:
5
- - id: ruff
6
- args: [--fix]
7
- - id: ruff-format
5
+ - id: black
6
+ language_version: python3.8
8
7
  - repo: https://github.com/pre-commit/pre-commit-hooks
9
- rev: v4.5.0
8
+ rev: v2.1.0
10
9
  hooks:
11
10
  - id: end-of-file-fixer
12
11
  exclude: '.bumpversion.cfg'
13
12
  - id: trailing-whitespace
14
13
  exclude: '.bumpversion.cfg'
14
+ - repo: https://gitlab.com/pycqa/flake8
15
+ rev: 3.7.9
16
+ hooks:
17
+ - id: flake8
@@ -1,4 +1,4 @@
1
- FROM python:3.12-slim-bookworm
1
+ FROM python:3.8-slim-bookworm
2
2
  # Install prerequisites
3
3
  RUN apt-get update -y && \
4
4
  apt-get install -y \
@@ -11,9 +11,9 @@ RUN apt-get update -y && \
11
11
  apt-get update -y && \
12
12
  apt-get clean all -y
13
13
 
14
- # Install uv
15
- RUN pip install uv
14
+ # Enable Installing packages as root
15
+ ENV FLIT_ROOT_INSTALL=1
16
16
 
17
- # Add pyproject.toml + README.md for uv install
17
+ # Add pyproject.toml + README.md for flit install
18
18
  ADD pyproject.toml pyproject.toml
19
19
  ADD README.md README.md
@@ -6,6 +6,14 @@ pipeline {
6
6
 
7
7
  agent none
8
8
 
9
+ options {
10
+ throttleJobProperty(
11
+ categories: ['pyannotators'],
12
+ throttleEnabled: true,
13
+ throttleOption: 'category'
14
+ )
15
+ }
16
+
9
17
  triggers {
10
18
  upstream(upstreamProjects: 'pymultirole_plugins/' + BRANCH_NAME.replaceAll('/', '%2F'),\
11
19
  threshold: hudson.model.Result.SUCCESS)
@@ -19,15 +27,15 @@ pipeline {
19
27
  PYTHONDONTWRITEBYTECODE = '1'
20
28
  JENKINS_UIDGID = '1004:1004'
21
29
 
22
- MAJOR_VERSION = '0'
23
- MINOR_VERSION = '6'
30
+ MAJOR_VERSION = "${MAJOR_VERSION_PY38}"
31
+ MINOR_VERSION = "${MINOR_VERSION_PY38_HOTFIX}"
24
32
  }
25
33
 
26
34
  stages {
27
35
  stage('Catch build termination') {
28
36
  agent {
29
37
  node {
30
- label 'built-in'
38
+ label 'pre-build'
31
39
  customWorkspace "${PATH_HOME}/${JOB_NAME}"
32
40
  }
33
41
  }
@@ -58,7 +66,7 @@ pipeline {
58
66
  stage('Add credentials') {
59
67
  steps {
60
68
  script {
61
- // Add password file for uv publishing
69
+ // Add password file for flit publishing
62
70
  sh "cp ${PATH_HOME}/.passwd-pypi .env"
63
71
  }
64
72
  }
@@ -73,7 +81,6 @@ pipeline {
73
81
  withCredentials([gitUsernamePassword(credentialsId: 'bitbucket-user', gitToolName: 'git-tool')]) {
74
82
  sh 'git pull'
75
83
  sh "echo '\"\"\"Annotator based on Presidio pattern recognizer\"\"\"' > src/pyannotators_patterns/__init__.py"
76
- sh "echo '' >> src/pyannotators_patterns/__init__.py"
77
84
  sh "echo '__version__ = \"${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_ID}\"' >> src/pyannotators_patterns/__init__.py"
78
85
  sh 'git commit src/pyannotators_patterns/__init__.py -m "[Jenkins CI] Commit on version files" || echo "No changes to commit"'
79
86
  sh 'git push'
@@ -96,7 +103,7 @@ pipeline {
96
103
  // - docker: /root/test-reports
97
104
  // - host : /tmp/_${JOB_NAME}/test-reports
98
105
  dockerfile {
99
- label 'built-in'
106
+ label 'docker-build'
100
107
  customWorkspace "${PATH_HOME}/${JOB_NAME}"
101
108
  filename 'Dockerfile'
102
109
  args "-u root --privileged -v /tmp/_${JOB_NAME}/test-reports:${TEST_REPORT_DIR}"
@@ -104,11 +111,13 @@ pipeline {
104
111
  }
105
112
 
106
113
  stages {
107
- stage('Install dependencies') {
114
+ stage('Install flit & flake8') {
108
115
  steps {
109
- sh 'rm -f uv.lock'
110
- sh 'pip install uv'
111
- sh 'uv sync --no-cache --extra test'
116
+ // remove any previous tox env
117
+ sh 'rm -rf .tox'
118
+ sh 'python -m pip install pip==22.0.3'
119
+ sh 'pip install --no-cache-dir flit==3.2.0 flake8==3.9.2 flakehell tox'
120
+ sh 'flit install'
112
121
  }
113
122
  }
114
123
 
@@ -116,20 +125,20 @@ pipeline {
116
125
  steps {
117
126
  // remove any previous results.xml file
118
127
  sh "rm -f ${TEST_REPORT_DIR}/results.xml"
119
- sh 'uv run ruff check .'
120
- sh 'uv run ruff format --check .'
121
- sh "uv run pytest --junit-xml=${TEST_REPORT_DIR}/results.xml"
128
+ sh 'tox'
122
129
  }
123
130
  }
124
131
 
125
132
  stage('Publish on PyPI') {
126
133
  environment {
127
- UV_PUBLISH_USERNAME = getUserName '.env'
128
- UV_PUBLISH_PASSWORD = getUserPass '.env'
134
+ FLIT_USERNAME = getUserName '.env'
135
+ FLIT_PASSWORD = getUserPass '.env'
129
136
  }
130
137
  steps {
131
138
  // remove any previous folder dist
132
139
  sh 'rm -rf dist'
140
+ // create (as root) folder dist
141
+ sh 'mkdir dist'
133
142
  // pull recent updates of file __init__.py
134
143
  withCredentials([gitUsernamePassword(credentialsId: 'bitbucket-user', gitToolName: 'git-tool')]) {
135
144
  sh 'git config --global pull.rebase false'
@@ -142,85 +151,18 @@ pipeline {
142
151
  sh "chown ${JENKINS_UIDGID} src/pyannotators_patterns/__init__.py"
143
152
  // get git status
144
153
  sh 'git status'
145
- // build and publish on PyPI
154
+ // publish on PyPI
146
155
  sh '''
147
156
  export COMMIT_VERSION=$( cat src/pyannotators_patterns/__init__.py|grep version|cut -d '"' -f2|tr -s '[:blank:]' )
148
157
  export BUILD_VERSION="${MAJOR_VERSION}"."${MINOR_VERSION}"."${BUILD_ID}"
149
- if [ "${COMMIT_VERSION}" = "${BUILD_VERSION}" ] ; then uv build && uv publish ; fi
158
+ if [ "${COMMIT_VERSION}" = "${BUILD_VERSION}" ] ; then flit publish ; fi
150
159
  '''
151
160
  // remove current folder dist
152
161
  sh 'rm -rf dist'
153
162
  // remove current folder .hypothesis
154
163
  sh 'rm -rf .hypothesis'
155
- }
156
- }
157
- }
158
- }
159
-
160
- stage('Prepare SBOM') {
161
- when {
162
- beforeAgent true
163
- environment name: 'SKIP_JOB', value: '0'
164
- }
165
- options {
166
- timeout(time: 120, unit: 'SECONDS')
167
- }
168
-
169
- agent {
170
- docker {
171
- image 'alpine:3.19'
172
- label 'built-in'
173
- customWorkspace "${PATH_HOME}/${JOB_NAME}"
174
- args "-u 0"
175
- }
176
- }
177
-
178
- stages {
179
- stage('Generate SBOM') {
180
- steps {
181
- sh '''
182
- apk add --no-cache curl
183
-
184
- curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b . v${SYFT_VERSION}
185
-
186
- ./syft . \
187
- --exclude '**/syft' \
188
- --exclude '**/.pytest_cache' \
189
- --exclude '**/.ruff_cache' \
190
- --exclude '**/sbom.cdx.json' \
191
- --exclude '**/sbom.spdx.json' \
192
- --source-name "${JOB_NAME}" \
193
- --source-version "${BUILD_NUMBER}" \
194
- -o cyclonedx-json=sbom.cdx.json \
195
- -o spdx-json=sbom.spdx.json
196
-
197
- rm -f ./syft
198
- '''
199
- }
200
- }
201
-
202
- stage('Analyse SBOM') {
203
- steps {
204
- sh '''
205
- curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b . v${TRIVY_VERSION}
206
- curl -L https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/html.tpl -o trivy-html-template.tpl
207
-
208
- ./trivy sbom --download-db-only
209
-
210
- ./trivy sbom sbom.cdx.json \
211
- --skip-db-update \
212
- --format template \
213
- --template "@trivy-html-template.tpl" \
214
- -o trivy-report.html
215
-
216
- rm -f ./trivy
217
- '''
218
- }
219
- }
220
-
221
- stage('Archive SBOM & analysis') {
222
- steps {
223
- archiveArtifacts artifacts: 'sbom*.json, trivy*.html', fingerprint: true
164
+ // remove current folder .tox
165
+ sh 'rm -rf .tox'
224
166
  }
225
167
  }
226
168
  }
@@ -305,7 +247,7 @@ pipeline {
305
247
  }
306
248
  }
307
249
 
308
- // return UV_PUBLISH_USERNAME from given file (reads FLIT_USERNAME key)
250
+ // return FLIT_USERNAME from given file
309
251
  def getUserName(path) {
310
252
  def USERNAME = sh(
311
253
  script: "grep FLIT_USERNAME ${path}|cut -d '=' -f2",
@@ -314,7 +256,7 @@ def getUserName(path) {
314
256
  return USERNAME
315
257
  }
316
258
 
317
- // return UV_PUBLISH_PASSWORD from given file (reads FLIT_PASSWORD key)
259
+ // return FLIT_PASSWORD from given file
318
260
  def getUserPass(path) {
319
261
  def USERPASS = sh(
320
262
  script: "grep FLIT_PASSWORD ${path}|cut -d '=' -f2",
@@ -475,6 +417,6 @@ def analyseBuildCause() {
475
417
  println 'Skipping build because last commit has been done by CI'
476
418
  env.SKIP_JOB = '1'
477
419
  switchEmailNotif(false, 0)
478
- currentBuild.result = 'NOT_BUILT'
420
+ //currentBuild.result = 'NOT_BUILT'
479
421
  }
480
422
  }
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyannotators-patterns
3
+ Version: 0.7.2
4
+ Summary: Annotator based on Presidio pattern recognizer
5
+ Home-page: https://github.com/oterrier/pyannotators_patterns/
6
+ Keywords:
7
+ Author: Olivier Terrier
8
+ Author-email: olivier.terrier@kairntech.com
9
+ Requires-Python: >=3.8
10
+ Description-Content-Type: text/markdown
11
+ Classifier: Intended Audience :: Information Technology
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: System Administrators
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Classifier: Topic :: Software Development :: Libraries
18
+ Classifier: Topic :: Software Development
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Development Status :: 4 - Beta
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ License-File: LICENSE
23
+ Requires-Dist: pymultirole-plugins>=0.7.0,<0.8.0
24
+ Requires-Dist: tldextract==5.1.2
25
+ Requires-Dist: spacy==3.4.4
26
+ Requires-Dist: spacy[lookups]==3.4.4
27
+ Requires-Dist: log-with-context
28
+ Requires-Dist: collections_extended
29
+ Requires-Dist: unidecode
30
+ Requires-Dist: presidio-analyzer==2.2.354
31
+ Requires-Dist: flit ; extra == "dev"
32
+ Requires-Dist: pre-commit ; extra == "dev"
33
+ Requires-Dist: bump2version ; extra == "dev"
34
+ Requires-Dist: sphinx ; extra == "docs"
35
+ Requires-Dist: sphinx-rtd-theme ; extra == "docs"
36
+ Requires-Dist: m2r2 ; extra == "docs"
37
+ Requires-Dist: pytest ; extra == "test"
38
+ Requires-Dist: pytest-cov ; extra == "test"
39
+ Requires-Dist: pytest-flake8 ; extra == "test"
40
+ Requires-Dist: pytest-black ; extra == "test"
41
+ Requires-Dist: pytest_check ; extra == "test"
42
+ Requires-Dist: flake8==3.9.2 ; extra == "test"
43
+ Requires-Dist: tox ; extra == "test"
44
+ Requires-Dist: dirty-equals ; extra == "test"
45
+ Provides-Extra: dev
46
+ Provides-Extra: docs
47
+ Provides-Extra: test
48
+
49
+ # pyannotators_patterns
50
+
51
+ [![license](https://img.shields.io/github/license/oterrier/pyannotators_patterns)](https://github.com/oterrier/pyannotators_patterns/blob/master/LICENSE)
52
+ [![tests](https://github.com/oterrier/pyannotators_patterns/workflows/tests/badge.svg)](https://github.com/oterrier/pyannotators_patterns/actions?query=workflow%3Atests)
53
+ [![codecov](https://img.shields.io/codecov/c/github/oterrier/pyannotators_patterns)](https://codecov.io/gh/oterrier/pyannotators_patterns)
54
+ [![docs](https://img.shields.io/readthedocs/pyannotators_patterns)](https://pyannotators_patterns.readthedocs.io)
55
+ [![version](https://img.shields.io/pypi/v/pyannotators_patterns)](https://pypi.org/project/pyannotators_patterns/)
56
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyannotators_patterns)](https://pypi.org/project/pyannotators_patterns/)
57
+
58
+ Annotator based on Facebook's Patterns
59
+
60
+ ## Installation
61
+
62
+ You can simply `pip install pyannotators_patterns`.
63
+
64
+ ## Developing
65
+
66
+ ### Pre-requesites
67
+
68
+ You will need to install `flit` (for building the package) and `tox` (for orchestrating testing and documentation building):
69
+
70
+ ```
71
+ python3 -m pip install flit tox
72
+ ```
73
+
74
+ Clone the repository:
75
+
76
+ ```
77
+ git clone https://github.com/oterrier/pyannotators_patterns
78
+ ```
79
+
80
+ ### Running the test suite
81
+
82
+ You can run the full test suite against all supported versions of Python (3.8) with:
83
+
84
+ ```
85
+ tox
86
+ ```
87
+
88
+ ### Building the documentation
89
+
90
+ You can build the HTML documentation with:
91
+
92
+ ```
93
+ tox -e docs
94
+ ```
95
+
96
+ The built documentation is available at `docs/_build/index.html.
97
+
@@ -7,82 +7,42 @@
7
7
  [![version](https://img.shields.io/pypi/v/pyannotators_patterns)](https://pypi.org/project/pyannotators_patterns/)
8
8
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyannotators_patterns)](https://pypi.org/project/pyannotators_patterns/)
9
9
 
10
- Annotator based on Presidio regex pattern recognizers.
10
+ Annotator based on Facebook's Patterns
11
11
 
12
12
  ## Installation
13
13
 
14
- ```
15
- pip install pyannotators-patterns
16
- ```
14
+ You can simply `pip install pyannotators_patterns`.
17
15
 
18
16
  ## Developing
19
17
 
20
- ### Prerequisites
18
+ ### Pre-requesites
21
19
 
22
- You will need [uv](https://github.com/astral-sh/uv) (package manager) and Python 3.12+.
23
-
24
- Clone the repository:
20
+ You will need to install `flit` (for building the package) and `tox` (for orchestrating testing and documentation building):
25
21
 
26
22
  ```
27
- git clone https://github.com/oterrier/pyannotators_patterns
28
- cd pyannotators_patterns
23
+ python3 -m pip install flit tox
29
24
  ```
30
25
 
31
- Install dependencies (including test extras):
26
+ Clone the repository:
32
27
 
33
28
  ```
34
- uv sync --extra test
29
+ git clone https://github.com/oterrier/pyannotators_patterns
35
30
  ```
36
31
 
37
32
  ### Running the test suite
38
33
 
39
- ```
40
- uv run pytest
41
- ```
42
-
43
- ### Linting and formatting
34
+ You can run the full test suite against all supported versions of Python (3.8) with:
44
35
 
45
36
  ```
46
- uv run ruff check .
47
- uv run ruff format --check .
48
- ```
49
-
50
- To auto-fix formatting:
51
-
52
- ```
53
- uv run ruff format .
37
+ tox
54
38
  ```
55
39
 
56
40
  ### Building the documentation
57
41
 
58
- ```
59
- uv run --extra docs sphinx-build docs docs/_build
60
- ```
61
-
62
- The built documentation is available at `docs/_build/index.html`.
63
-
64
- ## SBOM & vulnerability check
65
-
66
- Install the SBOM dependencies:
67
-
68
- ```
69
- uv sync --extra sbom
70
- ```
71
-
72
- Generate a CycloneDX SBOM from the current environment:
42
+ You can build the HTML documentation with:
73
43
 
74
44
  ```
75
- uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
45
+ tox -e docs
76
46
  ```
77
47
 
78
- Audit dependencies for known vulnerabilities:
79
-
80
- ```
81
- uv run pip-audit --format json --output audit-report.json
82
- ```
83
-
84
- To fail on any known vulnerability (useful in CI):
85
-
86
- ```
87
- uv run pip-audit --strict
88
- ```
48
+ The built documentation is available at `docs/_build/index.html.
@@ -18,6 +18,7 @@ import os
18
18
 
19
19
  import pyannotators_patterns
20
20
 
21
+
21
22
  # -- Project information -----------------------------------------------------
22
23
 
23
24
  project = "pyannotators_patterns"
@@ -0,0 +1,90 @@
1
+ [build-system]
2
+ requires = ["flit_core >=3.2,<4"]
3
+ #requires = ["flit_core >=2,<3"]
4
+ build-backend = "flit_core.buildapi"
5
+
6
+ [tool.flit.metadata]
7
+ module = "pyannotators_patterns"
8
+ author = "Olivier Terrier"
9
+ author-email = "olivier.terrier@kairntech.com"
10
+ home-page = "https://github.com/oterrier/pyannotators_patterns/"
11
+ requires-python=">=3.8"
12
+ description-file="README.md"
13
+ keywords = ""
14
+ classifiers = [
15
+ "Intended Audience :: Information Technology",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: System Administrators",
18
+ "Operating System :: OS Independent",
19
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
20
+ "Topic :: Software Development :: Libraries :: Python Modules",
21
+ "Topic :: Software Development :: Libraries",
22
+ "Topic :: Software Development",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Development Status :: 4 - Beta",
25
+ "Programming Language :: Python :: 3.8",
26
+ ]
27
+ requires = [
28
+ "pymultirole-plugins>=0.7.0,<0.8.0",
29
+ "tldextract==5.1.2",
30
+ "spacy==3.4.4",
31
+ "spacy[lookups]==3.4.4",
32
+ "log-with-context",
33
+ "collections_extended",
34
+ "unidecode",
35
+ "presidio-analyzer==2.2.354"
36
+ ]
37
+ dist-name = "pyannotators-patterns"
38
+
39
+ [tool.flit.entrypoints."pyannotators.plugins"]
40
+ patterns = "pyannotators_patterns.patterns:PatternsAnnotator"
41
+
42
+ [tool.flit.metadata.requires-extra]
43
+ test = [
44
+ "pytest",
45
+ "pytest-cov",
46
+ "pytest-flake8",
47
+ "pytest-black",
48
+ "pytest_check",
49
+ "flake8==3.9.2",
50
+ "tox",
51
+ "dirty-equals"
52
+ ]
53
+ docs = [
54
+ "sphinx",
55
+ "sphinx-rtd-theme",
56
+ "m2r2", # markdown support
57
+ # "sphinxcontrib.apidoc", # run sphinx-apidoc when building docs
58
+ # "jupyter_sphinx", # for execution of code snippets in the documentation
59
+ ]
60
+ dev = [
61
+ "flit",
62
+ "pre-commit",
63
+ "bump2version",
64
+ ]
65
+
66
+ [tool.flakehell]
67
+ exclude = ["README.md"]
68
+ format = "colored"
69
+ #format = "junit-xml"
70
+ max_line_length = 120
71
+ show_source = true
72
+ #whitelist = "../../allowlist.txt"
73
+
74
+ [tool.flakehell.plugins]
75
+ flake8-bandit = ["+*", "-S322"]
76
+ flake8-bugbear = ["+*"]
77
+ flake8-builtins = ["+*"]
78
+ flake8-comprehensions = ["+*"]
79
+ #flake8-darglint = ["+*"]
80
+ flake8-docstrings = ["+*"]
81
+ flake8-eradicate = ["+*"]
82
+ flake8-isort = ["+*"]
83
+ flake8-mutable = ["+*"]
84
+ flake8-pytest-style = ["+*"]
85
+ flake8-spellcheck = ["+*"]
86
+ mccabe = ["+*"]
87
+ pep8-naming = ["+*"]
88
+ pycodestyle = ["+*"]
89
+ pyflakes = ["+*"]
90
+ pylint = ["+*"]
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env python
2
+ # setup.py generated by flit for tools that don't yet use PEP 517
3
+
4
+ from distutils.core import setup
5
+
6
+ packages = \
7
+ ['pyannotators_patterns']
8
+
9
+ package_data = \
10
+ {'': ['*']}
11
+
12
+ package_dir = \
13
+ {'': 'src'}
14
+
15
+ install_requires = \
16
+ ['pymultirole-plugins>=0.7.0,<0.8.0',
17
+ 'tldextract==5.1.2',
18
+ 'spacy==3.4.4',
19
+ 'spacy[lookups]==3.4.4',
20
+ 'log-with-context',
21
+ 'collections_extended',
22
+ 'unidecode',
23
+ 'presidio-analyzer==2.2.354']
24
+
25
+ extras_require = \
26
+ {'dev': ['flit', 'pre-commit', 'bump2version'],
27
+ 'docs': ['sphinx', 'sphinx-rtd-theme', 'm2r2'],
28
+ 'test': ['pytest',
29
+ 'pytest-cov',
30
+ 'pytest-flake8',
31
+ 'pytest-black',
32
+ 'pytest_check',
33
+ 'flake8==3.9.2',
34
+ 'tox',
35
+ 'dirty-equals']}
36
+
37
+ entry_points = \
38
+ {'pyannotators.plugins': ['patterns = '
39
+ 'pyannotators_patterns.patterns:PatternsAnnotator']}
40
+
41
+ setup(name='pyannotators-patterns',
42
+ version='0.7.2',
43
+ description='Annotator based on Presidio pattern recognizer',
44
+ author='Olivier Terrier',
45
+ author_email='olivier.terrier@kairntech.com',
46
+ url='https://github.com/oterrier/pyannotators_patterns/',
47
+ packages=packages,
48
+ package_data=package_data,
49
+ package_dir=package_dir,
50
+ install_requires=install_requires,
51
+ extras_require=extras_require,
52
+ entry_points=entry_points,
53
+ python_requires='>=3.8',
54
+ )
@@ -1,3 +1,2 @@
1
1
  """Annotator based on Presidio pattern recognizer"""
2
-
3
- __version__ = "0.6.23"
2
+ __version__ = "0.7.2"