Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forward python imports for checking with extract_release #268

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions jupyter_releaser/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,26 @@ def delete_release(auth, release_url):
@add_options(dry_run_options)
@add_options(npm_install_options)
@add_options(pydist_check_options)
@add_options(check_imports_options)
@click.argument("release-url", nargs=1)
def extract_release(
auth, dist_dir, dry_run, release_url, npm_install_options, pydist_check_cmd
auth,
dist_dir,
dry_run,
release_url,
npm_install_options,
pydist_check_cmd,
check_imports,
):
"""Download and verify assets from a draft GitHub release"""
lib.extract_release(
auth, dist_dir, dry_run, release_url, npm_install_options, pydist_check_cmd
auth,
dist_dir,
dry_run,
release_url,
npm_install_options,
pydist_check_cmd,
check_imports,
)


Expand Down
14 changes: 12 additions & 2 deletions jupyter_releaser/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,13 @@ def delete_release(auth, release_url):


def extract_release(
auth, dist_dir, dry_run, release_url, npm_install_options, pydist_check_cmd
auth,
dist_dir,
dry_run,
release_url,
npm_install_options,
pydist_check_cmd,
python_imports,
):
"""Download and verify assets from a draft GitHub release"""
match = parse_release_url(release_url)
Expand Down Expand Up @@ -338,7 +344,11 @@ def extract_release(
for asset in assets:
suffix = Path(asset.name).suffix
if suffix in [".gz", ".whl"]:
python.check_dist(dist / asset.name, check_cmd=pydist_check_cmd)
python.check_dist(
dist / asset.name,
check_cmd=pydist_check_cmd,
python_imports=python_imports,
)
elif suffix == ".tgz":
pass # already handled
else:
Expand Down