_package_name_tools
normalize_package_name(pkg_name)
¶
Implement both PyPa and custom package-name normalization
- PyPa normalization: The name should be lowercased with all runs of the
characters
.
,-
, or_
replaced with a single-
character (https://packaging.python.org/en/latest/specifications/name-normalization). - Custom normalization: Replace
-
with_
, to obtain the imported-module name.
PARAMETER | DESCRIPTION |
---|---|
pkg_name
|
The non-normalized package name.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The normalized package name. |
Source code in src/fractal_task_tools/_package_name_tools.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|