ClimateMind / ClimateMind/climatemind-backend

Refactor network_x_processor

Open
#341 0 comments 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
Python
Stars
24
Forks
20
PR merge metrics
No merged PRs in 30d

Description

### What to refactor?

- Currently, there are plenty of loops across `G.nodes` list which could be optimized in some way.
- `app/network_x_tools/network_x_processor.py` could be also used to do general operations with DiGraph (G) such as:
- search.
- get effects
- get solutions

### Refactor reason

Code duplication and PEP8

### Tests

- [ ] unit tests

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading app/network_x_tools/network_x_processor.py and tracing the existing loops across G.nodes. Identify the duplicated graph operations described in the issue, then add unit tests for the resulting behavior before confirming the refactor preserves search, effects, and solutions handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.