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

Separate Network from OntologyNetwork #30

Merged
merged 4 commits into from
Mar 27, 2025
Merged

Separate Network from OntologyNetwork #30

merged 4 commits into from
Mar 27, 2025

Conversation

samwaseda
Copy link
Collaborator

Now I separated Network from OntologyNetwork in order to split OntologyNetwork into the ontology part and network part.

@samwaseda samwaseda requested review from srmnitc and Copilot March 27, 2025 16:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR separates network functionality from ontology-specific operations by splitting Network from OntologyNetwork, thereby isolating the graph and attribute initialization logic.

  • Introduces a new global utility function _strip_name.
  • Creates a new class Network to handle network-related initialization.
  • Refactors OntologyNetworkBase to subclass Network and inherit revised behaviors.
Comments suppressed due to low confidence (3)

tools4rdf/network/network.py:213

  • [nitpick] Consider converting _strip_name to a static method of the class if it is tightly coupled with its behavior, which may improve encapsulation and consistency when used in class methods.
                    % (_strip_name(source.variable_name), source.query_name)

tools4rdf/network/network.py:21

  • [nitpick] Please add a docstring to the Network class to clearly explain its purpose and how it differs from OntologyNetworkBase.
class Network:

tools4rdf/network/network.py:268

  • [nitpick] Review the duplicated initialization logic in OntologyNetworkBase; consider leveraging the Network superclass's init to avoid redundancy unless a distinct behavior is required.
class OntologyNetworkBase(Network):

@srmnitc srmnitc merged commit ccba832 into ontoterm Mar 27, 2025
2 checks passed
@srmnitc srmnitc deleted the network branch March 27, 2025 16:38
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