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

added smoke test #33

Merged
merged 1 commit into from
Jun 15, 2023
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
4 changes: 4 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ jobs:
- name: Run unit tests with pytest
run: |
python -m pytest tests
- name: Run notebooks
run: |
rail render-nb

9 changes: 6 additions & 3 deletions src/rail/hub/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def cli() -> None:
@options.inputs()
def render_nb(outdir, clear_output, dry_run, inputs, **kwargs):
"""Render jupyter notebooks"""
scripts.render_nb(outdir, clear_output, dry_run, inputs)
return scripts.render_nb(outdir, clear_output, dry_run, inputs)


@cli.command()
Expand All @@ -30,7 +30,8 @@ def render_nb(outdir, clear_output, dry_run, inputs, **kwargs):
def clone_source(outdir, git_mode, dry_run, package_file, **kwargs):
"""Install packages from source"""
scripts.clone_source(outdir, git_mode, dry_run, package_file)

return 0


@cli.command()
@options.outdir(default='..')
Expand All @@ -40,7 +41,8 @@ def clone_source(outdir, git_mode, dry_run, package_file, **kwargs):
def install(outdir, dry_run, from_source, package_file, **kwargs):
"""pip install rail packages one by one, to be fault tolerant"""
scripts.install(outdir, from_source, dry_run, package_file)

return 0


@cli.command()
@options.outdir(default='..')
Expand All @@ -53,3 +55,4 @@ def install(outdir, dry_run, from_source, package_file, **kwargs):
def info(**kwargs):
"""pip install rail packages one by one, to be fault tolerant"""
scripts.info(**kwargs)
return 0
5 changes: 5 additions & 0 deletions src/rail/hub/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,14 @@ def render_nb(outdir, clear_output, dry_run, inputs, **kwargs):
render = os.system(comline)
status[nb_file] = render

ret_val = 0
for key, val in status.items():
print(f"{key} {val}")
if val != 0:
ret_val = val

return ret_val


def clone_source(outdir, git_mode, dry_run, package_file):

Expand Down
Loading