File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -318,12 +318,15 @@ def chk_conda_rel(
318318# %% ../nbs/api/18_release.ipynb #bf55df9b
319319@call_parse
320320def release_pypi (
321- repository :str = "pypi" # Respository to upload to (defined in ~/.pypirc)
321+ repository :str = "pypi" , # Respository to upload to (defined in ~/.pypirc)
322+ quiet :bool = False # Reduce output verbosity
322323):
323324 "Create and upload Python package to PyPI"
324325 _dir = get_config ().lib_path .parent
325- system (f'cd { _dir } && rm -rf dist build && python -m build' )
326- system (f'twine upload --repository { repository } { _dir } /dist/*' )
326+ q = ' --quiet' if quiet else ''
327+ p = ' --disable-progress-bar' if quiet else ''
328+ system (f'cd { _dir } && rm -rf dist build && python -m build{ q } ' )
329+ system (f'twine upload --repository { repository } { p } { _dir } /dist/*' )
327330
328331# %% ../nbs/api/18_release.ipynb #06edfcb0
329332@call_parse
Original file line number Diff line number Diff line change 809809 " #| export\n " ,
810810 " @call_parse\n " ,
811811 " def release_pypi(\n " ,
812- " repository:str=\" pypi\" # Respository to upload to (defined in ~/.pypirc)\n " ,
812+ " repository:str=\" pypi\" , # Respository to upload to (defined in ~/.pypirc)\n " ,
813+ " quiet:bool=False # Reduce output verbosity\n " ,
813814 " ):\n " ,
814815 " \" Create and upload Python package to PyPI\"\n " ,
815816 " _dir = get_config().lib_path.parent\n " ,
816- " system(f'cd {_dir} && rm -rf dist build && python -m build')\n " ,
817- " system(f'twine upload --repository {repository} {_dir}/dist/*')"
817+ " q = ' --quiet' if quiet else ''\n " ,
818+ " p = ' --disable-progress-bar' if quiet else ''\n " ,
819+ " system(f'cd {_dir} && rm -rf dist build && python -m build{q}')\n " ,
820+ " system(f'twine upload --repository {repository}{p} {_dir}/dist/*')"
818821 ]
819822 },
820823 {
940943 ]
941944 }
942945 ],
943- "metadata" : {
944- "solveit_dialog_mode" : " learning" ,
945- "solveit_ver" : 2
946- },
946+ "metadata" : {},
947947 "nbformat" : 4 ,
948948 "nbformat_minor" : 5
949949}
You can’t perform that action at this time.
0 commit comments