-
Notifications
You must be signed in to change notification settings - Fork 26
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
[FDS-1797] input graph api #1481
Open
afwillia
wants to merge
137
commits into
develop
Choose a base branch
from
FDS-1797-input-graph-api
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
137 commits
Select commit
Hold shift + click to select a range
2527224
WIP: add export_as_graph flag to convert CLI command.
afwillia 70bfc19
Add convert CLI test for exporting graph as a pickle.
afwillia 5b41aa5
Add export_as_graph to help.py and update the CLI click docs.
afwillia 76a5567
Change export_as_graph to output_format and specify graph, jsonld, or…
afwillia 670b5c7
Add tests for CLI convert output_type options.
afwillia a87d2fe
Change text of CLI convert output_type help.
afwillia 07dbd70
Test that jsonld is created correctly by convert CLI
afwillia 421c59a
Add type hints to convert, clean up formatting issues from sonarcloud…
afwillia 2f5abf1
Add convert CLI test for not specifying --output_type
afwillia 119cf40
Merge branch 'Sage-Bionetworks:develop' into FDS-1796-schema-convert-…
afwillia c6c5cb8
parameterize the convert CLI test.
afwillia dd8b2cd
remove unused test code for the convert CLI.
afwillia 6ec81db
run black on the updated files.
afwillia bbe6c98
Use logger.info and logger.error instead of click.echo.
afwillia b99d9eb
Trim pickle from end of filename, in addition to csv and jsonld.
afwillia 1189107
add output_path alias for output_jsonld
afwillia 86f7af8
Add combination of arguments to convert CLI tests
afwillia d3c3769
add export_graph to schema_utils.py to dump a pickle file
afwillia 215cc86
use export_graph util to save pickle file instead of handling that lo…
afwillia 242c885
add docstrings to graph_export
afwillia a1cfcce
Update tests to run different combinations of output_jsonld and outpu…
afwillia 1c67b4a
Add data_model_graph_pickle to generator
afwillia a986b39
Add ata_model_graph_pickle to metadata.py
afwillia 0390b69
Add data_model_graph to attributes_explorer
afwillia 37bbf74
Add data_model_graph_pickle to tangled_tree
afwillia 441b865
Add convert CLI test case where output_jsonld is pickle and output_pa…
afwillia fe4fffb
move tests into one function
afwillia 8c64981
Merge branch 'develop' into FDS-1796-schema-convert-export-pickle
afwillia f20f88b
Run black on commands.py and schema_utils.py
afwillia d56c965
fix single-letter variable names for pylint error
afwillia 4596560
Merge branch 'develop' into FDS-1843-use-graph
afwillia b5dd8e4
Add data_model_graph argument to ManifestGenerator.create_manifests
afwillia c8da900
use pickle.load to read pickle file
afwillia 601b5d0
Add data model graph pickle to attributes_explorer
afwillia c6d01de
Add data model graph pickle to tangled_tree
afwillia 1f57cf1
return 0 to resolve a pylint error.
afwillia 99e860b
Merge branch 'develop' into FDS-1796-schema-convert-export-pickle
afwillia d89dc10
remove extra function def from merge
afwillia c9786dc
run black on utils/schema_utils.py
afwillia 38b0690
Return 0 for all convert, but echo the filepath created
afwillia 77979c7
Merge branch 'develop' into FDS-1843-use-graph
afwillia 9907b4e
Fix mix-up between parsed data model and graph data model
afwillia 481ebd3
Add data model pickle parsing to tanlged_tree
afwillia f63231a
Add data_model_pickle file to tests
afwillia f3fdc41
Add data model pickle file
afwillia 032771f
run black
afwillia bf0e9ba
fix a couple sonarcloud issues with the graph_data_model variable
afwillia bc59218
Add data_model_graph_pickle to metadata.py and tests
afwillia 5973a75
run black on generator.py
afwillia bf1a449
remove type check from networkx
afwillia 69bb182
fix pylint issues
afwillia d93aa9d
remove pickle from metadata test because it wasn't created with data_…
afwillia aef4f62
create two metadata_model objects with different data_model_label gra…
afwillia 08b2ae5
add display_label graph pickle
afwillia a088d63
Merge branch 'develop' into FDS-1843-use-graph
afwillia 68672c3
Add multiple combinations of jsonld and pickle to test_viz attribute_…
afwillia de07c55
Fix missing variables in tangled_tree when jsonld and pickle are supp…
afwillia 77f5ec4
Add combinations of jsonld and pickle to tangled_tree tests
afwillia 5934ed5
add graph_data_model argument description
afwillia 51313bd
add data_model_graph_pickle description to MetadataModel
afwillia e4e1368
run black on test_viz.py
afwillia 9a78a18
Update schematic/manifest/generator.py
afwillia 05b4fe0
Add read_pickle function to read a binary pickle file
afwillia 0964501
Use read_pickle instead of importing pickle and opening file
afwillia 697cc3e
Add note for pickle files that don't fit in memory. Not sure if this …
afwillia 774dc91
Use read_pickle to load the pickle file in metadata.py
afwillia bb7c450
read_pickle instead of import pickle in attributes_explorer
afwillia 8f5bc1a
set self.graph_data_model and update it if data_model_grapher is not …
afwillia 35c13dd
use if ... is not None instead of if not ...
afwillia f8c14d4
use if ... is not None instead of if not ...
afwillia 13c9ffc
add an input to read_pickle
afwillia 9205d6d
run black on io_utils.py
afwillia 172e1b1
use read_pickle to read pickle file. Set default data_model_labels
afwillia d4d3a30
set default data_model_labels
afwillia 730b227
alter logic for setting graph_data_model from pickle or DataModelGrap…
afwillia 795e263
fix pickle reading logic in tangled tree
afwillia 0ddb552
fix logic checking for None parameters in attributes_explorer.py
afwillia 537af6f
import "import pickle" should be placed before "from schematic import…
afwillia dcb2f65
Use literal for output_type parameter and remove unnecessary try/exce…
afwillia bb4ee3a
use logger.exception instead of logger.error
afwillia 5504586
move return statement inside the output_type check block
afwillia b88ee86
run black
afwillia 2bf450b
import Literal from typing
afwillia 7adaf44
add tests for export_graph
afwillia c2a06f6
run black
afwillia 1e5bd7d
add graph_url spec to manifest/generate endpoint
afwillia c849f92
add function to download temp pickle file from url. Add data_model_pi…
afwillia 8041b07
use data_model_graph_pickle argument in manifest/generate endpoint
afwillia 0870fa1
download temp pickle in manifest/generate endpoint
afwillia 6802753
check that files are created in schema convert
afwillia 23b7e1d
update docstring and use if ... is not None instead of if not ...
afwillia fa5e308
use if ... is None instead of if ... is not None
afwillia 3dd6659
Merge branch 'FDS-1796-schema-convert-export-pickle' into FDS-1797-in…
afwillia f28a0d7
Merge branch 'FDS-1843-use-graph' into FDS-1797-input-graph-api
afwillia afbe448
add graph_url to validate and submission endpoints
afwillia e4d0b7c
add graph_url to validate and submission endpoints
afwillia a7d7366
add pickled htan data model for testing
afwillia ee9cb9f
remove data model graph parameter from validation and submission. It'…
afwillia cec7aa6
remove graph_url from validation and submission endpoints
afwillia 92b66fd
Merge branch 'develop' into FDS-1797-input-graph-api
afwillia b52bfdc
run black on routes.py
afwillia 8a64c39
set graph_data_model to None before looking for graph_url
afwillia 5bd3fc0
add DataModelParser back to tangled_tree.py
afwillia 9c2edde
change logger.info to click.echo
afwillia 58c1429
Check if pickle file contains a networkx MultiDiGraph object
afwillia 487e31d
explain options to schema convert output_type
afwillia e13f693
update data_model_graph_pickle docstring for ManifestGenerator
afwillia 3d5da40
don't return 0 at the end of schema convert
afwillia a331725
raise a valueError instead of logger.error for passing a bad filepath…
afwillia 3ed1177
return 0 at the end of schema convert to avoid error 'error: Return v…
afwillia b6728d3
Raise an actual exception and valueError for bad filepath to schema c…
afwillia b7460ea
add more information to schema convert when saving the graph as a pic…
afwillia 53e639b
add argument and return types to get_temp_pickle
afwillia 498851b
run the black code formatter
afwillia 58aef40
turn a single line that pylint states is too long into two shorter li…
afwillia 03f7497
swap the f in logger.echo to avoid 'Using an f-string that does not h…
afwillia bc64305
Merge branch 'develop' into FDS-1797-input-graph-api
afwillia 2a7ea55
message where graph is saved in schema convert cli
afwillia 275fbae
check for FileNotFound error instead of generic exception
afwillia 89cd4ce
change test variables to camel case
afwillia 0f4091a
Merge branch 'FDS-1797-input-graph-api' of https://github.com/Sage-Bi…
afwillia 3197abf
document schema convert tests
afwillia abd1630
turn get_temp_ functions into one single function
afwillia 445aad5
remove unhelpful comments and whitespace
afwillia 0c4fad7
clarify test cases for attributes explorer
afwillia f0b266d
run black
afwillia 559581c
Merge branch 'develop' into FDS-1797-input-graph-api
afwillia 9808f2b
merge develop updates
afwillia ec5e121
simpify message when export graph as pickle.
afwillia 5d59890
add tests for read_pickle
afwillia 79ad3d8
add error handling and messaging to read_pickle
afwillia 763dbdd
add explanation to display label test
afwillia 288431c
remove extra import and update docstring for create_manifests
afwillia 9ec9ddb
add pickle file to test_create_manifests
afwillia 86e1646
run black
afwillia d20c1fc
run black
afwillia 5a42f8a
fix pylint issues
afwillia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the logic from 1685 to 1703 can be further improved. Essentially you want to cover the following cases:
so instead of starting with
if graph_data_mode is None
, it will be easier if you start with if graph_data_modeland also, please consider wrapping this part in its own function... that way testing can be easier