• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

California-Planet-Search / radvel / 17447393926

03 Sep 2025 10:11PM UTC coverage: 87.165%. First build
17447393926

Pull #395

github

bjfultn
Fix Python 3.11 compatibility: replace old Python 2 raise syntax and bare except clauses
Pull Request #395: testing new ci

170 of 241 new or added lines in 8 files covered. (70.54%)

3735 of 4285 relevant lines covered (87.16%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/radvel/tests/test_nb.py
1
import warnings
1✔
2
import os
1✔
3
import sys
1✔
4
from glob import glob
1✔
5

6
# pytest is now the test runner, but we don't need to import it in test files
7
import nbformat
1✔
8
from nbconvert.preprocessors import ExecutePreprocessor
1✔
9

10
warnings.simplefilter("ignore")
1✔
11

12

13
def test_notebook():
1✔
14
    """
15
    Run though a single notebook tutorial
16
    """
17
    # Test just one notebook to avoid pytest parameterization issues
18
    nbfile = "docs/tutorials/164922_Fitting+MCMC.ipynb"
1✔
19
    
20
    if not os.path.exists(nbfile):
1✔
NEW
21
        print(f"Skipping {nbfile} - file not found")
×
NEW
22
        return
×
23
        
24
    print(nbfile)
1✔
25
    with open(nbfile) as f:
1✔
26
        nb = nbformat.read(f, as_version=4)
1✔
27

28
    basename = os.path.basename(nbfile)
1✔
29
    # Skip the all samplers notebook. Same functionality tested in api tests and it is slow due to repeated sampling to convergence.
30
    skip_notebooks = ["k2_24_demo_all_samplers.ipynb"]
1✔
31
    if basename in skip_notebooks:
1✔
32
        return
×
33
    timeout = 900
1✔
34

35
    if sys.version_info[0] < 3:
1✔
36
        ep = ExecutePreprocessor(timeout=timeout, kernel_name="python2")
×
37
    else:
38
        ep = ExecutePreprocessor(timeout=timeout, kernel_name="python3")
1✔
39

40
    ep.preprocess(nb, {"metadata": {"path": os.path.dirname(nbfile)}})
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc