Code Monkey home page Code Monkey logo

decision_tree's People

Contributors

dependabot[bot] avatar pete88b avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

chrphb

decision_tree's Issues

test_nbs.py issue

Hi
I'm trying to use your test_nbs.py script to create a coverage report but it fails here:

https://github.com/pete88b/decision_tree/blob/master/test_nbs.py#L109

Config().nbs_path is just a string object, so it wouldn't have a glob attribute?

Here's the pytest output:

$ pytest --cov=planetarypy                                                                                                                           (py38) 
/home/maye/miniconda3/envs/py38/lib/python3.8/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
=================================================================== test session starts ====================================================================
platform linux -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/maye/Dropbox/src/nbplanetary
plugins: nbval-0.9.6, pep8-1.0.6, anyio-3.2.1, cov-2.12.1
collected 1 item                                                                                                                                           

test_nbs.py F                                                                                                                                        [100%]Coverage.py warning: No data was collected. (no-data-collected)


========================================================================= FAILURES =========================================================================
_________________________________________________________________________ test_run _________________________________________________________________________

    def test_run():
        # now we can "nbdev_test_nbs" and have our "before test" callback called
        # nbdev_test_nbs('00_core.ipynb') # Use this line to test a single notebook
>       nbdev_test_nbs()

test_nbs.py:128: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

fname = None, flags = None, n_workers = None, verbose = True, timing = False

    def nbdev_test_nbs(fname=None,flags=None,n_workers=None,verbose=True,timing=False):
        """
        fname:Param("A notebook name or glob to convert", str)=None,
        flags:Param("Space separated list of flags", str)=None,
        n_workers:Param("Number of workers to use", int)=None,
        verbose:Param("Print errors along the way", bool)=True,
        timing:Param("Timing each notebook to see the ones are slow", bool)=False
        """
        "Test in parallel the notebooks matching `fname`, passing along `flags`"
        if flags is not None: flags = flags.split(' ')
        if fname is None:
>           files = [f for f in Config().nbs_path.glob('*.ipynb') if not f.name.startswith('_')]
E           AttributeError: 'str' object has no attribute 'glob'

test_nbs.py:109: AttributeError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.