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

Update Pathfinder API with Constraint Setup Documentation #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarvinTorres
Copy link
Contributor

@MarvinTorres MarvinTorres commented Jul 16, 2020

This resolves #61

Currently, users are unable to pick out the most ideal best paths for them in Pathfinder's UI based on the path's metadata. This PR fixes that by providing an API for specifying constraints in the form of attributes, such as delay must be at most 30 units and delay can be at most 30 units or bandwidth can be at least 30 units

Note that the response body is significantly different than its current iteration - it now contains both the attributes of the best paths and the best paths themselves.

You can preview the updated API through the Swagger online editor.

@MarvinTorres MarvinTorres changed the title Add API Update Pathfinder API to document constraint setup Jul 16, 2020
@MarvinTorres MarvinTorres changed the title Update Pathfinder API to document constraint setup Update Pathfinder API with Constraint Setup Documentation Jul 16, 2020
MarvinTorres added a commit to MarvinTorres/pathfinder that referenced this pull request Jul 29, 2020
MarvinTorres added a commit to MarvinTorres/pathfinder that referenced this pull request Jul 29, 2020
MarvinTorres added a commit to MarvinTorres/pathfinder that referenced this pull request Jul 29, 2020
 - test_graph now test_search_results
 - test_graph1, 2, 3 now test_search1_results1, 2, 3
 - fixed test_constrained_path9 in test_search_results1
 - class names changed to reflect new file names
 - moved files to unit folder

Fixed padding in graph.py

Cleaned up constrained_flexible_paths and added comments

 - compacted default_edge_list and flexible assignments
 - renamed some variables
 - changed loop from for to while

Removed failing tests for checking

Fixed formatting issues

Fixed more formatting issues

Minimized local variable count

 - 5 parameters instead of 6
 - 17 local vars instead of 18

Fixed all formatting errors

Fixed minor formatting error

Changed logic to support code reuse

Revamped parameter passing.

 - calling constrained flexible paths is now more user-friendly
 - test updated to reflect changes.

Changed REST API parameters

Fixed KytosGraph import in Main

Implement Humberto's fixes

Updated comments and changed endpoints for new UI

Added missing endpoint changes

Updated KytosGraph, TestResults and subclasses
 - KytosGraph
   - set_path_function removed.
 - TestResults
   - test_setup method removed.
   - setup method renamed to setUp to run at the start of every test
 - TestResultsSimple, TestResultsMetaData, TestResultsEdges
   - Removed explicit setup call

Gave better descriptions to test subclasses.

Undid KytosGraph import change in Main.

Linting fixes
 - TestResults
   - removed unused import.
 - TestResultsMetadata
   - fixed two methods with same name.

Fixed JSON serialization of error message

Re-added methods and reverted update_links

Fixed linting issue

changed extend back to append

Update tests/unit/test_results.py

Standardized decorators

Co-authored-by: Gleyberson Andrade <[email protected]>
Updated return values of shortest_constrained_path
   - Returns 400 BAD REQUEST if user provides an illegal attribute value

Remove space from decorator

Changed maximum misses variable to minimum hits
   - This is to reflect changes from kytos#62

Co-authored-by: Humberto Diógenes <[email protected]>
MarvinTorres added a commit to MarvinTorres/pathfinder that referenced this pull request Jul 29, 2020
 - Renamed and moved tests
 - test_graph now test_search_results
 - test_graph1, 2, 3 now test_search1_results1, 2, 3
 - fixed test_constrained_path9 in test_search_results1
 - class names changed to reflect new file names
 - moved files to unit folder

Fixed padding in graph.py

Cleaned up constrained_flexible_paths and added comments

 - compacted default_edge_list and flexible assignments
 - renamed some variables
 - changed loop from for to while

Removed failing tests for checking

Fixed formatting issues

Fixed more formatting issues

Minimized local variable count

 - 5 parameters instead of 6
 - 17 local vars instead of 18

