File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 name : Deploy to GitHub Pages
1515 runs-on : ubuntu-latest
1616 steps :
17- - uses : fastai/workflows/quarto-ghp @master
17+ - uses : fastai/workflows/quarto-ghp3 @master
1818# with: {pre: 1}
Original file line number Diff line number Diff line change 3636 python-version : ${{ matrix.py }}
3737 - name : Install dependencies
3838 run : |
39- pip install -Uqq --pre nbdev
39+ pip install -Uqq " nbdev>3"
4040 pip install -e ".[dev]"
41- #- name: Check if notebooks are synced and cleaned
42- #uses: fastai/workflows/nb@master
4341 - name : Run tests
4442 run : nbdev_test
4543 env :
Original file line number Diff line number Diff line change @@ -818,18 +818,16 @@ def shufflish(x, pct=0.04):
818818 import random
819819 return L (x [i ] for i in sorted (range_of (x ), key = lambda o : o + n * (1 + random .random ()* pct )))
820820
821- # %% ../nbs/03_xtras.ipynb #705c1a5a
822- def console_help (
823- libname :str ): # name of library for console script listing
821+ # %% ../nbs/03_xtras.ipynb #3a527c27
822+ def console_help (libname : str ):
824823 "Show help for all console scripts from `libname`"
825824 from fastcore .style import S
826- from pkg_resources import iter_entry_points as ep
827- for e in ep ( 'console_scripts' ):
828- if e .module_name == libname or e .module_name .startswith (libname + '.' ):
825+ from importlib . metadata import entry_points
826+ for e in entry_points ( group = 'console_scripts' ):
827+ if e .module == libname or e .module .startswith (libname + '.' ):
829828 nm = S .bold .light_blue (e .name )
830829 print (f'{ nm :45} { e .load ().__doc__ } ' )
831830
832-
833831# %% ../nbs/03_xtras.ipynb #01a02b78
834832def hl_md (s , lang = 'html' , show = True ):
835833 "Syntax highlight `s` using `lang`."
Original file line number Diff line number Diff line change 39293929 {
39303930 "cell_type" : " code" ,
39313931 "execution_count" : null ,
3932- "id" : " 705c1a5a " ,
3932+ "id" : " 3a527c27 " ,
39333933 "metadata" : {},
39343934 "outputs" : [],
39353935 "source" : [
39363936 " #| export\n " ,
3937- " def console_help(\n " ,
3938- " libname:str): # name of library for console script listing\n " ,
3937+ " def console_help(libname: str):\n " ,
39393938 " \" Show help for all console scripts from `libname`\"\n " ,
39403939 " from fastcore.style import S\n " ,
3941- " from pkg_resources import iter_entry_points as ep \n " ,
3942- " for e in ep( 'console_scripts'): \n " ,
3943- " if e.module_name == libname or e.module_name .startswith(libname+ '.'): \n " ,
3940+ " from importlib.metadata import entry_points \n " ,
3941+ " for e in entry_points(group= 'console_scripts'):\n " ,
3942+ " if e.module == libname or e.module .startswith(libname + '.'):\n " ,
39443943 " nm = S.bold.light_blue(e.name)\n " ,
3945- " print(f'{nm:45}{e.load().__doc__}')\n "
3944+ " print(f'{nm:45}{e.load().__doc__}')"
39463945 ]
39473946 },
39483947 {
You can’t perform that action at this time.
0 commit comments