pete88b / decision_tree Goto Github PK
View Code? Open in Web Editor NEWAn nbdev test project and decision tree ensemble implementation (see: http://course18.fast.ai)
Home Page: https://pete88b.github.io/decision_tree/
License: Apache License 2.0
An nbdev test project and decision tree ensemble implementation (see: http://course18.fast.ai)
Home Page: https://pete88b.github.io/decision_tree/
License: Apache License 2.0
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.