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

BM8 comparison page using Jupyter #1314

Merged
merged 46 commits into from
Apr 8, 2022

Conversation

wd15
Copy link
Collaborator

@wd15 wd15 commented Oct 30, 2021

Start the switch to using Jupyter notebooks for comparison pages

Address #1311, #1310, #1298, #1208

  • switch to using github actions
  • implement BM8a as a notebook
  • get a simple nix build working with github actions using cachix
  • implement pfhub package
  • create a default.nix
  • doctests
  • linting
  • make github actions test package
  • test results notebooks

Remember to tear down the live site when merging or closing this
pull request.


This change is Reviewable

wd15 added 9 commits October 7, 2021 21:16
Using plotly.express to plot the data. Everything needs to be a
dataframe to use express.
Make nbextension addons for Jupyter install correctly.
Insert raw tags on notebooks for now to overcome issues with plotly
and liquid syntax.  Include require.js in header as now required by
plotly, but not actually imported by plotly.js

In addition, Clean up main.py to be more functional.

Add levelset contour plot and data table

Add level contour plot and data table to results notebook

order of accuracy plot is implemented

Finished order of accuracy plot

Include more data

Finish frist draft of 8a.1 comparison page

Remove ipynb temp files

Reduce size of notebook
@commit-lint
Copy link

commit-lint bot commented Oct 30, 2021

Features

  • ensure plotly notebooks display on site (5242e8e)

Build System

Bug Fixes

  • bug fixes, small improvements (12d00ca)

Tests

  • make sure notebooks are tested (b8f0b3d)
  • make nbval lax on github actions (cef4544)
  • add linters to github testing (c9e043b)

Styles

Contributors

wd15

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@pfhub
Copy link

pfhub commented Oct 30, 2021

The new PFHub live website is ready for review.

1 similar comment
@pfhub
Copy link

pfhub commented Oct 30, 2021

The new PFHub live website is ready for review.

@wd15 wd15 marked this pull request as ready for review October 30, 2021 20:05
@pfhub
Copy link

pfhub commented Oct 30, 2021

The new PFHub live website is ready for review.

@pfhub
Copy link

pfhub commented Oct 30, 2021

The new PFHub live website is ready for review.

2 similar comments
@pfhub
Copy link

pfhub commented Oct 30, 2021

The new PFHub live website is ready for review.

@pfhub
Copy link

pfhub commented Oct 30, 2021

The new PFHub live website is ready for review.

@wd15 wd15 marked this pull request as draft October 31, 2021 21:25
@wd15 wd15 self-assigned this Nov 3, 2021
@wd15 wd15 added this to the November 2021 Meeting milestone Nov 3, 2021
@pfhub
Copy link

pfhub commented Nov 4, 2021

The new PFHub live website is ready for review.

@wd15
Copy link
Collaborator Author

wd15 commented Feb 16, 2022

@tkphd: I want to switch off the commit linter, but I can't figure it out. Any ideas?

@tkphd
Copy link
Collaborator

tkphd commented Feb 16, 2022

I don't have access, but in the Repository Settings you should be able to remove the webhook.

wd15 added 5 commits February 23, 2022 14:57
Previoulsy all notebooks were translated into HTML with raw tags. This
was because plotly breaks Jekyll without the raw tags. However, most
of the notebooks don't use plotly and use Jekyll tags so should not
have raw tags. Raw tags are only added to notebooks in the result/
directory that uses plotly.

In future a more sophisticated method might be required for dealing
with Plotly and Jekyll clashes.
htmlproofer breaks locally when the locale isn't defined.
Blacklist broken surveymonkey link for htmlproofer.
Switch off the fancy datatables rendering in the notebook version of
the results comparison page for BM8.a as this does not render properly
when converted to HTML.
@pfhub
Copy link

pfhub commented Mar 1, 2022

The new PFHub live website is ready for review.

@pfhub
Copy link

pfhub commented Mar 2, 2022

The new PFHub live website is ready for review.

@pfhub
Copy link

pfhub commented Mar 2, 2022

The new PFHub live website is ready for review.

@pfhub
Copy link

pfhub commented Mar 2, 2022

The new PFHub live website is ready for review.

Correct metadata for python-pfhub
@wd15 wd15 requested a review from tkphd March 10, 2022 21:55
@wd15
Copy link
Collaborator Author

wd15 commented Mar 10, 2022

@tkphd: please take another look. Thanks!

@pfhub
Copy link

pfhub commented Mar 10, 2022

The new PFHub live website is ready for review.

@wd15
Copy link
Collaborator Author

wd15 commented Mar 30, 2022

@tkphd: could you approve this one if it's acceptable? Thanks!

Copy link
Collaborator

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few more minor changes.

Makefile Outdated
@@ -17,6 +17,11 @@ $(HEXBIN_OUT): $(HEXBIN_IN)

%.ipynb.raw.html: %.ipynb
jupyter-nbconvert $< --output $(notdir $@) --to html --template basic
if [ "results/" = "$(dir $@)" ]; then \
echo 'got here'; \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is meant to stay, please replace "got here" with a meaningful message, perhaps including the calling process and the filename.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it.

@@ -0,0 +1,22 @@
# Nix
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include a one-line summary of what python-pfhub is meant to accomplish, at least, insert a top-level # PFHub Python Package, and increase the existing headings by a level (e.g., # Nix -> ## Nix).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included short description

def test(*args):
r"""Run all the module tests.

Equivalent to running ``py.test pymks`` in the base of
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not PyMKS.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed references to PyMKS

Copy link
Collaborator

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used ReviewNB to check notebooks -- looks good!

@tkphd
Copy link
Collaborator

tkphd commented Mar 30, 2022

Rendered web page also looks good. Almost there!

 - Remove references to PyMKS
 - Short description of Python-PFhub in README.md
 - Remove debug statement in Makefile
@wd15 wd15 requested a review from tkphd April 4, 2022 17:52
@pfhub
Copy link

pfhub commented Apr 4, 2022

The new PFHub live website is ready for review.

Copy link
Collaborator

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice work!

@tkphd tkphd merged commit c7f28fd into usnistgov:master Apr 8, 2022
@wd15 wd15 deleted the bm8-notebook-comparison-page branch July 20, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants