Skip to content

Commit

Permalink
rename njsp-plots.ipynb to njsp/update-plots, add update-projections …
Browse files Browse the repository at this point in the history
…step
  • Loading branch information
ryan-williams committed Feb 3, 2024
1 parent 9d03b69 commit 4b57b34
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ jobs:
echo "Fetching commits since $since"
git fetch --shallow-since "$since" origin ${{ github.ref_name }}
echo "Fetched $(git rev-list --count) revisions"
- name: Update YTD / ROY projections
if: steps.plot_data.outputs.changed
run: njsp -cc update_projections
- name: Update plot data
id: update_plots
if: steps.plot_data.outputs.changed
Expand Down
1 change: 1 addition & 0 deletions njsp/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .refresh_summaries import refresh_summaries
from .update_pqts import update_pqts
from .update_plots import update_plots
from .update_projections import update_projections
from .slack import slack, sync


Expand Down
6 changes: 1 addition & 5 deletions njsp/cli/update_plots.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/usr/bin/env python
import click
from utz import env
from utz.plots import PLOT_DISPLAY_IMG

from njsp.cli.base import command
from njsp.nb import execute
Expand All @@ -10,7 +8,5 @@
@command
@click.option('-k', '--kernel', default='python3')
def update_plots(kernel):
nb_path = 'njsp-plots.ipynb'
env[PLOT_DISPLAY_IMG] = '1'
execute(nb_path, kernel=kernel)
execute('njsp/update-plots.ipynb', kernel=kernel)
return "Update NJSP plots"
13 changes: 13 additions & 0 deletions njsp/cli/update_projections.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env python
import click

from njsp.cli.base import command
from njsp.nb import execute


@command
@click.option('-k', '--kernel', default='python3')
def update_projections(kernel):
nb_path = 'njsp/update-projections.ipynb'
execute(nb_path, kernel=kernel)
return "Update NJSP plots"
File renamed without changes.
File renamed without changes.

0 comments on commit 4b57b34

Please sign in to comment.