Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dependencies with deptry #338

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fpgmaas
Copy link
Contributor

@fpgmaas fpgmaas commented Jul 3, 2024

The project seems to contain some issues with the dependencies. These can be detected by running deptry.

  • matplotlib, pandas and pyarrow are transitive dependencies. It would be a good idea to specify those as dependencies explicitly, to prevent the project from unexpectedly breaking in the future when one of the transitive dependencies is dropped.
  • umap is missing from the project's dependencies.
  • numba, fastparquet, scipy, swifter and textual are specified as dependencies, but they don't seem to be used in the codebase.

The detailed log of running deptry can be found below.

This PR aims to solve the issues with the project's dependencies. In a future PR we could consider adding it to the CI/CD pipeline to make sure the dependencies stay up-to-date.

deptry .
Scanning 417 files...

examples/custom_input/run.py:6:8: DEP003 'pandas' imported but it is a transitive dependency
examples/custom_set_of_available_verbs/run.py:6:8: DEP003 'pandas' imported but it is a transitive dependency
examples/custom_set_of_available_workflows/run.py:6:8: DEP003 'pandas' imported but it is a transitive dependency
examples/interdependent_workflows/run.py:6:8: DEP003 'pandas' imported but it is a transitive dependency
examples/single_verb/run.py:6:8: DEP003 'pandas' imported but it is a transitive dependency
examples_notebooks/global_search.ipynb:5:8: DEP003 'pandas' imported but it is a transitive dependency
examples_notebooks/local_search.ipynb:5:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/emit/csv_table_emitter.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/emit/json_table_emitter.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/emit/parquet_table_emitter.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/emit/parquet_table_emitter.py:10:1: DEP003 'pyarrow' imported but it is a transitive dependency
graphrag/index/emit/table_emitter.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/graph/extractors/community_reports/build_mixed_context.py:5:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/graph/extractors/community_reports/prep_community_report_context.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/graph/extractors/community_reports/sort_context.py:5:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/graph/extractors/community_reports/utils.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/graph/visualization/compute_umap_positions.py:7:8: DEP003 'matplotlib' imported but it is a transitive dependency
graphrag/index/graph/visualization/compute_umap_positions.py:10:8: DEP001 'umap' imported but missing from the dependency definitions
graphrag/index/input/csv.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/input/load_input.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/input/text.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/run.py:18:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/text_splitting/text_splitting.py:14:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/typing.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/utils/dataframes.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/utils/dataframes.py:10:1: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/covariates/extract_covariates/extract_covariates.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/entities/extraction/entity_extract.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/entities/summarize/description_summarize.py:12:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/genid.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/clustering/cluster_graph.py:12:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/compute_edge_combined_degree.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/create.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/embed/embed_graph.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/layout/layout_graph.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/merge/merge_graphs.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/report/create_community_reports.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/report/prepare_community_reports.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/report/prepare_community_reports_claims.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/report/prepare_community_reports_edges.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/report/prepare_community_reports_nodes.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/report/restore_community_hierarchy.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/graph/unpack.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/overrides/aggregate.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/overrides/concat.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/overrides/merge.py:12:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/spread_json.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/text/chunk/text_chunk.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/text/embed/text_embed.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/text/replace/replace.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/text/split.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/text/translate/text_translate.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/unzip.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/index/verbs/zip.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/prompt_tune/loader/input.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/cli.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/context_builder/builders.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/context_builder/community_context.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/context_builder/conversation_history.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/context_builder/local_context.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/context_builder/source_context.py:9:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/indexer_adapters.py:11:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/loaders/dfs.py:6:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/loaders/utils.py:7:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/retrieval/community_reports.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/retrieval/covariates.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/retrieval/entities.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/retrieval/relationships.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/input/retrieval/text_units.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/structured_search/base.py:10:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/structured_search/global_search/community_context.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/structured_search/global_search/search.py:13:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/query/structured_search/local_search/mixed_context.py:8:8: DEP003 'pandas' imported but it is a transitive dependency
graphrag/vector_stores/lancedb.py:12:8: DEP003 'pyarrow' imported but it is a transitive dependency
pyproject.toml: DEP002 'numba' defined as a dependency but not used in the codebase
pyproject.toml: DEP002 'fastparquet' defined as a dependency but not used in the codebase
pyproject.toml: DEP002 'scipy' defined as a dependency but not used in the codebase
pyproject.toml: DEP002 'swifter' defined as a dependency but not used in the codebase
pyproject.toml: DEP002 'textual' defined as a dependency but not used in the codebase
Found 79 dependency issues.

For more information, see the documentation: https://deptry.com/

Disclaimer: I am the author of deptry.

@fpgmaas fpgmaas requested a review from a team as a code owner July 3, 2024 08:10
@fpgmaas
Copy link
Contributor Author

fpgmaas commented Jul 3, 2024

@fpgmaas please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@fpgmaas
Copy link
Contributor Author

fpgmaas commented Jul 13, 2024

Hi @AlonsoGuevara, did you maybe have the time to look into this? Could you approve the workflows to verify that the unit tests still pass? I understand that you may be quite busy with maintaining this new repo, so no rush. Thanks!

@AlonsoGuevara AlonsoGuevara requested a review from a team as a code owner September 19, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants