Massive refactoring of the base code imported from bdit_vfh.
Changes:
Moved linkers and graphers into their own subfolders.
Created a fixture in conftest.py that imports the Austin test data only once for the entire test suite. Derived fixtures modify the test data to suit each test class.
Moved all tests into a dedicated test suite that mirrors the main codebase. This file structure was chosen (instead of having a test folder for each section of the code, like for Baseband) so that a session scope fixture declared in conftest.py can be imported by the entire test suite. I found that this wasn't possible if the tests were spread out across the main code.
Refactor linker so that each bipartite linker algorithm is a class, inheriting from BipartiteLinkerBase which houses the digraph_to_bipartite and matching_to_digraph routines.
Fix linkers so they use a common API - initialization sets configuration parameters, and get_solution(feasible_network) returns the solution.
Reworked all tests so they can function under this framework.
This is all STILL A WORK IN PROGRESS - namely the refactoring isn't finished, various components (mainly in agent.py) are not integrated into class structure or tested, and there are a lost of vestigial handles (return_matching=True isn't eliminated). The reason we should push to master right now is to a). set up continuing integration and b). work with smaller PRs that refactor individual components, which can only happen once we set up our folder structures and broad class inheritance trees.
Massive refactoring of the base code imported from
bdit_vfh
.Changes:
conftest.py
that imports the Austin test data only once for the entire test suite. Derived fixtures modify the test data to suit each test class.session
scope fixture declared inconftest.py
can be imported by the entire test suite. I found that this wasn't possible if the tests were spread out across the main code.linker
so that each bipartite linker algorithm is a class, inheriting fromBipartiteLinkerBase
which houses thedigraph_to_bipartite
andmatching_to_digraph
routines.get_solution(feasible_network)
returns the solution.This is all STILL A WORK IN PROGRESS - namely the refactoring isn't finished, various components (mainly in
agent.py
) are not integrated into class structure or tested, and there are a lost of vestigial handles (return_matching=True
isn't eliminated). The reason we should push to master right now is to a). set up continuing integration and b). work with smaller PRs that refactor individual components, which can only happen once we set up our folder structures and broad class inheritance trees.