Fixed all formatting errors

Fixed minor formatting error

Changed logic to support code reuse

Revamped parameter passing.

 - calling constrained flexible paths is now more user-friendly
 - test updated to reflect changes.

Changed REST API parameters

Fixed KytosGraph import in Main

Implement Humberto's fixes

Updated comments and changed endpoints for new UI

Added missing endpoint changes

Updated KytosGraph, TestResults and subclasses
 - KytosGraph
   - set_path_function removed.
 - TestResults
   - test_setup method removed.
   - setup method renamed to setUp to run at the start of every test
 - TestResultsSimple, TestResultsMetaData, TestResultsEdges
   - Removed explicit setup call

Gave better descriptions to test subclasses.

Undid KytosGraph import change in Main.

Linting fixes
 - TestResults
   - removed unused import.
 - TestResultsMetadata
   - fixed two methods with same name.

Fixed JSON serialization of error message

Re-added methods and reverted update_links

Fixed linting issue

changed extend back to append

Update tests/unit/test_results.py

Standardized decorators

Co-authored-by: Gleyberson Andrade <[email protected]>
Updated return values of shortest_constrained_path
   - Returns 400 BAD REQUEST if user provides an illegal attribute value

Remove space from decorator

Changed maximum misses variable to minimum hits
   - This is to reflect changes from kytos#62

Co-authored-by: Humberto Diógenes <[email protected]>
MarvinTorres added a commit to MarvinTorres/pathfinder that referenced this pull request Aug 6, 2020
 - Renamed and moved tests
 - test_graph now test_search_results
 - test_graph1, 2, 3 now test_search1_results1, 2, 3
 - fixed test_constrained_path9 in test_search_results1
 - class names changed to reflect new file names
 - moved files to unit folder

Fixed padding in graph.py

Cleaned up constrained_flexible_paths and added comments

 - compacted default_edge_list and flexible assignments
 - renamed some variables
 - changed loop from for to while

Removed failing tests for checking

Fixed formatting issues

Fixed more formatting issues

Minimized local variable count

 - 5 parameters instead of 6
 - 17 local vars instead of 18

Fixed all formatting errors

Fixed minor formatting error

Changed logic to support code reuse

Revamped parameter passing.

 - calling constrained flexible paths is now more user-friendly
 - test updated to reflect changes.

Changed REST API parameters

Fixed KytosGraph import in Main

Implement Humberto's fixes

Updated comments and changed endpoints for new UI

Added missing endpoint changes

Updated KytosGraph, TestResults and subclasses
 - KytosGraph
   - set_path_function removed.
 - TestResults
   - test_setup method removed.
   - setup method renamed to setUp to run at the start of every test
 - TestResultsSimple, TestResultsMetaData, TestResultsEdges
   - Removed explicit setup call

Gave better descriptions to test subclasses.

Undid KytosGraph import change in Main.

Linting fixes
 - TestResults
   - removed unused import.
 - TestResultsMetadata
   - fixed two methods with same name.

Fixed JSON serialization of error message

Re-added methods and reverted update_links

Fixed linting issue

changed extend back to append

Update tests/unit/test_results.py

Standardized decorators

Co-authored-by: Gleyberson Andrade <[email protected]>
Updated return values of shortest_constrained_path
   - Returns 400 BAD REQUEST if user provides an illegal attribute value

Remove space from decorator

Changed maximum misses variable to minimum hits
   - This is to reflect changes from kytos#62

Co-authored-by: Humberto Diógenes <[email protected]>

Set up mock graph with metadata

Updated testing structure and files
   - test_results and children were moved to integration folder
   - test_graph and test_main now test our added methods
   - test_filter added
   - methods added to test helper

Linting fixes
ArturoQuintana pushed a commit to ArturoQuintana/pathfinder that referenced this pull request Feb 8, 2021
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.

Update Pathfinder API
1 participant