-
Notifications
You must be signed in to change notification settings - Fork 0
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
Define R API functions in separate script #103
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
@@ -14,85 +14,21 @@ | |||
"cell_type": "code", |
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.
@@ -14,85 +14,21 @@ | |||
"cell_type": "code", |
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.
@@ -14,85 +14,21 @@ | |||
"cell_type": "code", |
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.
@@ -14,85 +14,21 @@ | |||
"cell_type": "code", |
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.
@@ -14,85 +14,21 @@ | |||
"cell_type": "code", |
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.
@bmeluch - the sourcing for the functions doesn't work in google colab. Here's a link to the NOM notebook in this branch in google colab - it'd be good to have this in the PR description because this is something we should be testing during each new notebook. When I try to run the first cell, it errors out with the new sourcing. I'm pretty sure @samobermiller had figured out a workaround for the python functions to make this work, hopefully the same will work for R? NOM notebook in colab: Taxonomy notebook in colab: |
The R script sourcing in Colab should work now (thank you for the links @kheal ! ) |
@bmeluch |
Both notebooks have been rerendered and are passing checks NOM: Looks good in Github, nbviewer, Colab, and ReviewNB as far as I can see. Taxonomy: Looks good in Github and Colab, text is weird in ReviewNB as noted, plots are weird in nbviewer. A mystery. EDIT 10:30am FEB 11 NBVIEWER LOOKS NORMAL NOW HOORAY |
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.
Everything was generating fine for me other than the previously listed caveats in nbviewer!
huzzah! LGTM. Just make sure to change the link to the main branch in the first cell after it's been merged in - I forget the order of operations that @samobermiller had to do this, but I trust you two can figure it out. |
This PR pulls the R API function definitions out of notebooks and defines them all in a single R script, so we aren't accidentally defining the same function with different tweaks in different notebooks.
It modifies two existing notebooks and adds a script
utility_functions.R
(Eventually this may become an R package, but R scripts seem to play nicer than R packages when embedded in a repo.)
NOM notebook in nbviewer and colab:
https://nbviewer.org/github/microbiomedata/nmdc_notebooks/blob/90-modularize-r-api-wrapper-functions/NOM_visualizations/R/NOM_R_notebook.ipynb
https://colab.research.google.com/github/microbiomedata/nmdc_notebooks/blob/90-modularize-r-api-wrapper-functions/NOM_visualizations/R/NOM_R_notebook.ipynb
Taxonomy notebook in colab:
https://nbviewer.org/github/microbiomedata/nmdc_notebooks/blob/90-modularize-r-api-wrapper-functions/taxonomic_dist_by_soil_layer/R/taxonomic_dist_soil_layer_R.ipynb
https://colab.research.google.com/github/microbiomedata/nmdc_notebooks/blob/90-modularize-r-api-wrapper-functions/taxonomic_dist_by_soil_layer/R/taxonomic_dist_soil_layer_R.ipynb
All Submissions:
Notebook Fix Submissions: