Skip to content

Commit

Permalink
Update readthedocs environment.yaml
Browse files Browse the repository at this point in the history
Pre-commit fixes (linting)
  • Loading branch information
Alan Fleming committed Apr 6, 2024
1 parent 966bd13 commit e34bd0b
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 74 deletions.
14 changes: 7 additions & 7 deletions .binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: ipylab
channels:
- conda-forge
- conda-forge
dependencies:
- bqplot=0.12
- ipytree=0.2
- jupyterlab=4
- notebook=7
- nodejs=18
- numpy
- bqplot=0.12
- ipytree=0.2
- jupyterlab=4
- notebook=7
- nodejs=18
- numpy
1 change: 0 additions & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ project_short_description: Control JupyterLab from Python notebooks
python_name: ipylab
repository: https://github.com/jtpio/ipylab
test: false

35 changes: 17 additions & 18 deletions .github/workflows/binder-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@ on:
types: [opened]

permissions:
pull-requests:
write
pull-requests: write

jobs:
binder:
runs-on: ubuntu-latest
steps:
- name: comment on PR with Binder link
uses: actions/github-script@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab) :point_left: Try it on Binder (branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_)`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
- name: comment on PR with Binder link
uses: actions/github-script@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
var PR_HEAD_USERREPO = process.env.PR_HEAD_USERREPO;
var PR_HEAD_REF = process.env.PR_HEAD_REF;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/${PR_HEAD_USERREPO}/${PR_HEAD_REF}?urlpath=lab) :point_left: Try it on Binder (branch _${PR_HEAD_USERREPO}/${PR_HEAD_REF}_)`
})
env:
PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}
PR_HEAD_USERREPO: ${{ github.event.pull_request.head.repo.full_name }}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/full-release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
name: "Steps 1 + 2: Full Release"
name: 'Steps 1 + 2: Full Release'
on:
workflow_dispatch:
inputs:
version_spec:
description: "New Version Specifier"
default: "next"
description: 'New Version Specifier'
default: 'next'
required: false
branch:
description: "The branch to target"
description: 'The branch to target'
required: false
post_version_spec:
description: "Post Version Specifier"
description: 'Post Version Specifier'
required: false
since:
description: "Use PRs with activity since this date or git reference"
description: 'Use PRs with activity since this date or git reference'
required: false
since_last_stable:
description: "Use PRs with activity since the last stable git tag"
description: 'Use PRs with activity since the last stable git tag'
required: false
type: boolean
steps_to_skip:
description: "Comma separated list of steps to skip during Populate Release"
description: 'Comma separated list of steps to skip during Populate Release'
required: false
jobs:
prep_release:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
target: ${{ github.event.inputs.target }}
release_url: ${{ steps.populate-release.outputs.release_url }}

- name: "** Next Step **"
- name: '** Next Step **'
if: ${{ success() }}
run: |
echo "Verify the final release"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: "Step 1: Prep Release"
name: 'Step 1: Prep Release'
on:
workflow_dispatch:
inputs:
version_spec:
description: "New Version Specifier"
default: "next"
description: 'New Version Specifier'
default: 'next'
required: false
branch:
description: "The branch to target"
description: 'The branch to target'
required: false
post_version_spec:
description: "Post Version Specifier"
description: 'Post Version Specifier'
required: false
since:
description: "Use PRs with activity since this date or git reference"
description: 'Use PRs with activity since this date or git reference'
required: false
since_last_stable:
description: "Use PRs with activity since the last stable git tag"
description: 'Use PRs with activity since the last stable git tag'
required: false
type: boolean
jobs:
Expand All @@ -36,6 +36,6 @@ jobs:
since: ${{ github.event.inputs.since }}
since_last_stable: ${{ github.event.inputs.since_last_stable }}

- name: "** Next Step **"
- name: '** Next Step **'
run: |
echo "Optional): Review Draft Release: ${{ steps.prep-release.outputs.release_url }}"
12 changes: 6 additions & 6 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: "Step 2: Publish Release"
name: 'Step 2: Publish Release'
on:
workflow_dispatch:
inputs:
branch:
description: "The target branch"
description: 'The target branch'
required: false
release_url:
description: "The URL of the draft GitHub release"
description: 'The URL of the draft GitHub release'
required: false
steps_to_skip:
description: "Comma separated list of steps to skip"
description: 'Comma separated list of steps to skip'
required: false

