Detection of transitive deps with name not working correctly
LeonKalt opened this issue · 1 comments
in the following example the detection of the transitive dependency 'gitignore-parser' is not working correctly.
Example:
Running with the following configuration:
root: .
config: pyproject.toml
ignore_obsolete: ('gunicorn',)
ignore_missing: ()
ignore_transitive: ('gitignore-parser', 'dockerfile')
ignore_misplaced_dev: ()
skip_obsolete: False
skip_missing: False
skip_transitive: False
skip_misplaced_dev: False
exclude: ('venv', '\\.venv', '\\.direnv', 'tests', '\\.git', 'setup\\.py')
extend_exclude: ('.idea', '.mypy_cache', '.pytest_cache', '.rasa', 'python3.10', 'info', 'rasa-apple-silicon', 'nltk')
using_default_exclude: True
ignore_notebooks: True
requirements_txt: ('requirements.txt',)
requirements_txt_dev: ('dev-requirements.txt', 'requirements-dev.txt')
known_first_party: ()
json_output: None
pyproject.toml found!
pyproject.toml contains a [tool.poetry.dependencies] section, so Poetry is used to specify the project's dependencies.
The project contains the following dependencies:
Dependency 'flask' with top-levels: {'flask'}.
Dependency 'flask_cors' with top-levels: {'flask_cors'}.
Dependency 'pandas' with top-levels: {'pandas'}.
Dependency 'pydantic' with top-levels: {'pydantic'}.
Dependency 'rasa' with top-levels: {'rasa'}.
Dependency 'rasa-sdk' with top-levels: {'rasa_sdk'}.
Dependency 'requests' with top-levels: {'requests'}.
Dependency 'cachetools' with top-levels: {'cachetools'}.
Dependency 'gunicorn' with top-levels: {'gunicorn'}.
Dependency 'envsubst' with top-levels: {'envsubst'}.
Dependency 'PyYAML' with top-levels: {'yaml', 'pyyaml', '_yaml'}.
Dependency 'nltk' with top-levels: {'nltk'}.
Dependency 'fasttext-wheel' with top-levels: {'fasttext', 'fasttext_pybind', 'fasttext_wheel'}.
Dependency 'deepl' with top-levels: {'deepl'}.
Dependency 'python-dotenv' with top-levels: {'python_dotenv', 'dotenv'}.
Dependency 'psycopg2-binary' with top-levels: {'psycopg2', 'psycopg2_binary'}.
Dependency 'ruamel-yaml' with top-levels: {'ruamel_yaml', 'ruamel'}.
Dependency 'sqlalchemy' with top-levels: {'sqlalchemy'}.
Dependency 'sanic' with top-levels: {'sanic'}.
The project contains the following dev dependencies:
Dependency 'xlrd' with top-levels: {'xlrd'}.
Dependency 'pluggy' with top-levels: {'pluggy'}.
Dependency 'py' with top-levels: {'py'}.
Dependency 'pylint' with top-levels: {'pylint'}.
Dependency 'pytest' with top-levels: {'py', 'pytest', '_pytest'}.
Dependency 'pytest-asyncio' with top-levels: {'pytest_asyncio'}.
Dependency 'pytest-mock' with top-levels: {'pytest_mock'}.
Dependency 'pytest-cov' with top-levels: {'pytest_cov'}.
Dependency 'mockito' with top-levels: {'mockito'}.
Dependency 'black' with top-levels: {'blib2to3', 'blackd', 'black', '__pycache__'}.
Dependency 'mypy' with top-levels: {'mypy', 'mypyc', '6d28a1d37f08b66473e6__mypyc'}.
Dependency 'tomli' with top-levels: {'tomli'}.
Dependency 'types-requests' with top-levels: {'types_requests', 'requests-stubs'}.
Dependency 'types-cachetools' with top-levels: {'types_cachetools', 'cachetools-stubs'}.
Dependency 'deptry' with top-levels: {'deptry'}.
Collecting Python files to scan...
Python files to scan for imports:
tools/create_manifests.py
tools/preflight_checks.py
tools/generate_synonym_variants.py
tools/synonyms.py
tools/download_chitchat_dialog.py
tools/__init__.py
tools/timing_stats.py
tools/download_topics.py
tools/utils.py
tools/download_synonyms.py
tools/export_training_data.py
tools/simple_chksum.py
tools/export_script.py
tools/dockerfile_chksum.py
nlg/__init__.py
nlg/model.py
nlg/type_definitions.py
nlg/utils.py
nlg/app.py
nlg/blueprints/nlg_endpoints.py
customizations/__init__.py
customizations/language_handler.py
customizations/haufe_rest_channel.py
customizations/hrbot_sql_trackerstore.py
customizations/haufe_botframework_channel.py
message_renderer/__init__.py
message_renderer/adaptive_cards_renderer.py
message_renderer/native_rasa_renderer.py
actions/feedback_action.py
actions/alternative_answer_action.py
actions/list_contacts_action.py
actions/__init__.py
actions/set_slot_action.py
actions/custom_response_action.py
actions/utils/__init__.py
actions/utils/utils.py
Scanning 36 files...
Scanning tools/create_manifests.py...
Found the following imports in tools/create_manifests.py: {'typing', 'sys', 're', 'nlg', 'os', 'zipfile', 'argparse', 'logging'}
Scanning tools/preflight_checks.py...
Found the following imports in tools/preflight_checks.py: {'re', 'dotenv', 'sys', 'time', 'requests', 'random', 'yaml', 'os', 'base64'}
Scanning tools/generate_synonym_variants.py...
Found the following imports in tools/generate_synonym_variants.py: {'rasa', 'tools', 'argparse', 'logging', 'typing', 'sys'}
Scanning tools/synonyms.py...
Found the following imports in tools/synonyms.py: {'typing', 'nltk', 're', 'tools', 'os', 'dataclasses'}
Scanning tools/download_chitchat_dialog.py...
Found the following imports in tools/download_chitchat_dialog.py: {'typing', 'sys', 'json', 'nlg', 'os', 'ruamel', 'argparse', 'logging'}
Scanning tools/__init__.py...
Found the following imports in tools/__init__.py: set()
Scanning tools/timing_stats.py...
Found the following imports in tools/timing_stats.py: {'requests', 'logging', 'sys', 'csv', 'os', 'datetime'}
Scanning tools/download_topics.py...
Found the following imports in tools/download_topics.py: {'json', 're', 'rasa', 'nlg', 'hashlib', 'argparse', 'logging', 'typing', 'sys', 'os'}
Scanning tools/utils.py...
Found the following imports in tools/utils.py: {'random', 'typing', 'json'}
Scanning tools/download_synonyms.py...
Found the following imports in tools/download_synonyms.py: {'json', 'nlg', 'hashlib', 'logging', 'typing', 'sys', 'tools', 'argparse', 'os'}
Scanning tools/export_training_data.py...
Found the following imports in tools/export_training_data.py: {'nlg', 'logging', 'pandas', 'typing', 'sys', 'rasa', 'tools', 'shutil', 'argparse', 'os'}
Scanning tools/simple_chksum.py...
Found the following imports in tools/simple_chksum.py: {'typing', 'hashlib', 'argparse'}
Scanning tools/export_script.py...
Found the following imports in tools/export_script.py: {'tools'}
Scanning tools/dockerfile_chksum.py...
Found the following imports in tools/dockerfile_chksum.py: {'dockerfile', 'envsubst', 'urllib', 'hashlib', 'glob', 'argparse', 'tempfile', 'gitignore_parser', 'sys', 'os'}
Scanning nlg/__init__.py...
Found the following imports in nlg/__init__.py: {'logging', 'os'}
Scanning nlg/model.py...
Found the following imports in nlg/model.py: {'random', 'typing', 'json', 'sys', 'nlg', 'os', 'logging', 'requests'}
Scanning nlg/type_definitions.py...
Found the following imports in nlg/type_definitions.py: {'typing', 'pydantic', 'enum'}
Scanning nlg/utils.py...
Found the following imports in nlg/utils.py: {'typing', 'logging'}
Scanning nlg/app.py...
Found the following imports in nlg/app.py: {'flask', 'flask_cors'}
Scanning nlg/blueprints/nlg_endpoints.py...
Found the following imports in nlg/blueprints/nlg_endpoints.py: {'random', 'nlg', 'flask', 'logging', 'actions', 'typing', 'os'}
Scanning customizations/__init__.py...
Found the following imports in customizations/__init__.py: {'logging'}
Scanning customizations/language_handler.py...
Found the following imports in customizations/language_handler.py: {'rasa', 'fasttext', 'deepl', 'typing', 'os'}
Scanning customizations/haufe_rest_channel.py...
Found the following imports in customizations/haufe_rest_channel.py: {'typing', 'nlg', 'rasa', 'sanic', 'asyncio', 'message_renderer', 'inspect', 'logging'}
Scanning customizations/hrbot_sql_trackerstore.py...
Found the following imports in customizations/hrbot_sql_trackerstore.py: {'json', 'nlg', 'itertools', 'rasa', 'urllib', 'sqlalchemy', 'contextlib', 'logging', 'typing', 'time', 'psycopg2'}
Scanning customizations/haufe_botframework_channel.py...
Found the following imports in customizations/haufe_botframework_channel.py: {'json', 'nlg', 'rasa', 'logging', 'typing', 'os', 'cachetools', 'message_renderer', 'sanic', 'requests'}
Scanning message_renderer/__init__.py...
Found the following imports in message_renderer/__init__.py: {'logging', 'os'}
Scanning message_renderer/adaptive_cards_renderer.py...
Found the following imports in message_renderer/adaptive_cards_renderer.py: {'typing'}
Scanning message_renderer/native_rasa_renderer.py...
Found the following imports in message_renderer/native_rasa_renderer.py: {'typing'}
Scanning actions/feedback_action.py...
Found the following imports in actions/feedback_action.py: {'typing', 'nlg', 'logging', 'rasa_sdk'}
Scanning actions/alternative_answer_action.py...
Found the following imports in actions/alternative_answer_action.py: {'typing', 'nlg', 'logging', 'rasa_sdk'}
Scanning actions/list_contacts_action.py...
Found the following imports in actions/list_contacts_action.py: {'nlg', 'actions', 'logging', 'typing', 'rasa_sdk'}
Scanning actions/__init__.py...
Found the following imports in actions/__init__.py: {'logging', 'os'}
Scanning actions/set_slot_action.py...
Found the following imports in actions/set_slot_action.py: {'typing', 'logging', 'rasa_sdk'}
Scanning actions/custom_response_action.py...
Found the following imports in actions/custom_response_action.py: {'nlg', 'actions', 'logging', 'typing', 'rasa_sdk'}
Scanning actions/utils/__init__.py...
Found the following imports in actions/utils/__init__.py: set()
Scanning actions/utils/utils.py...
Found the following imports in actions/utils/utils.py: {'typing', 'nlg', 'logging', 'os'}
All imported modules: ['actions', 'argparse', 'asyncio', 'base64', 'cachetools', 'contextlib', 'csv', 'dataclasses', 'datetime', 'deepl', 'dockerfile', 'dotenv', 'enum', 'envsubst', 'fasttext', 'flask', 'flask_cors', 'gitignore_parser', 'glob', 'hashlib', 'inspect', 'itertools', 'json', 'logging', 'message_renderer', 'nlg', 'nltk', 'os', 'pandas', 'psycopg2', 'pydantic', 'random', 'rasa', 'rasa_sdk', 're', 'requests', 'ruamel', 'sanic', 'shutil', 'sqlalchemy', 'sys', 'tempfile', 'time', 'tools', 'typing', 'urllib', 'yaml', 'zipfile']
--- MODULE ---
name: actions
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: argparse
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: asyncio
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: base64
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: cachetools
standard_library: False
local_module: False
package: cachetools
top_levels: ['cachetools']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: contextlib
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: csv
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: dataclasses
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: datetime
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: deepl
standard_library: False
local_module: False
package: deepl
top_levels: ['deepl']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: dockerfile
standard_library: False
local_module: False
package: dockerfile
top_levels: []
dev_top_levels: []
is_dependency: False
is_dev_dependency: False
--- MODULE ---
name: dotenv
standard_library: False
local_module: False
package: None
top_levels: ['python-dotenv']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: enum
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: envsubst
standard_library: False
local_module: False
package: envsubst
top_levels: ['envsubst']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: fasttext
standard_library: False
local_module: False
package: None
top_levels: ['fasttext-wheel']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: flask
standard_library: False
local_module: False
package: Flask
top_levels: ['flask']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: flask_cors
standard_library: False
local_module: False
package: Flask-Cors
top_levels: ['flask_cors']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: gitignore_parser
standard_library: False
local_module: False
package: gitignore-parser
top_levels: []
dev_top_levels: []
is_dependency: False
is_dev_dependency: False
--- MODULE ---
name: glob
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: hashlib
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: inspect
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: itertools
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: json
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: logging
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: message_renderer
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: nlg
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: nltk
standard_library: False
local_module: False
package: nltk
top_levels: ['nltk']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: os
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: pandas
standard_library: False
local_module: False
package: pandas
top_levels: ['pandas']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: psycopg2
standard_library: False
local_module: False
package: None
top_levels: ['psycopg2-binary']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: pydantic
standard_library: False
local_module: False
package: pydantic
top_levels: ['pydantic']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: random
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: rasa
standard_library: False
local_module: False
package: rasa
top_levels: ['rasa']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: rasa_sdk
standard_library: False
local_module: False
package: rasa-sdk
top_levels: ['rasa-sdk']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: re
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: requests
standard_library: False
local_module: False
package: requests
top_levels: ['requests']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: ruamel
standard_library: False
local_module: False
package: None
top_levels: ['ruamel-yaml']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: sanic
standard_library: False
local_module: False
package: sanic
top_levels: ['sanic']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: shutil
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: sqlalchemy
standard_library: False
local_module: False
package: SQLAlchemy
top_levels: ['sqlalchemy']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: sys
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: tempfile
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: time
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: tools
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: typing
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: urllib
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: yaml
standard_library: False
local_module: False
package: None
top_levels: ['PyYAML']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: zipfile
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
Scanning for obsolete dependencies...
Scanning module flask...
Scanning module flask_cors...
Scanning module pandas...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa-sdk...
Scanning module requests...
Scanning module cachetools...
Scanning module gunicorn...
Dependency 'gunicorn' found to be obsolete, but ignoring.
Scanning module envsubst...
Scanning module PyYAML...
Scanning module nltk...
Scanning module fasttext-wheel...
Scanning module deepl...
Scanning module python-dotenv...
Scanning module psycopg2-binary...
Scanning module ruamel-yaml...
Scanning module sqlalchemy...
Scanning module sanic...
Scanning for missing dependencies...
Scanning module actions...
Scanning module cachetools...
Scanning module deepl...
Scanning module dockerfile...
Scanning module dotenv...
Scanning module envsubst...
Scanning module fasttext...
Scanning module flask...
Scanning module flask_cors...
Scanning module gitignore_parser...
Scanning module message_renderer...
Scanning module nlg...
Scanning module nltk...
Scanning module pandas...
Scanning module psycopg2...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa_sdk...
Scanning module requests...
Scanning module ruamel...
Scanning module sanic...
Scanning module sqlalchemy...
Scanning module tools...
Scanning module yaml...
Scanning for transitive dependencies...
Scanning module actions...
Scanning module cachetools...
Scanning module deepl...
Scanning module dockerfile...
Dependency 'dockerfile' found to be a transitive dependency, but ignoring.
Scanning module dotenv...
Scanning module envsubst...
Scanning module fasttext...
Scanning module flask...
Scanning module flask_cors...
Scanning module gitignore_parser...
Dependency 'gitignore-parser' marked as a transitive dependency.
Scanning module message_renderer...
Scanning module nlg...
Scanning module nltk...
Scanning module pandas...
Scanning module psycopg2...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa_sdk...
Scanning module requests...
Scanning module ruamel...
Scanning module sanic...
Scanning module sqlalchemy...
Scanning module tools...
Scanning module yaml...
Scanning for incorrect development dependencies...
Scanning module actions...
Scanning module cachetools...
Scanning module deepl...
Scanning module dockerfile...
Scanning module dotenv...
Scanning module envsubst...
Scanning module fasttext...
Scanning module flask...
Scanning module flask_cors...
Scanning module gitignore_parser...
Scanning module message_renderer...
Scanning module nlg...
Scanning module nltk...
Scanning module pandas...
Scanning module psycopg2...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa_sdk...
Scanning module requests...
Scanning module ruamel...
Scanning module sanic...
Scanning module sqlalchemy...
Scanning module tools...
Scanning module yaml...
There was 1 dependency issue found.
-----------------------------------------------------
There are transitive dependencies that should be explicitly defined as dependencies:
gitignore-parser
They are currently imported but not specified directly as your project's dependencies.
-----------------------------------------------------
From the poetry lock:
[[package]]
name = "gitignore-parser"
version = "0.1.3"
description = "A spec-compliant gitignore parser for Python 3.5+"
category = "dev"
optional = false
python-versions = "*"
files = [
{file = "gitignore_parser-0.1.3.tar.gz", hash = "sha256:d0150d81889251d00cde6cf38931ab5613ca1109f5b3905a232c8458ff0d6991"},
]
Adding "gitignore_parser" to the ignore list seems to resolve the issue:
poetry run deptry . --verbose
Running with the following configuration:
root: .
config: pyproject.toml
ignore_obsolete: ('gunicorn',)
ignore_missing: ()
ignore_transitive: ('gitignore_parser', 'dockerfile')
ignore_misplaced_dev: ()
skip_obsolete: False
skip_missing: False
skip_transitive: False
skip_misplaced_dev: False
exclude: ('venv', '\\.venv', '\\.direnv', 'tests', '\\.git', 'setup\\.py')
extend_exclude: ('.idea', '.mypy_cache', '.pytest_cache', '.rasa', 'python3.10', 'info', 'rasa-apple-silicon', 'nltk')
using_default_exclude: True
ignore_notebooks: True
requirements_txt: ('requirements.txt',)
requirements_txt_dev: ('dev-requirements.txt', 'requirements-dev.txt')
known_first_party: ()
json_output: None
pyproject.toml found!
pyproject.toml contains a [tool.poetry.dependencies] section, so Poetry is used to specify the project's dependencies.
The project contains the following dependencies:
Dependency 'flask' with top-levels: {'flask'}.
Dependency 'flask_cors' with top-levels: {'flask_cors'}.
Dependency 'pandas' with top-levels: {'pandas'}.
Dependency 'pydantic' with top-levels: {'pydantic'}.
Dependency 'rasa' with top-levels: {'rasa'}.
Dependency 'rasa-sdk' with top-levels: {'rasa_sdk'}.
Dependency 'requests' with top-levels: {'requests'}.
Dependency 'cachetools' with top-levels: {'cachetools'}.
Dependency 'gunicorn' with top-levels: {'gunicorn'}.
Dependency 'envsubst' with top-levels: {'envsubst'}.
Dependency 'PyYAML' with top-levels: {'yaml', '_yaml', 'pyyaml'}.
Dependency 'nltk' with top-levels: {'nltk'}.
Dependency 'fasttext-wheel' with top-levels: {'fasttext_pybind', 'fasttext_wheel', 'fasttext'}.
Dependency 'deepl' with top-levels: {'deepl'}.
Dependency 'python-dotenv' with top-levels: {'python_dotenv', 'dotenv'}.
Dependency 'psycopg2-binary' with top-levels: {'psycopg2', 'psycopg2_binary'}.
Dependency 'ruamel-yaml' with top-levels: {'ruamel', 'ruamel_yaml'}.
Dependency 'sqlalchemy' with top-levels: {'sqlalchemy'}.
Dependency 'sanic' with top-levels: {'sanic'}.
The project contains the following dev dependencies:
Dependency 'xlrd' with top-levels: {'xlrd'}.
Dependency 'pluggy' with top-levels: {'pluggy'}.
Dependency 'py' with top-levels: {'py'}.
Dependency 'pylint' with top-levels: {'pylint'}.
Dependency 'pytest' with top-levels: {'_pytest', 'py', 'pytest'}.
Dependency 'pytest-asyncio' with top-levels: {'pytest_asyncio'}.
Dependency 'pytest-mock' with top-levels: {'pytest_mock'}.
Dependency 'pytest-cov' with top-levels: {'pytest_cov'}.
Dependency 'mockito' with top-levels: {'mockito'}.
Dependency 'black' with top-levels: {'blib2to3', 'black', 'blackd', '__pycache__'}.
Dependency 'mypy' with top-levels: {'6d28a1d37f08b66473e6__mypyc', 'mypyc', 'mypy'}.
Dependency 'tomli' with top-levels: {'tomli'}.
Dependency 'types-requests' with top-levels: {'requests-stubs', 'types_requests'}.
Dependency 'types-cachetools' with top-levels: {'cachetools-stubs', 'types_cachetools'}.
Dependency 'deptry' with top-levels: {'deptry'}.
Collecting Python files to scan...
Python files to scan for imports:
tools/create_manifests.py
tools/preflight_checks.py
tools/generate_synonym_variants.py
tools/synonyms.py
tools/download_chitchat_dialog.py
tools/__init__.py
tools/timing_stats.py
tools/download_topics.py
tools/utils.py
tools/download_synonyms.py
tools/export_training_data.py
tools/simple_chksum.py
tools/export_script.py
tools/dockerfile_chksum.py
nlg/__init__.py
nlg/model.py
nlg/type_definitions.py
nlg/utils.py
nlg/app.py
nlg/blueprints/nlg_endpoints.py
customizations/__init__.py
customizations/language_handler.py
customizations/haufe_rest_channel.py
customizations/hrbot_sql_trackerstore.py
customizations/haufe_botframework_channel.py
message_renderer/__init__.py
message_renderer/adaptive_cards_renderer.py
message_renderer/native_rasa_renderer.py
actions/feedback_action.py
actions/alternative_answer_action.py
actions/list_contacts_action.py
actions/__init__.py
actions/set_slot_action.py
actions/custom_response_action.py
actions/utils/__init__.py
actions/utils/utils.py
Scanning 36 files...
Scanning tools/create_manifests.py...
Found the following imports in tools/create_manifests.py: {'logging', 'argparse', 're', 'sys', 'typing', 'nlg', 'os', 'zipfile'}
Scanning tools/preflight_checks.py...
Found the following imports in tools/preflight_checks.py: {'yaml', 'sys', 'base64', 'requests', 're', 'os', 'time', 'random', 'dotenv'}
Scanning tools/generate_synonym_variants.py...
Found the following imports in tools/generate_synonym_variants.py: {'logging', 'argparse', 'sys', 'rasa', 'typing', 'tools'}
Scanning tools/synonyms.py...
Found the following imports in tools/synonyms.py: {'nltk', 'dataclasses', 're', 'tools', 'typing', 'os'}
Scanning tools/download_chitchat_dialog.py...
Found the following imports in tools/download_chitchat_dialog.py: {'logging', 'json', 'ruamel', 'argparse', 'sys', 'typing', 'nlg', 'os'}
Scanning tools/__init__.py...
Found the following imports in tools/__init__.py: set()
Scanning tools/timing_stats.py...
Found the following imports in tools/timing_stats.py: {'datetime', 'os', 'csv', 'logging', 'sys', 'requests'}
Scanning tools/download_topics.py...
Found the following imports in tools/download_topics.py: {'hashlib', 're', 'os', 'json', 'logging', 'argparse', 'sys', 'rasa', 'typing', 'nlg'}
Scanning tools/utils.py...
Found the following imports in tools/utils.py: {'random', 'typing', 'json'}
Scanning tools/download_synonyms.py...
Found the following imports in tools/download_synonyms.py: {'hashlib', 'json', 'argparse', 'sys', 'typing', 'nlg', 'os', 'logging', 'tools'}
Scanning tools/export_training_data.py...
Found the following imports in tools/export_training_data.py: {'argparse', 'sys', 'rasa', 'typing', 'nlg', 'pandas', 'os', 'shutil', 'logging', 'tools'}
Scanning tools/simple_chksum.py...
Found the following imports in tools/simple_chksum.py: {'hashlib', 'typing', 'argparse'}
Scanning tools/export_script.py...
Found the following imports in tools/export_script.py: {'tools'}
Scanning tools/dockerfile_chksum.py...
Found the following imports in tools/dockerfile_chksum.py: {'envsubst', 'urllib', 'hashlib', 'os', 'tempfile', 'glob', 'argparse', 'sys', 'gitignore_parser', 'dockerfile'}
Scanning nlg/__init__.py...
Found the following imports in nlg/__init__.py: {'logging', 'os'}
Scanning nlg/model.py...
Found the following imports in nlg/model.py: {'json', 'logging', 'random', 'sys', 'typing', 'nlg', 'os', 'requests'}
Scanning nlg/type_definitions.py...
Found the following imports in nlg/type_definitions.py: {'enum', 'typing', 'pydantic'}
Scanning nlg/utils.py...
Found the following imports in nlg/utils.py: {'logging', 'typing'}
Scanning nlg/app.py...
Found the following imports in nlg/app.py: {'flask_cors', 'flask'}
Scanning nlg/blueprints/nlg_endpoints.py...
Found the following imports in nlg/blueprints/nlg_endpoints.py: {'os', 'actions', 'flask', 'logging', 'random', 'typing', 'nlg'}
Scanning customizations/__init__.py...
Found the following imports in customizations/__init__.py: {'logging'}
Scanning customizations/language_handler.py...
Found the following imports in customizations/language_handler.py: {'deepl', 'os', 'rasa', 'fasttext', 'typing'}
Scanning customizations/haufe_rest_channel.py...
Found the following imports in customizations/haufe_rest_channel.py: {'logging', 'inspect', 'message_renderer', 'asyncio', 'rasa', 'typing', 'nlg', 'sanic'}
Scanning customizations/hrbot_sql_trackerstore.py...
Found the following imports in customizations/hrbot_sql_trackerstore.py: {'urllib', 'contextlib', 'itertools', 'logging', 'json', 'time', 'rasa', 'typing', 'nlg', 'psycopg2', 'sqlalchemy'}
Scanning customizations/haufe_botframework_channel.py...
Found the following imports in customizations/haufe_botframework_channel.py: {'sanic', 'message_renderer', 'os', 'json', 'logging', 'rasa', 'typing', 'nlg', 'requests', 'cachetools'}
Scanning message_renderer/__init__.py...
Found the following imports in message_renderer/__init__.py: {'logging', 'os'}
Scanning message_renderer/adaptive_cards_renderer.py...
Found the following imports in message_renderer/adaptive_cards_renderer.py: {'typing'}
Scanning message_renderer/native_rasa_renderer.py...
Found the following imports in message_renderer/native_rasa_renderer.py: {'typing'}
Scanning actions/feedback_action.py...
Found the following imports in actions/feedback_action.py: {'logging', 'typing', 'rasa_sdk', 'nlg'}
Scanning actions/alternative_answer_action.py...
Found the following imports in actions/alternative_answer_action.py: {'logging', 'typing', 'rasa_sdk', 'nlg'}
Scanning actions/list_contacts_action.py...
Found the following imports in actions/list_contacts_action.py: {'rasa_sdk', 'actions', 'logging', 'typing', 'nlg'}
Scanning actions/__init__.py...
Found the following imports in actions/__init__.py: {'logging', 'os'}
Scanning actions/set_slot_action.py...
Found the following imports in actions/set_slot_action.py: {'logging', 'typing', 'rasa_sdk'}
Scanning actions/custom_response_action.py...
Found the following imports in actions/custom_response_action.py: {'rasa_sdk', 'actions', 'logging', 'typing', 'nlg'}
Scanning actions/utils/__init__.py...
Found the following imports in actions/utils/__init__.py: set()
Scanning actions/utils/utils.py...
Found the following imports in actions/utils/utils.py: {'logging', 'typing', 'os', 'nlg'}
All imported modules: ['actions', 'argparse', 'asyncio', 'base64', 'cachetools', 'contextlib', 'csv', 'dataclasses', 'datetime', 'deepl', 'dockerfile', 'dotenv', 'enum', 'envsubst', 'fasttext', 'flask', 'flask_cors', 'gitignore_parser', 'glob', 'hashlib', 'inspect', 'itertools', 'json', 'logging', 'message_renderer', 'nlg', 'nltk', 'os', 'pandas', 'psycopg2', 'pydantic', 'random', 'rasa', 'rasa_sdk', 're', 'requests', 'ruamel', 'sanic', 'shutil', 'sqlalchemy', 'sys', 'tempfile', 'time', 'tools', 'typing', 'urllib', 'yaml', 'zipfile']
--- MODULE ---
name: actions
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: argparse
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: asyncio
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: base64
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: cachetools
standard_library: False
local_module: False
package: cachetools
top_levels: ['cachetools']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: contextlib
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: csv
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: dataclasses
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: datetime
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: deepl
standard_library: False
local_module: False
package: deepl
top_levels: ['deepl']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: dockerfile
standard_library: False
local_module: False
package: dockerfile
top_levels: []
dev_top_levels: []
is_dependency: False
is_dev_dependency: False
--- MODULE ---
name: dotenv
standard_library: False
local_module: False
package: None
top_levels: ['python-dotenv']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: enum
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: envsubst
standard_library: False
local_module: False
package: envsubst
top_levels: ['envsubst']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: fasttext
standard_library: False
local_module: False
package: None
top_levels: ['fasttext-wheel']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: flask
standard_library: False
local_module: False
package: Flask
top_levels: ['flask']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: flask_cors
standard_library: False
local_module: False
package: Flask-Cors
top_levels: ['flask_cors']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: gitignore_parser
standard_library: False
local_module: False
package: gitignore-parser
top_levels: []
dev_top_levels: []
is_dependency: False
is_dev_dependency: False
--- MODULE ---
name: glob
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: hashlib
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: inspect
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: itertools
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: json
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: logging
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: message_renderer
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: nlg
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: nltk
standard_library: False
local_module: False
package: nltk
top_levels: ['nltk']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: os
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: pandas
standard_library: False
local_module: False
package: pandas
top_levels: ['pandas']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: psycopg2
standard_library: False
local_module: False
package: None
top_levels: ['psycopg2-binary']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: pydantic
standard_library: False
local_module: False
package: pydantic
top_levels: ['pydantic']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: random
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: rasa
standard_library: False
local_module: False
package: rasa
top_levels: ['rasa']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: rasa_sdk
standard_library: False
local_module: False
package: rasa-sdk
top_levels: ['rasa-sdk']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: re
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: requests
standard_library: False
local_module: False
package: requests
top_levels: ['requests']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: ruamel
standard_library: False
local_module: False
package: None
top_levels: ['ruamel-yaml']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: sanic
standard_library: False
local_module: False
package: sanic
top_levels: ['sanic']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: shutil
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: sqlalchemy
standard_library: False
local_module: False
package: SQLAlchemy
top_levels: ['sqlalchemy']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: sys
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: tempfile
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: time
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: tools
standard_library: False
local_module: True
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: typing
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: urllib
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
--- MODULE ---
name: yaml
standard_library: False
local_module: False
package: None
top_levels: ['PyYAML']
dev_top_levels: []
is_dependency: True
is_dev_dependency: False
--- MODULE ---
name: zipfile
standard_library: True
local_module: False
package: None
top_levels: None
dev_top_levels: None
is_dependency: None
is_dev_dependency: None
Scanning for obsolete dependencies...
Scanning module flask...
Scanning module flask_cors...
Scanning module pandas...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa-sdk...
Scanning module requests...
Scanning module cachetools...
Scanning module gunicorn...
Dependency 'gunicorn' found to be obsolete, but ignoring.
Scanning module envsubst...
Scanning module PyYAML...
Scanning module nltk...
Scanning module fasttext-wheel...
Scanning module deepl...
Scanning module python-dotenv...
Scanning module psycopg2-binary...
Scanning module ruamel-yaml...
Scanning module sqlalchemy...
Scanning module sanic...
Scanning for missing dependencies...
Scanning module actions...
Scanning module cachetools...
Scanning module deepl...
Scanning module dockerfile...
Scanning module dotenv...
Scanning module envsubst...
Scanning module fasttext...
Scanning module flask...
Scanning module flask_cors...
Scanning module gitignore_parser...
Scanning module message_renderer...
Scanning module nlg...
Scanning module nltk...
Scanning module pandas...
Scanning module psycopg2...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa_sdk...
Scanning module requests...
Scanning module ruamel...
Scanning module sanic...
Scanning module sqlalchemy...
Scanning module tools...
Scanning module yaml...
Scanning for transitive dependencies...
Scanning module actions...
Scanning module cachetools...
Scanning module deepl...
Scanning module dockerfile...
Dependency 'dockerfile' found to be a transitive dependency, but ignoring.
Scanning module dotenv...
Scanning module envsubst...
Scanning module fasttext...
Scanning module flask...
Scanning module flask_cors...
Scanning module gitignore_parser...
Dependency 'gitignore-parser' found to be a transitive dependency, but ignoring.
Scanning module message_renderer...
Scanning module nlg...
Scanning module nltk...
Scanning module pandas...
Scanning module psycopg2...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa_sdk...
Scanning module requests...
Scanning module ruamel...
Scanning module sanic...
Scanning module sqlalchemy...
Scanning module tools...
Scanning module yaml...
Scanning for incorrect development dependencies...
Scanning module actions...
Scanning module cachetools...
Scanning module deepl...
Scanning module dockerfile...
Scanning module dotenv...
Scanning module envsubst...
Scanning module fasttext...
Scanning module flask...
Scanning module flask_cors...
Scanning module gitignore_parser...
Scanning module message_renderer...
Scanning module nlg...
Scanning module nltk...
Scanning module pandas...
Scanning module psycopg2...
Scanning module pydantic...
Scanning module rasa...
Scanning module rasa_sdk...
Scanning module requests...
Scanning module ruamel...
Scanning module sanic...
Scanning module sqlalchemy...
Scanning module tools...
Scanning module yaml...
Success! No dependency issues found.
I had to read the issue multiple times to make sure I understand correctly (the long output didn't help -- you can use https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections to make it collapsible).
If I understand correctly, the issue you report is that you can ignore the transitive dependency by specifying the module name (gitignore_parser
) but not the package name (gitignore-parser
)?
If so, while it can be confusing, this is not really an issue but the expected behaviour, as transitive/misplaced dev/missing dependencies must use the Python module name and not the package name. Maybe this should be explained in the documentation, as it is not specified today.