Skip to content

Commit

Permalink
Review the CI / comment pull requests (#1179)
Browse files Browse the repository at this point in the history
* Add a link to Binder on PRs
* There is no minus in rc or dev version numbers
* Install notebook>=7 on Binder
* Add test-unit-functional-integration and test-ui as dependencies for the ci and publish runs
  • Loading branch information
mwouts authored Dec 2, 2023
1 parent f873cc3 commit 4a133b5
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ concurrency:
cancel-in-progress: true

jobs:
comment-pr:
permissions:
pull-requests: write
uses: ./.github/workflows/step_comment-pr.yml

pre-commit:
uses: ./.github/workflows/step_pre-commit.yml

Expand All @@ -54,7 +59,7 @@ jobs:
uses: ./.github/workflows/step_tests-ui.yml

build:
needs: [test-pip, test-conda, test-ui]
needs: [test-pip, test-conda, test-unit-functional-integration, test-ui]
uses: ./.github/workflows/step_build.yml
with:
upload: ${{ inputs.upload-build-artifacts || false }}
14 changes: 11 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-dev[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+dev[0-9]+"

jobs:
pre-commit:
Expand All @@ -18,12 +18,20 @@ jobs:
needs: [ codeql ]
uses: ./.github/workflows/step_tests-pip.yml

test-unit-functional-integration:
needs: [ codeql ]
uses: ./.github/workflows/step_test_unit_functional.yml

test-conda:
needs: [ codeql ]
uses: ./.github/workflows/step_tests-conda.yml

test-ui:
needs: [ codeql ]
uses: ./.github/workflows/step_tests-ui.yml

build:
needs: [ test-pip, test-conda ]
needs: [ test-pip, test-conda, test-unit-functional-integration, test-ui ]
uses: ./.github/workflows/step_build.yml

publish:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/step_comment-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: comment-pr
run-name: Comment PR

on:
workflow_call:

jobs:
comment-pr:
runs-on: ubuntu-latest
name: Comment PR
if: github.event_name == 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Thank you for making this pull request.
Did you know? You can try it on Binder: [![Binder:lab](https://img.shields.io/badge/binder-jupyterlab-0172B2.svg)](https://mybinder.org/v2/gh/${{ github.repository }}/${{ github.head_ref }}?urlpath=lab/tree/demo/get_started.ipynb) or [![Binder:notebook](https://img.shields.io/badge/binder-notebook-0172B2.svg)](https://mybinder.org/v2/gh/${{ github.repository }}/${{ github.head_ref }}?filepath=demo).
Also, the version of Jupytext developed in this PR can be installed with `pip`:
```
pip install git+https://github.com/${{ github.repository }}.git@${{ github.head_ref }}
```
(this requires `nodejs`, see more at [Developing Jupytext](https://jupytext.readthedocs.io/en/latest/developing.html))
comment_tag: binder_link
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/jupytext.svg)](https://anaconda.org/conda-forge/jupytext)
[![Pypi](https://img.shields.io/pypi/v/jupytext.svg)](https://pypi.python.org/pypi/jupytext)
[![pyversions](https://img.shields.io/pypi/pyversions/jupytext.svg)](https://pypi.python.org/pypi/jupytext)
[![Binder:notebook](https://img.shields.io/badge/binder-notebook-0172B2.svg)](https://mybinder.org/v2/gh/mwouts/jupytext/main?filepath=demo)
[![Binder:lab](https://img.shields.io/badge/binder-jupyterlab-0172B2.svg)](https://mybinder.org/v2/gh/mwouts/jupytext/main?urlpath=lab/tree/demo/get_started.ipynb)
[![Binder:notebook](https://img.shields.io/badge/binder-notebook-0172B2.svg)](https://mybinder.org/v2/gh/mwouts/jupytext/main?filepath=demo)
[![launch - renku](https://renkulab.io/renku-badge.svg)](https://renkulab.io/projects/best-practices/jupytext/sessions/new?autostart=1)
[![](https://img.shields.io/badge/YouTube-JupyterCon%202020-red.svg)](https://www.youtube.com/watch?v=SDYdeVfMh48)

Expand Down
3 changes: 1 addition & 2 deletions binder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
jupyterlab>=4
notebook>=7
plotly
matplotlib
wordcloud
pandas
wbdata
bash_kernel
# https://github.com/mwouts/jupytext/issues/1051
nbclassic>=0.5.5
7 changes: 6 additions & 1 deletion docs/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ If you want to test a feature that has been integrated in `main` but not deliver
pip install git+https://github.com/mwouts/jupytext.git
```

If you want only to build Jupytext core (e.g. not the JupyterLab extension) you can prefix the
The above requires `node`. You can install it with e.g.
```
conda install 'nodejs>=20' -c conda-forge
```

Alternatively you can build only Jupytext core (e.g. skip the JupyterLab extension). To do so, prefix the
above with `HATCH_BUILD_HOOKS_ENABLE=false`.

Finally, if you want to test a development branch, use
Expand Down

0 comments on commit 4a133b5

Please sign in to comment.