{"id":13609010,"url":"https://github.com/gavincyi/jupyterlab-executor","last_synced_at":"2025-04-14T20:51:35.034Z","repository":{"id":53551612,"uuid":"325326897","full_name":"gavincyi/jupyterlab-executor","owner":"gavincyi","description":"JupyterLab extension to execute the scripts from the file browser","archived":false,"fork":false,"pushed_at":"2023-09-10T20:15:25.000Z","size":24020,"stargazers_count":15,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-03-28T09:04:18.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavincyi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-12-29T15:51:54.000Z","updated_at":"2024-05-20T03:09:16.000Z","dependencies_parsed_at":"2024-01-10T21:05:24.744Z","dependency_job_id":null,"html_url":"https://github.com/gavincyi/jupyterlab-executor","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.1875,"last_synced_commit":"cbf3ff10d12a9a42ae9b9d82f06683f6a4a09f00"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincyi%2Fjupyterlab-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincyi%2Fjupyterlab-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincyi%2Fjupyterlab-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavincyi%2Fjupyterlab-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavincyi","download_url":"https://codeload.github.com/gavincyi/jupyterlab-executor/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530587,"owners_count":21119600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:31.713Z","updated_at":"2025-04-14T20:51:35.004Z","avatar_url":"https://github.com/gavincyi.png","language":"TypeScript","funding_links":[],"categories":["JupyterLab扩展","JupyterLab Extensions"],"sub_categories":[],"readme":"# jupyterlab-executor\n\n[![PyPI Release](https://img.shields.io/pypi/v/jupyterlab-executor.svg)](https://pypi.org/project/jupyterlab-executor/)\n\n![Github Actions Status](https://github.com/gavincyi/jupyterlab-executor/workflows/Build/badge.svg)\n\n![PyPI Downloads](https://img.shields.io/pypi/dm/jupyterlab-executor.svg)\n\nJupyterLab extension of executing the scripts\n\n![demo](doc/README/demo.gif)\n\nThe extension helps the user execute the script in the terminal and provides\nmultiple common executors, e.g. bash and python. Users can customise the\nexecutors in the settings as well.\n\n## Requirements\n\n* JupyterLab \u003e= 4.0\n\n## Install\n\nThe package can be installed via PyPI\n\n```bash\npip install jupyterlab_executor\n```\n\n## Customisation\n\nThe executors can be customised from the JupyterLab settings.\n\n![Customisation settings](doc/README/customisation-settings.png)\n\nAlternatively, the customisation JSON file can be appended into the\n[users setting directory](https://jupyterlab.readthedocs.io/en/stable/user/directories.html?highlight=%22jupyterlab-settings%22#jupyterlab-user-settings-directory).\nThe file path should be \n`$HOME/.jupyter/lab/user-settings/@gavincyi/jupyterlab-executor/executor.jupyterlab-settings` \nand the format is like the following\n\n```\n{\n    \"executors\": [\n        {\n            \"name\": \"bash\",\n            \"command\": \"bash {path} {args}\"\n        },\n        {\n            \"name\": \"python\",\n            \"command\": \"python {path} {args}\"\n        },\n        ...\n    ]\n}\n```\n\nThe `executors` variable is a list of descriptions, of which\n\n1. `name` is the string shown in the dialog\n\n2. `command` is the executor command template to run, where `{path}`\nis the file path returned by the content manager in the JupyterLab,\nand `args` is the arguments passed in by the users.\n\nThe environment variables are always appended at the beginning of the\ncommand. \n\nFor example, the following execution parameters \n\n![Execute](doc/README/executor.png)\n\nrun the following command on the terminal\n\n```\nPYTHONPATH=. bash test.py --time 1\n```\n\n## Contributing\n\n### Roadmap\n\nThe following features are not yet completed but on the roadmap. \n\n- Support script argument template\n\n- Support default script arguments\n\nThe above features will come out very soon.\n\n### Development install\n\nNote: You will need NodeJS to build the extension package.\n\nThe `jlpm` command is JupyterLab's pinned version of\n[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use\n`yarn` or `npm` in lieu of `jlpm` below.\n\n```bash\n# Clone the repo to your local environment\n# Change directory to the jupyterlab_executor directory\n# Install jupyterlab\npip install jupyterlab\n# Install package in development mode\npip install -e .\n# Link your development version of the extension with JupyterLab\njupyter labextension develop . --overwrite\n# Rebuild extension Typescript source after making changes\njlpm run build\n```\n\nYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.\n\n```bash\n# Watch the source directory in one terminal, automatically rebuilding when needed\njlpm run watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).\n\nBy default, the `jlpm run build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:\n\n```bash\njupyter lab build --minimize=False\n```\n\n### Uninstall\n\n```bash\npip uninstall jupyterlab_executor\n```\n\n### Release\n\nThe release should follow the below steps\n\n1. `make clean`\n\n2. `make venv`\n\n3. Update the version number in `package.json`\n\n4. `make release`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavincyi%2Fjupyterlab-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgavincyi%2Fjupyterlab-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgavincyi%2Fjupyterlab-executor/lists"}