Skip to content

Commit

Permalink
πŸ€–πŸ“ˆ Autocommit figures
Browse files Browse the repository at this point in the history
  • Loading branch information
MemoOlv committed Nov 14, 2023
1 parent edc7187 commit f44d546
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,21 @@ jobs:
- name: Check notebook format
run: docker run --volume ${PWD}/Makefile:/workdir/Makefile islasgeci/nerd_demo:${GITHUB_SHA:0:4} make check_notebook
- name: Verify the notebooks run
run: docker run --volume ${PWD}/tests/test_notebooks.sh:/workdir/tests/test_notebooks.sh --volume ${PWD}/examples:/workdir --volume ${PWD}/tests/data:/workdir/data islasgeci/nerd_demo:${GITHUB_SHA:0:4} tests/test_notebooks.sh
run: docker run --volume ${PWD}/tests/test_notebooks.sh:/workdir/tests/test_notebooks.sh --volume ${PWD}/examples:/workdir --volume ${PWD}/tests/data:/workdir/data --volume ${PWD}/examples/figures:/workdir/figures islasgeci/nerd_demo:${GITHUB_SHA:0:4} tests/test_notebooks.sh
- name: Auto-commit python files
uses: stefanzweifel/git-auto-commit-action@master
with:
commit_message: πŸ€– Apply automatic changes
file_pattern: 'examples/*.py'
commit_user_name: Ciencia de Datos β€’ GECI
commit_user_email: [email protected]
- name: Auto-commit figures
uses: stefanzweifel/git-auto-commit-action@master
with:
commit_message: πŸ€– Autocommit figures
file_pattern: 'examples/figures/*.png'
commit_user_name: Ciencia de Datos β€’ GECI
commit_user_email: [email protected]
push:
name: Push module to PyPI and images to Docker Hub
needs: [test-notebook, test-module]
Expand Down
8 changes: 4 additions & 4 deletions examples/calibration-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"plt.ylim(0, 3)\n",
"plt.xticks(size=fontsize)\n",
"plt.yticks(size=fontsize)\n",
"plt.savefig(\"figures/calibration.png\", dpi=300, transparent=True)"
"plt.savefig(\"/workdir/figures/calibration.png\", dpi=300, transparent=True)"
]
},
{
Expand Down Expand Up @@ -171,7 +171,7 @@
" bbox=dict(facecolor=\"w\", edgecolor=\"none\"),\n",
")\n",
"plt.axvline(0, color=\"k\")\n",
"plt.savefig(\"figures/plots.png\", dpi=300, transparent=True)"
"plt.savefig(\"/workdir/figures/plots.png\", dpi=300, transparent=True)"
]
},
{
Expand Down Expand Up @@ -257,7 +257,7 @@
")\n",
"plt.xlabel(\"Distance (m)\", size=fontsize)\n",
"plt.ylabel(\"Density (kg/m$^2$)\", size=fontsize)\n",
"plt.savefig(\"figures/density_profile.png\")"
"plt.savefig(\"/workdir/figures/density_profile.png\")"
]
},
{
Expand Down Expand Up @@ -343,7 +343,7 @@
"cbar.ax.tick_params(labelsize=fontsize_ticks)\n",
"plt.axhline(18.0056, color=\"r\", linewidth=2)\n",
"plt.text(65, 18.6, \"35 knot\", size=fontsize_labels, color=\"k\")\n",
"plt.savefig(\"figures/contour_plot.png\", dpi=300, transparent=True)"
"plt.savefig(\"/workdir/figures/contour_plot.png\", dpi=300, transparent=True)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/tiling_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"nerd_model = Nerd(config_filepath)\n",
"nerd_model.calculate_total_density()\n",
"density_map = nerd_model.export_results_geojson(target_density=0.002)\n",
"plt.savefig(\"figures/density_map.png\")"
"plt.savefig(\"/workdir/figures/density_map.png\")"
]
},
{
Expand Down

0 comments on commit f44d546

Please sign in to comment.