-
Notifications
You must be signed in to change notification settings - Fork 233
Remove nbdev for core developments and use pytest for tests #647
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
base: main
Are you sure you want to change the base?
Conversation
This reverts commit dbd5314.
missed remove duplicate
fix typo missed missed
and rename the ci job
b11f750
to
2540bba
Compare
@goodwanghan
cc: @mergenthaler |
Amazing work! @JQGoh I will review it tomorrow. |
@JQGoh I want to say, this is a masterpiece, and it is worth every engineer in Nixtla to learn! So I can see there are a few other things that we must change in order to release. For example doc gen is going to break with this change, and it may not be trivial to make that change as an external collaborator. I think you have accomplished this task, I or some other Nixtla member can continue working on this PR to finish the docs piece. Great job! I am deeply impressed. |
@goodwanghan Thank you.
|
Rationale
nbdev
as part of the development workflownbdev
completely at this stage as it could still be useful to support the generation of notebook-based documentations.jupyter nbconvert --to notebook --execute --inplace "$nb"
does indeed execute all the notebook cells, this behavior differs from thenbdev_test
execution whereby it is suspected that it only executes selected cells (marked by nbdev directive)lightgbm
package was not installed during the notebook run.Suggestions
run-notebooks-test
can be flaky and currently there is no convenient option likepytest-rerunfailures
to rerun the test when encountered failure likeConnectError: [Errno 104] Connection reset by peer
Changes
Migrate tests from notebook cells to pytest-styled test cases. The migrated test cases are those mainly registered in.
Migrated test cases are saved into
nixtla_tests
folder.nixtla_tests/conftest.py
filenbdev_test
also includes execution for notebook innbs/docs
folder such asnbs/docs/tutorials/15_missing_values.ipynb
file, we also need to execute and run this. For notebooks saved in thenbs/docs
, we shall replace with another test job=run-notebooks-test
run-notebooks-test
: It executes all the .ipynb files found withinnbs/docs
folder on ubuntu platform.run-cross-platform-tests
: It executes all the pytest cases, both local and distributed runs, on both mac and ubuntu platforms.windows
platform run, we currently disable the test runs for Spark because of error as shown below, which requires a revised system setup (per-my understanding, this requires Nixtla team to setup internally).Upgraded Packages
Added Packages
httpx.ConnectError
,urllib.error.HTTPError
happen, avoid rerun whole set of failed job when it failed occasionally]httpx.ConnectError: [Errno 104] Connection reset by peer
, see failed joburllib.error.HTTPError: HTTP Error 429: Too Many Requests
, see failed job