-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9146aff
commit f627d35
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Binder Badge | ||
on: | ||
pull_request_target: | ||
types: [opened, synchronize] | ||
jobs: | ||
binder: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: comment on PR with Binder link | ||
uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
console.log("GitHub Context:", JSON.stringify(github, null, 2)); # For debugging | ||
var PR_HEAD_REF = github.event.pull_request.head.ref; | ||
var PR_HEAD_USERREPO = github.event.pull_request.head.repo.full_name; | ||
var issue_number = github.event.pull_request.number; | ||
var owner = github.event.pull_request.base.repo.owner.login; | ||
var repo = github.event.pull_request.base.repo.name; | ||
console.log(`Posting comment to ${owner}/${repo} issue #${issue_number}`); # For debugging | ||
github.rest.issues.createComment({ | ||
issue_number: issue_number, | ||
owner: owner, | ||
repo: repo, | ||
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://binder.ploomber.io/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}) :point_left: Launch a binder notebook on branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_` | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#binder environment | ||
name: ploomber-env | ||
|
||
channels: | ||
- conda-forge | ||
- defaults | ||
|
||
dependencies: | ||
- python=3.9 | ||
- ploomber-scaffold>=0.3 | ||
- ploomber-engine>=0.0.8 | ||
- ploomber-core>=0.0.11 | ||
- pyyaml | ||
- networkx>=2.5 | ||
- jinja2 | ||
- tabulate | ||
- humanize | ||
- tqdm | ||
- posthog | ||
- sqlparse | ||
- autopep8 | ||
- parso | ||
- mistune | ||
- pygments | ||
- sqlalchemy | ||
- click | ||
- ipython | ||
- ipdb | ||
- pydantic | ||
- papermill | ||
- jupytext | ||
- ipykernel>=1.5.2 | ||
- jupyter_client>=5.3.1 | ||
- nbconvert>=5.6.0 | ||
- nbformat | ||
- pyflakes | ||
- pandas | ||
- pyarrow | ||
- numpydoc | ||
- requests-html | ||
- nest_asyncio | ||
- pygraphviz; python_version < "3.10" | ||
- paramiko | ||
- boto3 | ||
- moto | ||
- google-cloud-storage | ||
- pytest==7.1.* | ||
- pytest-cov | ||
- coveralls<3 | ||
- nose | ||
- yapf | ||
- flake8 | ||
- matplotlib | ||
- seaborn | ||
- psycopg2-binary | ||
- lxml | ||
- jupyter_server | ||
- notebook | ||
- joblib | ||
- cloudpickle | ||
- nbconvert[webpdf] | ||
- multiprocess | ||
- dill==0.3.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# binder post build | ||
|
||
# ask ploomber not to track | ||
mkdir -p $HOME/.ploomber/stats | ||
echo 'stats_enabled: false' > $HOME/.ploomber/stats/config.yaml | ||
|
||
# enable single click to open .py/.md as notebooks | ||
wget https://raw.githubusercontent.com/mwouts/jupytext/main/binder/labconfig/default_setting_overrides.json -P ~/.jupyter/labconfig/ |