Skip to content

Conversation

@lllangWV
Copy link
Member

@lllangWV lllangWV commented May 9, 2025

Subject: Refactor: Logging, Module Restructure, and Codebase Streamlining

This PR introduces a series of refactoring and cleanup changes aimed at improving the codebase's maintainability, organization, and user experience.

Key changes include:

  • Logging Overhaul (c701618):

    • Introduced new logging setup functionality for the MatGraphDB application.
    • Added a custom user-friendly formatter to enhance the visibility of warnings and errors.
    • Updated configuration loading to automatically create a user-specific config file if one doesn't exist, promoting consistent logging practices and a better user experience.
    • Refactored the config module to leverage the new logging setup and removed deprecated logging configurations from the YAML file.
  • Module Removal (0ba9d8e, bb15abb):

    • Deleted the entire calculations module and all its associated files (e.g., calc_manager.py, job_scheduler_generator.py, parsers.py).
    • Deleted the entire graph_kit module and all its associated files (e.g., data.py, graph_manager.py, metadata.py, nodes.py, relationships.py).
    • These removals are part of a broader effort to streamline the codebase by eliminating unused or redundant components. No existing functionality is affected as these modules were no longer required in the current architecture.
  • Import Path and Structure Refactoring:

    • Updated import paths for edge and node generators to reflect the new module structure.
    • Moved functions from matgraphdb.core.nodes and matgraphdb.core.edges to matgraphdb.generators.nodes and matgraphdb.generators.edges respectively.
    • Created a new material_store.py file to encapsulate the MaterialStore class, improving code organization and maintainability.
    • These changes enhance clarity and prepare the codebase for future development without affecting core logic.

These updates collectively contribute to a cleaner, more efficient, and developer-friendly codebase.

lllangWV added 6 commits May 9, 2025 12:45
…gurations

Added logging setup functionality to initialize logging for the
MatGraphDB application. This includes a custom user-friendly
formatter for better visibility of warnings and errors.

Updated configuration loading to create a user-specific config
file if it does not exist, enhancing user experience and
maintaining consistent logging practices.

Refactored the config module to utilize the new logging setup
and removed deprecated logging configurations from the YAML file.
Deleted the entire calculations module, including all related files
such as calc_manager.py, job_scheduler_generator.py, parsers.py,
and others. This change is part of a broader refactor to streamline
the codebase and remove unused or redundant components.

No functionality is affected as the calculations module is no longer
needed in the current architecture.
Deleted the entire graph_kit module, including all related files such as
data.py, graph_manager.py, metadata.py, nodes.py, relationships.py,
and others. This change is part of a broader refactor to streamline
the codebase and remove unused or redundant components.

No functionality is affected as the graph_kit module is no longer
needed in the current architecture.
Refactored the import paths for edge and node generators to align with
the new module structure. This change includes moving functions from
`matgraphdb.core.nodes` and `matgraphdb.core.edges` to
`matgraphdb.generators.nodes` and `matgraphdb.generators.edges`.

Additionally, created a new `material_store.py` file to encapsulate
the `MaterialStore` class, improving organization and maintainability
of the codebase.

No functionality is affected as the core logic remains intact, but
the restructuring enhances clarity and prepares for future development.
…g utility

Removed the `set_verbosity` function from `general_utils.py` and updated
the import in `material_store.py` to use `set_verbose_level` from
`log_utils.py`. This change aligns the logging configuration with the
new logging structure established in previous commits, improving
consistency and maintainability of the logging setup.
Replaced the existing material_0.parquet file with a new version. Due to the repository directory structure change, the metadata has to change
@lllangWV lllangWV merged commit b25bc65 into main May 9, 2025
8 checks passed
github-actions bot pushed a commit that referenced this pull request May 9, 2025
@github-actions github-actions bot mentioned this pull request May 9, 2025
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