-
Notifications
You must be signed in to change notification settings - Fork 93
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
Simplify Binder build configuration and notebook execution #50
base: main
Are you sure you want to change the base?
Conversation
Looks like the missing file is due to a data directory/submodule not being copied to this repo. JupyterLab's demo repo for Binder has a nice layout for binder with separate directories for data files and notebooks. Also it uses |
The missing file issue (the And yes, let's do a videocall later this week? |
Sure. I'm not clear on why the notebooks would need to all change version unless there are major breaking changes in EconARK's API. I could set up another branch on my repo that pulls the latest commit from master for EconARK so at least you could test it out if you want. Should only take 5 minutes. |
We don't want them to change version - we'd like to reach a point with most of these notebooks where they're "done" and we don't ever touch them again. Changing versions of Econ-ARK and then having to update the notebooks so they don't break when Econ-ARK has a breaking change is exactly what we're trying to avoid. But newer notebooks will need newer versions of Econ-ARK. If all notebooks in binder must have the same version of Econ-ARK we are trapped having to occasionally update 30+ notebooks to use new versions. |
@shaunagm This branch https://github.com/willingc/DemARK/tree/try-master-latest-sha uses the latest master on Binder and it looks like stuff is working. Look at the binder folder requirements.txt and see how the version for binder is configured to pull from master. The notebooks with the missing file are working now. As an FYI, you can have binder serve a different version of Econ-ARK than the repo itself. Binder will default to taking the requirements in the binder folder first and if not found use the requirements at the repo's root. Here's the binder link for a build using the master of econ-ARK: https://mybinder.org/v2/gh/willingc/DemARK/try-master-latest-sha |
Oh, neat. Could we do something like |
Yep you can pin it to any SHA1, tag, or release. |
This is related to a pet idea of mine, discussed and articulated in this PR
<econ-ark/HARK#275>: Briefly, we should figure out
how to add, to our testing/CI regime, the *.py files of some subset of the
notebooks in the DemARK/REMARK repos.
If we had had that infrastructure in place, we would have caught a subtle
bug introduced by a PR that nearly derailed the weeklong class I am
teaching in Budapest this week.
Nobody seems to know an easy way to do this, which is surprising to me.
which is to choose
…On Tue, Jul 23, 2019 at 9:28 PM Carol Willing ***@***.***> wrote:
@shaunagm <https://github.com/shaunagm> This branch
https://github.com/willingc/DemARK/tree/try-master-latest-sha uses the
latest master on Binder and it looks like stuff is working.
Look at the binder folder requirements.txt and see how the version for
binder is configured to pull from master. The notebooks with the missing
file are working now.
As an FYI, you can have binder serve a different version of Econ-ARK than
the repo itself. Binder will default to taking the requirements in the
binder folder first and if not found use the requirements at the repo's
root.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50?email_source=notifications&email_token=AAKCK74Z3UUGEUGN6YBGMH3QA5LWDA5CNFSM4IGHZLA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2UFYKY#issuecomment-514350123>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKCK7ZKBRVMY267XE5NMNDQA5LWDANCNFSM4IGHZLAQ>
.
--
- Chris Carroll
|
@llorracc Shauna and I chatted this morning. There are 3 general ways to test notebooks: nbval, nbconvert, and papermill. Typically using pytest as the test runner. A good resource for all things notebooks and reproducible research: https://github.com/jupyter-guide/jupyter-guide and its related https://github.com/jupyter-guide/ten-rules-jupyter. |
@llorracc can you get us an initial list of notebooks you want to run, that should pass (or fail!) quickly? Also: see this open active discussion on testing notebooks. |
@willingc Thanks very much for your extensive improvements on a bunch of fronts. I was about to merge but then realized that this discussion is independently valuable and would be less prominent after a merge. Having reread the discussion in the related issue I think my preferences have clarified. Steps:
For every notebook that breaks, we therefore have a means to unbreak it. I much prefer this workflow to pinning everything to the current (working) version, precisely because I think that trying to run existing notebooks on a new candidate release is an excellent tool for bug-finding in the new release. |
No rush to merge. 😄
Excellent plan!
Nice!
I would recommend to test the notebooks on all pushes to master and run the matrix on all supported Python versions and nightly. This way there should be minimal breakage at release time. Azure Pipelines may be a good CI tool instead of or in addition to Travis or CircleCI since it supports Windows and is usually much faster.
Yep, getting tests written would simplify quite a bit since you should be able to have binder use the latest stable version which would be pulled into the container if it is unpinned. |
Seems like the right way to do this is to have some way of tagging the notebooks that should be automatically run, maybe by adding something to the metadata, and then the script should just run those. Either that or have in the DemARK (and REMARK) repos a /test-me folder or something like that with a list of the names of the .py files that should be run when there is a pull request. |
@shaunagm This WIP PR updates the Binder build.
The todo.md file has some recommendations after I ran all the notebooks. If you want to walk through this later this week, I would be happy to do so.