pyprocessors-nameparser 1.6.36__tar.gz → 1.6.44__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.
@@ -33,3 +33,7 @@ uv.lock
33
33
  **/sbom*.json
34
34
  **/trivy*.html
35
35
  **/audit*.json
36
+ **/audit*.md
37
+
38
+ # Exemples des pages d aide Sherpa, enregistres par les tests
39
+ build/
@@ -0,0 +1,4 @@
1
+ [submodule "submodules/python-archetype"]
2
+ path = submodules/python-archetype
3
+ url = git@bitbucket.org:kairntech/python-archetype.git
4
+ branch = master
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,142 @@
1
+ Metadata-Version: 2.5
2
+ Name: pyprocessors-nameparser
3
+ Version: 1.6.44
4
+ Summary: Processor based on Nameparser
5
+ Project-URL: Homepage, https://kairntech.com/
6
+ Author-email: Olivier Terrier <olivier.terrier@kairntech.com>
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Intended Audience :: Information Technology
10
+ Classifier: Intended Audience :: System Administrators
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Topic :: Software Development
15
+ Classifier: Topic :: Software Development :: Libraries
16
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.12
19
+ Requires-Dist: log-with-context
20
+ Requires-Dist: nameparser
21
+ Requires-Dist: pymultirole-plugins<1.7.0,>=1.6.0
22
+ Provides-Extra: dev
23
+ Requires-Dist: bump2version; extra == 'dev'
24
+ Requires-Dist: pre-commit; extra == 'dev'
25
+ Provides-Extra: docs
26
+ Requires-Dist: lxml-html-clean; extra == 'docs'
27
+ Requires-Dist: m2r2; extra == 'docs'
28
+ Requires-Dist: sphinx; extra == 'docs'
29
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
30
+ Requires-Dist: sphinxcontrib-apidoc; extra == 'docs'
31
+ Provides-Extra: sbom
32
+ Requires-Dist: cyclonedx-bom; extra == 'sbom'
33
+ Requires-Dist: pip-audit; extra == 'sbom'
34
+ Provides-Extra: test
35
+ Requires-Dist: dirty-equals; extra == 'test'
36
+ Requires-Dist: pytest; extra == 'test'
37
+ Requires-Dist: pytest-cov; extra == 'test'
38
+ Requires-Dist: ruff; extra == 'test'
39
+ Description-Content-Type: text/markdown
40
+
41
+ ## Requirements
42
+
43
+ - Python 3.12+
44
+ - uv for package management
45
+ - Pydantic for the data parts.
46
+
47
+ ## Installation
48
+ ```
49
+ pip install uv
50
+ uv sync
51
+ ```
52
+
53
+ ## Development
54
+
55
+ The build is driven by [Task](https://taskfile.dev) and [uv](https://docs.astral.sh/uv/),
56
+ with the shared stages coming from the `python-archetype` submodule.
57
+
58
+ ### Getting started
59
+
60
+ The stages live in a Git submodule, so **clone with `--recurse-submodules`**:
61
+
62
+ ```bash
63
+ git clone --recurse-submodules git@bitbucket.org:kairntech/pyprocessors_nameparser.git
64
+ cd pyprocessors_nameparser
65
+ sh -c "$(curl -sSL https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
66
+ task
67
+ ```
68
+
69
+ Already cloned without it? The submodule directory is empty, and `task` fails on:
70
+
71
+ ```
72
+ task: No Taskfile found at ".../submodules/python-archetype/resources/Taskfile.yml"
73
+ ```
74
+
75
+ which means exactly that, and nothing worse:
76
+
77
+ ```bash
78
+ git submodule update --init
79
+ ```
80
+
81
+ **Task is the only manual prerequisite.** An archetype cannot bootstrap itself: uv and the
82
+ Python interpreter install themselves on demand (every task that runs uv depends on an
83
+ internal `install-python` task), but the thing that runs them does not. Make sure
84
+ `~/.local/bin` is on your `PATH` — that is where `task` and `uv` both land.
85
+
86
+ ### Running the pipeline
87
+
88
+ ```bash
89
+ task stages # print the pipeline stages, in order
90
+ task # run the pipeline up to (but excluding) py:publish
91
+ task -- --skip-tests # same, without the test stage
92
+ task up-to -- py:lint # run the pipeline up to and including one stage
93
+ task jenkins # run every stage, exactly what Jenkins runs
94
+ ```
95
+
96
+ `task` with no argument is safe by construction: it runs every stage but the last, and that
97
+ bound is computed from the `STAGES` list rather than written down. The last stage is the
98
+ only one with an effect outside your machine.
99
+
100
+ `STAGES`, declared once in `Taskfile.yml`, is the single definition of the pipeline order —
101
+ so what you run locally is what Jenkins runs.
102
+
103
+ ### Individual stages
104
+
105
+ | Task | Description |
106
+ |---------------------------------|-------------------------------------------------------|
107
+ | `task py:sync` | Install the project and its dependencies (uv sync) |
108
+ | `task py:lint` | `ruff check` and `ruff format --check` |
109
+ | `task py:format` | Reformat the code with ruff |
110
+ | `task py:test` | Run the test suite |
111
+ | `task py:test-marker -- <m>` | Run the tests carrying one pytest marker |
112
+ | `task py:sbom` | Generate a CycloneDX SBOM of the resolved environment |
113
+ | `task py:check-vulnerabilities` | Check for known CVEs |
114
+ | `task py:check-updates` | Check for dependency updates |
115
+ | `task py:build` | Build the wheel and sdist (uv build) |
116
+ | `task py:publish` | Publish the distributions (uv publish) |
117
+ | `task py:version-file` | Print the path of the file carrying `__version__` |
118
+ | `task py:set-version VERSION=x` | Write that version into it |
119
+
120
+ `uv.lock` is not versioned here, so `py:sync` always resolves from scratch (`--upgrade`):
121
+ a stale lock lying around on a machine would otherwise make you test and audit versions the
122
+ CI never sees.
123
+
124
+ ### SBOM & vulnerability check
125
+
126
+ `task py:sbom` and `task py:check-vulnerabilities` wrap the underlying tools. To run them
127
+ by hand:
128
+
129
+ ```bash
130
+ uv sync --extra test --extra sbom
131
+ uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
132
+ uv run pip-audit --skip-editable --format json --output audit-report.json
133
+ ```
134
+
135
+ Ask for **all** the extras, not just `sbom`: `uv sync` synchronises rather than adds, so
136
+ whatever the requested extras do not pull in gets removed. `--extra sbom` on its own
137
+ uninstalls `ruff` and `pytest`, leaving an environment that can no longer lint or test.
138
+
139
+ `--skip-editable` skips the project itself, which no advisory database can know about. The
140
+ tasks do the same, and pip-audit still exits non-zero when it finds a real vulnerability —
141
+ which is the contract the CI relies on. Avoid `--strict`: it turns "dependency not found on
142
+ PyPI" into a fatal error, so it breaks as soon as the local version is not a published one.
@@ -0,0 +1,102 @@
1
+ ## Requirements
2
+
3
+ - Python 3.12+
4
+ - uv for package management
5
+ - Pydantic for the data parts.
6
+
7
+ ## Installation
8
+ ```
9
+ pip install uv
10
+ uv sync
11
+ ```
12
+
13
+ ## Development
14
+
15
+ The build is driven by [Task](https://taskfile.dev) and [uv](https://docs.astral.sh/uv/),
16
+ with the shared stages coming from the `python-archetype` submodule.
17
+
18
+ ### Getting started
19
+
20
+ The stages live in a Git submodule, so **clone with `--recurse-submodules`**:
21
+
22
+ ```bash
23
+ git clone --recurse-submodules git@bitbucket.org:kairntech/pyprocessors_nameparser.git
24
+ cd pyprocessors_nameparser
25
+ sh -c "$(curl -sSL https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
26
+ task
27
+ ```
28
+
29
+ Already cloned without it? The submodule directory is empty, and `task` fails on:
30
+
31
+ ```
32
+ task: No Taskfile found at ".../submodules/python-archetype/resources/Taskfile.yml"
33
+ ```
34
+
35
+ which means exactly that, and nothing worse:
36
+
37
+ ```bash
38
+ git submodule update --init
39
+ ```
40
+
41
+ **Task is the only manual prerequisite.** An archetype cannot bootstrap itself: uv and the
42
+ Python interpreter install themselves on demand (every task that runs uv depends on an
43
+ internal `install-python` task), but the thing that runs them does not. Make sure
44
+ `~/.local/bin` is on your `PATH` — that is where `task` and `uv` both land.
45
+
46
+ ### Running the pipeline
47
+
48
+ ```bash
49
+ task stages # print the pipeline stages, in order
50
+ task # run the pipeline up to (but excluding) py:publish
51
+ task -- --skip-tests # same, without the test stage
52
+ task up-to -- py:lint # run the pipeline up to and including one stage
53
+ task jenkins # run every stage, exactly what Jenkins runs
54
+ ```
55
+
56
+ `task` with no argument is safe by construction: it runs every stage but the last, and that
57
+ bound is computed from the `STAGES` list rather than written down. The last stage is the
58
+ only one with an effect outside your machine.
59
+
60
+ `STAGES`, declared once in `Taskfile.yml`, is the single definition of the pipeline order —
61
+ so what you run locally is what Jenkins runs.
62
+
63
+ ### Individual stages
64
+
65
+ | Task | Description |
66
+ |---------------------------------|-------------------------------------------------------|
67
+ | `task py:sync` | Install the project and its dependencies (uv sync) |
68
+ | `task py:lint` | `ruff check` and `ruff format --check` |
69
+ | `task py:format` | Reformat the code with ruff |
70
+ | `task py:test` | Run the test suite |
71
+ | `task py:test-marker -- <m>` | Run the tests carrying one pytest marker |
72
+ | `task py:sbom` | Generate a CycloneDX SBOM of the resolved environment |
73
+ | `task py:check-vulnerabilities` | Check for known CVEs |
74
+ | `task py:check-updates` | Check for dependency updates |
75
+ | `task py:build` | Build the wheel and sdist (uv build) |
76
+ | `task py:publish` | Publish the distributions (uv publish) |
77
+ | `task py:version-file` | Print the path of the file carrying `__version__` |
78
+ | `task py:set-version VERSION=x` | Write that version into it |
79
+
80
+ `uv.lock` is not versioned here, so `py:sync` always resolves from scratch (`--upgrade`):
81
+ a stale lock lying around on a machine would otherwise make you test and audit versions the
82
+ CI never sees.
83
+
84
+ ### SBOM & vulnerability check
85
+
86
+ `task py:sbom` and `task py:check-vulnerabilities` wrap the underlying tools. To run them
87
+ by hand:
88
+
89
+ ```bash
90
+ uv sync --extra test --extra sbom
91
+ uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
92
+ uv run pip-audit --skip-editable --format json --output audit-report.json
93
+ ```
94
+
95
+ Ask for **all** the extras, not just `sbom`: `uv sync` synchronises rather than adds, so
96
+ whatever the requested extras do not pull in gets removed. `--extra sbom` on its own
97
+ uninstalls `ruff` and `pytest`, leaving an environment that can no longer lint or test.
98
+
99
+ `--skip-editable` skips the project itself, which no advisory database can know about. The
100
+ tasks do the same, and pip-audit still exits non-zero when it finds a real vulnerability —
101
+ which is the contract the CI relies on. Avoid `--strict`: it turns "dependency not found on
102
+ PyPI" into a fatal error, so it breaks as soon as the local version is not a published one.
@@ -0,0 +1,33 @@
1
+ version: '3'
2
+
3
+ includes:
4
+ # Les tasks Python, sous le namespace 'py:'.
5
+ py:
6
+ taskfile: submodules/python-archetype/resources/Taskfile.yml
7
+ vars:
8
+ # Le module qui porte __version__. Déclaré ICI et non dans le Jenkinsfile, pour
9
+ # que 'task py:set-version' et 'task py:version-file' servent aussi au
10
+ # développeur : le bump de version n'était jusqu'ici reproductible que par la CI.
11
+ #
12
+ # Chemin depuis la racine, et pas nom de module : l'archétype en fait
13
+ # '{{.MODULE}}/__init__.py'. Ce dépôt a son paquet à plat, contrairement à la
14
+ # plupart des dépôts pymultirole, qui sont en layout src/.
15
+ MODULE: pyprocessors_nameparser
16
+ # uv.lock n'est pas versionné ici (il est dans .gitignore) : sync doit résoudre à
17
+ # neuf, sinon un lock périmé traînant sur un poste fait tester et auditer autre
18
+ # chose que ce que produit la CI.
19
+ LOCK_VERSIONED: "false"
20
+ # Le lanceur de pipeline, à plat, pour que 'task', 'task up-to' et
21
+ # 'task jenkins' soient au premier niveau.
22
+ _:
23
+ taskfile: submodules/python-archetype/resources/Stages.yml
24
+ flatten: true
25
+ vars:
26
+ # La seule définition de l'ordre du pipeline. pythonPipeline joue ces stages, plus
27
+ # les siens qui n'ont de sens que dans Jenkins (init, version, py:publish), et son
28
+ # checkStageDrift() vérifie que cette liste en est un sous-ensemble ORDONNÉ.
29
+ STAGES: >-
30
+ py:sync py:lint py:test
31
+ py:sbom py:check-vulnerabilities
32
+ py:build py:publish
33
+ TEST_STAGE: py:test
@@ -1,3 +1,3 @@
1
1
  """Processor based on Nameparser"""
2
2
 
3
- __version__ = "1.6.36"
3
+ __version__ = "1.6.44"
@@ -62,6 +62,7 @@ path = "pyprocessors_nameparser/__init__.py"
62
62
 
63
63
  [tool.hatch.build]
64
64
  exclude = [
65
+ "/submodules",
65
66
  "/tests",
66
67
  "/docs",
67
68
  "Jenkinsfile",
@@ -1,89 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pyprocessors-nameparser
3
- Version: 1.6.36
4
- Summary: Processor based on Nameparser
5
- Project-URL: Homepage, https://kairntech.com/
6
- Author-email: Olivier Terrier <olivier.terrier@kairntech.com>
7
- Classifier: Development Status :: 4 - Beta
8
- Classifier: Intended Audience :: Developers
9
- Classifier: Intended Audience :: Information Technology
10
- Classifier: Intended Audience :: System Administrators
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Topic :: Software Development
15
- Classifier: Topic :: Software Development :: Libraries
16
- Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
17
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
- Requires-Python: >=3.12
19
- Requires-Dist: log-with-context
20
- Requires-Dist: nameparser
21
- Requires-Dist: pymultirole-plugins<1.7.0,>=1.6.0
22
- Provides-Extra: dev
23
- Requires-Dist: bump2version; extra == 'dev'
24
- Requires-Dist: pre-commit; extra == 'dev'
25
- Provides-Extra: docs
26
- Requires-Dist: lxml-html-clean; extra == 'docs'
27
- Requires-Dist: m2r2; extra == 'docs'
28
- Requires-Dist: sphinx; extra == 'docs'
29
- Requires-Dist: sphinx-rtd-theme; extra == 'docs'
30
- Requires-Dist: sphinxcontrib-apidoc; extra == 'docs'
31
- Provides-Extra: sbom
32
- Requires-Dist: cyclonedx-bom; extra == 'sbom'
33
- Requires-Dist: pip-audit; extra == 'sbom'
34
- Provides-Extra: test
35
- Requires-Dist: dirty-equals; extra == 'test'
36
- Requires-Dist: pytest; extra == 'test'
37
- Requires-Dist: pytest-cov; extra == 'test'
38
- Requires-Dist: ruff; extra == 'test'
39
- Description-Content-Type: text/markdown
40
-
41
- ## Requirements
42
-
43
- - Python 3.12+
44
- - uv for package management
45
- - Pydantic for the data parts.
46
-
47
- ## Installation
48
- ```
49
- pip install uv
50
- uv sync
51
- ```
52
-
53
- ## Publish the Python Package to PyPI
54
- - Increment the version of your package in the `__init__.py` file:
55
- ```
56
- """An amazing package!"""
57
-
58
- __version__ = 'x.y.z'
59
- ```
60
- - Publish
61
- ```
62
- uv build && uv publish
63
- ```
64
-
65
- ## SBOM & vulnerability check
66
-
67
- Install the SBOM dependencies:
68
-
69
- ```
70
- uv sync --extra sbom
71
- ```
72
-
73
- Generate a CycloneDX SBOM from the current environment:
74
-
75
- ```
76
- uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
77
- ```
78
-
79
- Audit dependencies for known vulnerabilities:
80
-
81
- ```
82
- uv run pip-audit --format json --output audit-report.json
83
- ```
84
-
85
- To fail on any known vulnerability (useful in CI):
86
-
87
- ```
88
- uv run pip-audit --strict
89
- ```
@@ -1,49 +0,0 @@
1
- ## Requirements
2
-
3
- - Python 3.12+
4
- - uv for package management
5
- - Pydantic for the data parts.
6
-
7
- ## Installation
8
- ```
9
- pip install uv
10
- uv sync
11
- ```
12
-
13
- ## Publish the Python Package to PyPI
14
- - Increment the version of your package in the `__init__.py` file:
15
- ```
16
- """An amazing package!"""
17
-
18
- __version__ = 'x.y.z'
19
- ```
20
- - Publish
21
- ```
22
- uv build && uv publish
23
- ```
24
-
25
- ## SBOM & vulnerability check
26
-
27
- Install the SBOM dependencies:
28
-
29
- ```
30
- uv sync --extra sbom
31
- ```
32
-
33
- Generate a CycloneDX SBOM from the current environment:
34
-
35
- ```
36
- uv run cyclonedx-py environment -o sbom.cdx.json --output-format json
37
- ```
38
-
39
- Audit dependencies for known vulnerabilities:
40
-
41
- ```
42
- uv run pip-audit --format json --output audit-report.json
43
- ```
44
-
45
- To fail on any known vulnerability (useful in CI):
46
-
47
- ```
48
- uv run pip-audit --strict
49
- ```