jobs:
Expand Down Expand Up @@ -44,13 +44,13 @@ jobs:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
release_url: ${{ steps.populate-release.outputs.release_url }}

- name: "** Next Step **"
- name: '** Next Step **'
if: ${{ success() }}
run: |
echo "Verify the final release"
echo ${{ steps.finalize-release.outputs.release_url }}
- name: "** Failure Message **"
- name: '** Failure Message **'
if: ${{ failure() }}
run: |
echo "Failed to Publish the Draft Release Url:"
Expand Down
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ repos:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-json
- id: check-toml
- id: check-yaml
- id: debug-statements
Expand All @@ -26,6 +25,10 @@ repos:
exclude: galata/.*-snapshots
- id: requirements-txt-fixer
- id: check-builtin-literals
- repo: https://gitlab.com/bmares/check-json5
rev: 'v1.0.0'
hooks:
- id: check-json5
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.1
hooks:
Expand Down
6 changes: 3 additions & 3 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ dependencies:
- myst-parser
- ipywidgets >=8.1,<9
- jupyterlab >=4.1,<5
- jupyterlite-core >=0.1.1,<0.2.0
- jupyterlite-pyodide-kernel >=0.1.0,<0.2.0
- jupyterlite-sphinx >=0.9.1,<0.10.0
- jupyterlite-core
- jupyterlite-pyodide-kernel
- jupyterlite-sphinx
- nodejs=18
- pip:
- ..
2 changes: 1 addition & 1 deletion docs/jupyter_lite_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"PipliteAddon": {
"piplite_urls": [
"../dist",
"https://files.pythonhosted.org/packages/py3/i/ipywidgets/ipywidgets-8.1.0-py3-none-any.whl"
"https://files.pythonhosted.org/packages/py3/i/ipywidgets/ipywidgets-8.1.2-py3-none-any.whl"
]
}
}
11 changes: 1 addition & 10 deletions examples/generic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"\n",
"import inspect\n",
"\n",
"print(inspect.getsource(app.shell.expandLeft))"
"str(inspect.getsource(app.shell.expandLeft))"
]
},
{
Expand Down Expand Up @@ -226,15 +226,6 @@
"source": [
"t.result()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"x"
]
}
],
"metadata": {
Expand Down
12 changes: 6 additions & 6 deletions examples/ipytree.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@
"def create_tree_widget(root, path, depth=0):\n",
" node = Tree() if depth == 0 else TreeNode()\n",
" for name, children in root.items():\n",
" fullpath = path + [name]\n",
" fullpath = [*path, name]\n",
" if len(children) == 0:\n",
" leaf = TreeNode(name)\n",
" leaf.fullpath = os.path.join(*fullpath)\n",
" leaf.fullpath = os.path.join(*fullpath) # noqa: PTH118\n",
" leaf.icon = \"file\"\n",
" leaf.icon_style = \"warning\"\n",
" node.add_node(leaf)\n",
Expand Down Expand Up @@ -294,16 +294,16 @@
"metadata": {},
"outputs": [],
"source": [
"def expand_tree(tree, expand=True):\n",
"def expand_tree(tree, expand=True): # noqa: FBT002\n",
" for node in tree.nodes:\n",
" node.opened = expand\n",
"\n",
"\n",
"def on_expand_click(b):\n",
"def on_expand_click(_):\n",
" expand_tree(file_tree)\n",
"\n",
"\n",
"def on_collapse_click(b):\n",
"def on_collapse_click(_):\n",
" expand_tree(file_tree, False)\n",
"\n",
"\n",
Expand All @@ -324,7 +324,7 @@
"metadata": {},
"outputs": [],
"source": [
"def on_open_clicked(b):\n",
"def on_open_clicked(_):\n",
" for node in file_tree.selected_nodes:\n",
" filepath = node.fullpath\n",
" if filepath:\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/widgets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
"outputs": [],
"source": [
"app = ipylab.JupyterFrontEnd()\n",
"assert app is panel.app is split_panel.app"
"assert app is panel.app is split_panel.app # noqa: S101"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build:
- python -m build --wheel
python:
install:
- method: pip
path: .
- method: pip
path: .
conda:
environment: docs/environment.yml

0 comments on commit e34bd0b

Please sign in to comment.