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

Technical Debt Refactoring #130

Open
EvanDietzMorris opened this issue Oct 12, 2022 · 1 comment
Open

Technical Debt Refactoring #130

EvanDietzMorris opened this issue Oct 12, 2022 · 1 comment

Comments

@EvanDietzMorris
Copy link
Contributor

The code base is suffering from quite a bit of "tech debt". Here are some ideas for refactoring:

Across the code base nodes and edges sometimes use objects (kgxnode and kgxedge) and sometimes are represented in python dictionaries. Using dictionaries simplified reading and writing json files among other things, but it's really not ideal. We should replace all or most usage of dictionaries with real objects.

Most of the node types, attribute names, and other strings that should be constants defined in one place are set up correctly now, but not all of them. Specifically, as mentioned above, nodes are sometimes represented as dictionaries and the properties "id" "name" and "category" are hard coded in many places. Using objects would solve this but something like "category" should not be in multiple places in the code base, it should be a constant.

Some files are named poorly and should be moved around so that new developers can more quickly understand the overall structure. Load_manager and build_manager should be renamed and moved, as they are the entry points for usage, and those names are bad. Node and edge normalization should be moved out of utils. The "kgx" terminology is over used. "node_types" holds more than just node types now.

@EvanDietzMorris
Copy link
Contributor Author

node_types was renamed biolink_constants. The rest is still valid, though we need to be careful about coding best practices vs performance.

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

No branches or pull requests

1 participant