Skip to content

Commit

Permalink
add more module mappings for popular packages (pantsbuild#20551)
Browse files Browse the repository at this point in the history
Added more default module mappings of popular packages

* alphabetized the dictionaries
* opentelemetry packages are from
[here](https://opentelemetry-python.readthedocs.io/en/latest/api/index.html)
  • Loading branch information
purajit authored Feb 16, 2024
1 parent b9c52ca commit dc7d4b6
Showing 1 changed file with 31 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,33 @@ def two_groups_hyphens_two_replacements_with_suffix(
"beautifulsoup4": ("bs4",),
"bitvector": ("BitVector",),
"cattrs": ("cattr", "cattrs"),
"django-filter": ("django_filters",),
"django-postgres-extra": ("psqlextra",),
"django-cors-headers": ("corsheaders",),
"django-countries": ("django_countries",),
"django-filter": ("django_filters",),
"django-fsm": ("django_fsm",),
"django-object-actions": ("django_object_actions",),
"django-postgres-extra": ("psqlextra",),
"django-redis": ("django_redis",),
"django-scim2": ("django_scim",),
"djangorestframework": ("rest_framework",),
"djangorestframework-api-key": ("rest_framework_api_key",),
"djangorestframework-dataclasses": ("rest_framework_dataclasses",),
"djangorestframework-queryfields": ("drf_queryfields",),
"djangorestframework-simplejwt": ("rest_framework_simplejwt",),
"elastic-apm": ("elasticapm",),
"enum34": ("enum",),
"factory-boy": ("factory",),
"fluent-logger": ("fluent",),
"gitpython": ("git",),
"google-api-python-client": ("googleapiclient",),
"google-auth": (
"google.auth",
"google.oauth2",
),
"graphql-core": ("graphql",),
"grpcio": ("grpc",),
"grpcio-health-checking": ("grpc_health",),
"grpcio-reflection": ("grpc_reflection",),
"honeycomb-opentelemetry": ("honeycomb.opentelemetry",),
"ipython": ("IPython",),
"jack-client": ("jack",),
Expand All @@ -109,14 +119,25 @@ def two_groups_hyphens_two_replacements_with_suffix(
"mail-parser": ("mailparser",),
"mysql-connector-python": ("mysql.connector",),
"opencv-python": ("cv2",),
"opencv-python-headless": ("cv2",),
"opensearch-py": ("opensearchpy",),
# opentelemetry
"opentelemetry-api": ("opentelemetry",),
"opentelemetry-instrumentation-kafka-python": ("opentelemetry.instrumentation.kafka",),
"opentelemetry-exporter-otlp": ("opentelemetry.exporter",),
"opentelemetry-exporter-otlp-proto-grpc": ("opentelemetry.exporter.otlp.proto.grpc",),
"opentelemetry-exporter-otlp-proto-http": ("opentelemetry.exporter.otlp.proto.http",),
"opentelemetry-sdk": ("opentelemetry.sdk",),
"opentelemetry-instrumentation-kafka-python": ("opentelemetry.instrumentation.kafka",),
"opentelemetry-sdk": (
"opentelemetry._logs",
"opentelemetry.baggage",
"opentelemetry.context",
"opentelemetry.environment_variables",
"opentelemetry.metrics",
"opentelemetry.propagate",
"opentelemetry.propagators",
"opentelemetry.sdk",
"opentelemetry.trace",
),
"opentelemetry-test-utils": ("opentelemetry.test",),
"paho-mqtt": ("paho",),
"phonenumberslite": ("phonenumbers",),
Expand All @@ -126,33 +147,33 @@ def two_groups_hyphens_two_replacements_with_suffix(
"protobuf": ("google.protobuf",),
"psycopg2-binary": ("psycopg2",),
"pycrypto": ("Crypto",),
"pykube-ng": ("pykube",),
"pyhamcrest": ("hamcrest",),
"pygithub": ("github",),
"pygobject": ("gi",),
"pyhamcrest": ("hamcrest",),
"pyjwt": ("jwt",),
"pykube-ng": ("pykube",),
"pymongo": ("bson", "gridfs", "pymongo"),
"pymupdf": ("fitz",),
"pyopenssl": ("OpenSSL",),
"pypdf2": ("PyPDF2",),
"pypi-kenlm": ("kenlm",),
"pysocks": ("socks",),
"pytest": ("pytest", "_pytest"),
"pyyaml": ("yaml",),
"pymongo": ("bson", "gridfs", "pymongo"),
"pymupdf": ("fitz",),
"pytest-runner": ("ptr",),
"python-json-logger": ("pythonjsonlogger",),
"python-levenshtein": ("Levenshtein",),
"python-lsp-jsonrpc": ("pylsp_jsonrpc",),
"pywinrm": ("winrm",),
"pyyaml": ("yaml",),
"randomwords": ("random_words",),
"scikit-image": ("skimage",),
"scikit-learn": ("sklearn",),
"scikit-video": ("skvideo",),
"sseclient-py": ("sseclient",),
"setuptools": ("easy_install", "pkg_resources", "setuptools"),
"snowflake-connector-python": ("snowflake.connector",),
"snowflake-snowpark-python": ("snowflake.snowpark",),
"snowflake-sqlalchemy": ("snowflake.sqlalchemy",),
"sseclient-py": ("sseclient",),
"strawberry-graphql": ("strawberry",),
"streamlit-aggrid": ("st_aggrid",),
"unleashclient": ("UnleashClient",),
Expand Down

0 comments on commit dc7d4b6

Please sign in to comment.