Merge 1199e135e6b782e3e4247c46bb18fea495d41fb3 into a593d27e3d9fcdecc0fbf385ef43116cccad71ec

This commit is contained in:
baniasbaabe 2022-08-23 22:40:21 +00:00 committed by GitHub
commit 128e940ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 1 deletions

View File

@ -105,6 +105,11 @@ def get_all_imports(
for root, dirs, files in walk:
dirs[:] = [d for d in dirs if d not in ignore_dirs]
ipynb_files = [fn for fn in files if os.path.splitext(fn)[1] == ".ipynb"]
for ipynb_file in ipynb_files:
os.system("ipython nbconvert --to script " + str(ipynb_file))
candidates.append(os.path.basename(root))
files = [fn for fn in files if os.path.splitext(fn)[1] == ".py"]
@ -130,6 +135,11 @@ def get_all_imports(
logging.error("Failed on file: %s" % file_name)
raise exc
# Clean up created .py files from .ipynb files
for ipynb_file in ipynb_files:
os.remove(ipynb_file.replace("ipynb", "py"))
# Clean up imports
for name in [n for n in raw_imports if n]:
# Sanity check: Name could have been None if the import

View File

@ -1,3 +1,5 @@
wheel==0.23.0
Yarg==0.1.9
docopt==0.6.2
docopt==0.6.2
ipython==8.4.0
nbconvert==7.0.0

View File

@ -0,0 +1,12 @@
asposestorage==1.0.2
beautifulsoup4==4.11.1
boto==2.49.0
docopt==0.6.2
Flask==1.1.2
ipython==8.4.0
nose==1.3.7
peewee==3.15.1
pyflakes==2.3.1
requests==2.28.1
SQLAlchemy==1.4.32
ujson==5.1.0