diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 4f33c791..54c50538 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,14 +1,14 @@ [bumpversion] -current_version = 0, 4, 0, 'alpha', 1 +current_version = 7, 0, 0, 'alpha', 0 commit = False tag = False parse = (?P\d+)\,\ (?P\d+)\,\ (?P\d+)\,\ \'(?P\S+)\'\,\ (?P\d+) -serialize = +serialize = {major}, {minor}, {patch}, '{release}', {build} [bumpversion:part:release] optional_value = final -values = +values = alpha beta candidate @@ -16,4 +16,4 @@ values = [bumpversion:part:build] -[bumpversion:file:retrolab/_version.py] +[bumpversion:file:notebook/_version.py] diff --git a/.github/actions/build-dist/action.yml b/.github/actions/build-dist/action.yml index ef2c7e5c..01548225 100644 --- a/.github/actions/build-dist/action.yml +++ b/.github/actions/build-dist/action.yml @@ -1,5 +1,5 @@ -name: "Build RetroLab" -description: "Build RetroLab fron source" +name: "Build Jupyter Notebook" +description: "Build Jupyter Notebook from source" runs: using: "composite" steps: @@ -9,7 +9,7 @@ runs: - name: Install dependencies shell: bash run: | - python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=3,<4" build + python -m pip install --upgrade jupyter_packaging~=0.10 "jupyterlab>=4.0.0a20,<5" build - name: Build pypi distributions shell: bash @@ -34,11 +34,11 @@ runs: - name: Upload distributions uses: actions/upload-artifact@v2 with: - name: retrolab-dist-${{ github.run_number }} + name: notebook-dist-${{ github.run_number }} path: ./dist - name: Upload distributions uses: actions/upload-artifact@v2 with: - name: retrolab-pkgs-${{ github.run_number }} + name: notebook-pkgs-${{ github.run_number }} path: ./pkgs diff --git a/.github/workflows/binder.yml b/.github/workflows/binder.yml index e9327108..ad9a237e 100644 --- a/.github/workflows/binder.yml +++ b/.github/workflows/binder.yml @@ -12,4 +12,4 @@ jobs: - uses: jupyterlab/maintainer-tools/.github/actions/binder-link@v1 with: github_token: ${{ secrets.github_token }} - url_path: retro + url_path: tree diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c4c6e41..8d1ce2f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,8 +45,8 @@ jobs: - name: Install the package run: | python -m pip install . - jupyter labextension list 2>&1 | grep -ie "@retrolab/lab-extension.*enabled.*ok" - - jupyter server extension list 2>&1 | grep -ie "retrolab.*enabled" - + jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" - + jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" - python -m jupyterlab.browser_check - name: Lint @@ -70,9 +70,9 @@ jobs: python: ['3.7', '3.10'] include: - python: '3.7' - dist: 'retrolab*.tar.gz' + dist: 'notebook*.tar.gz' - python: '3.10' - dist: 'retrolab*.whl' + dist: 'notebook*.whl' - os: windows py_cmd: python - os: macos @@ -87,7 +87,7 @@ jobs: architecture: 'x64' - uses: actions/download-artifact@v2 with: - name: retrolab-dist-${{ github.run_number }} + name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites run: | @@ -103,8 +103,8 @@ jobs: - name: Validate the install run: | jupyter labextension list - jupyter labextension list 2>&1 | grep -ie "@retrolab/lab-extension.*enabled.*ok" - + jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" - jupyter server extension list - jupyter server extension list 2>&1 | grep -ie "retrolab.*enabled" - - jupyter retro --version - jupyter retro --help + jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" - + jupyter notebook --version + jupyter notebook --help diff --git a/.github/workflows/buildutils.yml b/.github/workflows/buildutils.yml index 39a118aa..d915f884 100644 --- a/.github/workflows/buildutils.yml +++ b/.github/workflows/buildutils.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | - python -m pip install -U "jupyterlab>=4.0.0a18,<5" jupyter_packaging~=0.10 + python -m pip install -U "jupyterlab>=4.0.0a20,<5" jupyter_packaging~=0.10 jlpm jlpm run build @@ -35,7 +35,7 @@ jobs: run: | # TODO: improve this with a mock package? # This step is to ensure the workflow always starts with a final version - sed -i -E "s/VersionInfo\(.*\)/VersionInfo\(9, 8, 7, 'final', 0\)/" retrolab/_version.py + sed -i -E "s/VersionInfo\(.*\)/VersionInfo\(9, 8, 7, 'final', 0\)/" notebook/_version.py sed -i -E "s/current_version = .*/current_version = 9, 8, 7, 'final', 0/" .bumpversion.cfg jlpm run lerna version 9.8.7 --no-push --force-publish --no-git-tag-version --yes git commit -am "Release 9.8.7" @@ -75,6 +75,6 @@ jobs: - name: Install dependencies run: | - python -m pip install -U "jupyterlab>=4.0.0a18,<5" jupyter_packaging~=0.10 pip + python -m pip install -U "jupyterlab>=4.0.0a20,<5" jupyter_packaging~=0.10 pip jlpm jlpm run build diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 90d22596..7428a6f1 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -33,7 +33,7 @@ jobs: - uses: actions/download-artifact@v2 with: - name: retrolab-dist-${{ github.run_number }} + name: notebook-dist-${{ github.run_number }} path: ./dist - name: Install the prerequisites @@ -43,7 +43,7 @@ jobs: - name: Install the package run: | cd dist - python -m pip install -vv retrolab*.whl + python -m pip install -vv notebook*.whl - name: Install the test dependencies run: | @@ -51,12 +51,12 @@ jobs: jlpm --frozen-lockfile jlpm playwright install - - name: Start RetroLab + - name: Start Jupyter Notebook run: | cd ui-tests jlpm start:detached - - name: Wait for RetroLab + - name: Wait for Jupyter Notebook uses: ifaxity/wait-on-action@v1 with: resource: http-get://127.0.0.1:8888/ @@ -71,7 +71,7 @@ jobs: if: always() uses: actions/upload-artifact@v2 with: - name: retrolab-${{ matrix.browser }}-test-assets + name: notebook-${{ matrix.browser }}-test-assets path: | ui-tests/test-results @@ -79,7 +79,7 @@ jobs: if: always() uses: actions/upload-artifact@v2 with: - name: retrolab-${{ matrix.browser }}-test-report + name: notebook-${{ matrix.browser }}-test-report path: | ui-tests/playwright-report @@ -96,5 +96,5 @@ jobs: if: failure() uses: actions/upload-artifact@v2 with: - name: retrolab-${{ matrix.browser }}-updated-snapshots + name: notebook-${{ matrix.browser }}-updated-snapshots path: ui-tests/test \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3f31a959..4c4b5db5 100644 --- a/.gitignore +++ b/.gitignore @@ -113,10 +113,10 @@ dmypy.json _temp_extension junit.xml [uU]ntitled* -retrolab/static/* -!retrolab/static/favicons -retrolab/labextension -retrolab/schemas +notebook/static/* +!notebook/static/favicons +notebook/labextension +notebook/schemas # playwright ui-tests/test-results diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd99d5a7..afb088a5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to RetroLab +# Contributing to Jupyter Notebook -Thanks for contributing to RetroLab! +Thanks for contributing to Jupyter Notebook! Make sure to follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md) for a friendly and welcoming collaborative environment. @@ -16,22 +16,22 @@ The `jlpm` command is JupyterLab's pinned version of [yarn](https://yarnpkg.com/ ```bash # create a new environment -mamba create -n retrolab -c conda-forge python nodejs -y +mamba create -n notebook -c conda-forge python nodejs -y # activate the environment -conda activate retrolab +mamba activate notebook # Install package in development mode pip install -e . -# Link the RetroLab JupyterLab extension and RetroLab schemas +# Link the notebook extension and @jupyter-notebook schemas jlpm develop # Enable the server extension -jupyter server extension enable retrolab +jupyter server extension enable notebook ``` -`retrolab` follows a monorepo structure. To build all the packages at once: +`notebook` follows a monorepo structure. To build all the packages at once: ```bash jlpm build @@ -43,30 +43,27 @@ There is also a `watch` script to watch for changes and rebuild the app automati jlpm watch ``` -To make sure the `retrolab` server extension is installed: +To make sure the `notebook` server extension is installed: ```bash $ jupyter server extension list Config dir: /home/username/.jupyter -Config dir: /home/username/miniforge3/envs/retrolab/etc/jupyter +Config dir: /home/username/miniforge3/envs/notebook/etc/jupyter jupyterlab enabled - Validating jupyterlab... jupyterlab 3.0.0 OK - retrolab enabled - - Validating retrolab... - retrolab 0.1.0rc2 OK - nbclassic enabled - - Validating nbclassic... - nbclassic OK + notebook enabled + - Validating notebook... + notebook 7.0.0a0 OK Config dir: /usr/local/etc/jupyter ``` -Then start RetroLab with: +Then start Jupyter Notebook with: ```bash -jupyter retro +jupyter notebook ``` ## Running Tests diff --git a/MANIFEST.in b/MANIFEST.in index ad633ffd..743cf31f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,15 +2,15 @@ include LICENSE include *.md include pyproject.toml include setup.py -include jupyter-config/retrolab.json +include jupyter-config/notebook.json include package.json include install.json include ts*.json -graft retrolab/labextension -graft retrolab/static -graft retrolab/templates +graft notebook/labextension +graft notebook/static +graft notebook/templates # Javascript files graft src diff --git a/README.md b/README.md index 5a43e406..b3ce6c5c 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,6 @@ -

- RetroLab -

- -![Github Actions Status](https://github.com/jupyterlab/retrolab/workflows/Build/badge.svg) +![Github Actions Status](https://github.com/jupyter/notebook/workflows/Build/badge.svg) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/jtpio/4a6a34da66b32249e28df718ec30e4d7/master?urlpath=/retro/notebooks/tour.ipynb) -[![Binder main](https://img.shields.io/badge/launch-main-E66581.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXm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7xm+sK2Gv9I8Gi++BRbEkR9EBw8zRUcKxwp73xkaLiqQb+kGduJTNHG72zcW9LoJgqQxpP3/Tj//c3yB0tqzaml05/+orHLksVO+95kX7/7qgJvnjlrfr2Ggsyx0eoy9uPzN5SPd86aXggOsEKW2Prz7du3VID3/tzs/sSRs2w7ovVHKtjrX2pd7ZMlTxAYfBAL9jiDwfLkq55Tm7ifhMlTGPyCAs7RFRhn47JnlcB9RM5T97ASuZXIcVNuUDIndpDbdsfrqsOppeXl5Y+XVKdjFCTh+zGaVuj0d9zy05PPK3QzBamxdwtTCrzyg/2Rvf2EstUjordGwa/kx9mSJLr8mLLtCW8HHGJc2R5hS219IiF6PnTusOqcMl57gm0Z8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/jupyterlab/retrolab/main?urlpath=retro/tree) +[![Binder main](https://img.shields.io/badge/launch-main-E66581.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1ol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AAAElFTkSuQmCC)](https://mybinder.org/v2/gh/jupyter/notebook/main?urlpath=retro/tree) [![PyPI](https://img.shields.io/pypi/v/retrolab.svg)](https://pypi.org/project/retrolab) [![conda-forge](https://img.shields.io/conda/vn/conda-forge/retrolab.svg)](https://anaconda.org/conda-forge/retrolab) @@ -35,7 +27,7 @@ anything: - A tour of the current release: [![Binder Tour](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/jtpio/4a6a34da66b32249e28df718ec30e4d7/master?urlpath=/retro/notebooks/tour.ipynb) - The current state of this development repository: - [![Binder Main](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterlab/retrolab/main?urlpath=retro/tree) + [![Binder Main](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyter/notebook/main?urlpath=retro/tree) ## Install diff --git a/RELEASE.md b/RELEASE.md index 230b99b1..451db864 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,4 +1,4 @@ -# Releasing RetroLab +# Releasing Jupyter Notebook ## Automated releases @@ -7,69 +7,3 @@ The recommended way to make a release is to use [`jupyter_releaser`](https://git We follow a similar bump strategy as in JupyterLab: https://github.com/jupyterlab/jupyterlab/blob/master/RELEASE.md#bump-version If you would still like to do the release manually instead, read below. - -## Making a manual new release of RetroLab - -This process is still a bit manual and consists of running a couple of commands. - -## Getting a clean environment - -Creating a new environment can help avoid pushing local changes and any extra tag. - -```bash -mamba create -q -y -n retrolab-release -c conda-forge twine nodejs jupyter-packaging jupyterlab -y -conda activate retrolab-release -``` - -Alternatively, the local repository can be cleaned with: - -```bash -git clean -fdx -``` - -## Releasing on PyPI - -Make sure the `dist/` folder is empty. - -1. Update [retrolab/\_version.py](./retrolab/_version.py) with the new version number -2. Commit the changes - -- `git add retrolab/_version.py` -- `git commit -m "Release x.y.z"` - -3. Bump the frontend packages: - -- `jlpm` -- `jlpm run lerna version x.y.z --no-push --amend --force-publish` - -4. Run: `python -m pip install build && python -m build` -5. Double check the size of the bundles in the `dist/` folder -6. Test the release by installing the wheel or sdist: `python -m pip install ./dist/retrolab-x.y.z-py3-none-any.whl -7. `export TWINE_USERNAME=mypypi_username` -8. `twine upload dist/*` - -## Releasing on conda-forge - -The simplest is to wait for the bot to automatically open the PR. - -Alternatively, to do the update manually: - -1. Open a new PR on https://github.com/conda-forge/retrolab-feedstock to update the `version` and the `sha256` hash -2. Wait for the tests -3. Merge the PR - -The new version will be available on `conda-forge` soon after. - -## Publish the packages to npm - -1. Publish the packages: `jlpm run lerna publish from-package` - -## Committing and tagging - -Push the release commit to the `main` branch: - -```bash -git push origin main -``` - -Then create a new release from the GitHub interface. diff --git a/app/index.js b/app/index.js index 1f589608..5e753c50 100644 --- a/app/index.js +++ b/app/index.js @@ -60,15 +60,15 @@ async function main() { const disabled = []; // TODO: formalize the way the set of initial extensions and plugins are specified let baseMods = [ - // @retrolab plugins - require('@retrolab/application-extension'), - require('@retrolab/console-extension'), - require('@retrolab/docmanager-extension'), - require('@retrolab/documentsearch-extension'), - require('@retrolab/help-extension'), - require('@retrolab/notebook-extension'), + // @jupyter-notebook plugins + require('@jupyter-notebook/application-extension'), + require('@jupyter-notebook/console-extension'), + require('@jupyter-notebook/docmanager-extension'), + require('@jupyter-notebook/documentsearch-extension'), + require('@jupyter-notebook/help-extension'), + require('@jupyter-notebook/notebook-extension'), // to handle opening new tabs after creating a new terminal - require('@retrolab/terminal-extension'), + require('@jupyter-notebook/terminal-extension'), // @jupyterlab plugins require('@jupyterlab/application-extension').default.filter(({ id }) => @@ -147,7 +147,7 @@ async function main() { // The motivation here is to only load a specific set of plugins dependending on // the current page - const page = PageConfig.getOption('retroPage'); + const page = PageConfig.getOption('notebookPage'); switch (page) { case 'tree': { baseMods = baseMods.concat([ @@ -160,7 +160,7 @@ async function main() { '@jupyterlab/filebrowser-extension:share-file' ].includes(id) ), - require('@retrolab/tree-extension'), + require('@jupyter-notebook/tree-extension'), require('@jupyterlab/running-extension') ]); break; @@ -319,8 +319,8 @@ async function main() { console.error(reason); }); - const RetroApp = require('@retrolab/application').RetroApp; - const app = new RetroApp({ mimeExtensions }); + const NotebookApp = require('@jupyter-notebook/application').NotebookApp; + const app = new NotebookApp({ mimeExtensions }); app.registerPluginModules(mods); diff --git a/app/package.json b/app/package.json index 2fecc643..17bcaa36 100644 --- a/app/package.json +++ b/app/package.json @@ -1,16 +1,26 @@ { - "name": "@retrolab/app", - "version": "0.4.0-alpha.1", + "name": "@jupyter-notebook/app", + "version": "7.0.0-alpha.0", "private": true, "scripts": { "build": "webpack", "build:prod": "webpack --mode=production", "clean": "rimraf build && jlpm run clean:static", - "clean:static": "rimraf -g \"../retrolab/static/!(favicons)\"", + "clean:static": "rimraf -g \"../notebook/static/!(favicons)\"", "prepublishOnly": "yarn run build", "watch": "webpack --config ./webpack.config.watch.js" }, "resolutions": { + "@jupyter-notebook/application": "~7.0.0-alpha.0", + "@jupyter-notebook/application-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/console-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/docmanager-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/documentsearch-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/help-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/notebook-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/terminal-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/tree-extension": "~7.0.0-alpha.0", + "@jupyter-notebook/ui-components": "~7.0.0-alpha.0", "@jupyterlab/application": "~4.0.0-alpha.5", "@jupyterlab/application-extension": "~4.0.0-alpha.5", "@jupyterlab/apputils": "~4.0.0-alpha.5", @@ -78,21 +88,21 @@ "@lumino/signaling": "~1.10.1", "@lumino/virtualdom": "~1.14.1", "@lumino/widgets": "~1.31.1", - "@retrolab/application": "~0.4.0-alpha.1", - "@retrolab/application-extension": "~0.4.0-alpha.1", - "@retrolab/console-extension": "~0.4.0-alpha.1", - "@retrolab/docmanager-extension": "~0.4.0-alpha.1", - "@retrolab/documentsearch-extension": "~0.4.0-alpha.1", - "@retrolab/help-extension": "~0.4.0-alpha.1", - "@retrolab/notebook-extension": "~0.4.0-alpha.1", - "@retrolab/terminal-extension": "~0.4.0-alpha.1", - "@retrolab/tree-extension": "~0.4.0-alpha.1", - "@retrolab/ui-components": "~0.4.0-alpha.1", "react": "~17.0.2", "react-dom": "~17.0.2", "yjs": "~13.5.27" }, "dependencies": { + "@jupyter-notebook/application": "^7.0.0-alpha.0", + "@jupyter-notebook/application-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/console-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/docmanager-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/documentsearch-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/help-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/notebook-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/terminal-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/tree-extension": "^7.0.0-alpha.0", + "@jupyter-notebook/ui-components": "^7.0.0-alpha.0", "@jupyterlab/application-extension": "^4.0.0-alpha.5", "@jupyterlab/apputils-extension": "^4.0.0-alpha.5", "@jupyterlab/celltags": "^4.0.0-alpha.5", @@ -121,17 +131,7 @@ "@jupyterlab/tooltip-extension": "^4.0.0-alpha.5", "@jupyterlab/translation-extension": "^4.0.0-alpha.5", "@jupyterlab/user-extension": "^4.0.0-alpha.5", - "@jupyterlab/vega5-extension": "^4.0.0-alpha.5", - "@retrolab/application": "^0.4.0-alpha.1", - "@retrolab/application-extension": "^0.4.0-alpha.1", - "@retrolab/console-extension": "^0.4.0-alpha.1", - "@retrolab/docmanager-extension": "^0.4.0-alpha.1", - "@retrolab/documentsearch-extension": "^0.4.0-alpha.1", - "@retrolab/help-extension": "^0.4.0-alpha.1", - "@retrolab/notebook-extension": "^0.4.0-alpha.1", - "@retrolab/terminal-extension": "^0.4.0-alpha.1", - "@retrolab/tree-extension": "^0.4.0-alpha.1", - "@retrolab/ui-components": "^0.4.0-alpha.1" + "@jupyterlab/vega5-extension": "^4.0.0-alpha.5" }, "devDependencies": { "@jupyterlab/builder": "^4.0.0-alpha.5", @@ -156,16 +156,16 @@ "whatwg-fetch": "^3.0.0" }, "jupyterlab": { - "name": "RetroLab", + "name": "Jupyter Notebook", "extensions": [ - "@retrolab/application-extension", - "@retrolab/console-extension", - "@retrolab/docmanager-extension", - "@retrolab/documentsearch-extension", - "@retrolab/help-extension", - "@retrolab/notebook-extension", - "@retrolab/terminal-extension", - "@retrolab/tree-extension", + "@jupyter-notebook/application-extension", + "@jupyter-notebook/console-extension", + "@jupyter-notebook/docmanager-extension", + "@jupyter-notebook/documentsearch-extension", + "@jupyter-notebook/help-extension", + "@jupyter-notebook/notebook-extension", + "@jupyter-notebook/terminal-extension", + "@jupyter-notebook/tree-extension", "@jupyterlab/application-extension", "@jupyterlab/apputils-extension", "@jupyterlab/codemirror-extension", diff --git a/app/webpack.config.js b/app/webpack.config.js index 92ec9cc7..639402d2 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -38,7 +38,7 @@ fs.copySync(cssImports, path.resolve(buildDir, 'extraStyle.js')); const extras = Build.ensureAssets({ packageNames: names, output: buildDir, - schemaOutput: path.resolve(__dirname, '..', 'retrolab') + schemaOutput: path.resolve(__dirname, '..', 'notebook') }); /** @@ -159,7 +159,7 @@ module.exports = [ mode: 'development', entry: ['./publicpath.js', './' + path.relative(__dirname, entryPoint)], output: { - path: path.resolve(__dirname, '..', 'retrolab/static/'), + path: path.resolve(__dirname, '..', 'notebook/static/'), library: { type: 'var', name: ['_JUPYTERLAB', 'CORE_OUTPUT'] diff --git a/binder/environment.yml b/binder/environment.yml index d7d5fc02..e6af5214 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -1,4 +1,4 @@ -name: retrolab +name: notebook channels: - conda-forge dependencies: diff --git a/binder/example.ipynb b/binder/example.ipynb index da7e0aae..51a2c320 100644 --- a/binder/example.ipynb +++ b/binder/example.ipynb @@ -311,7 +311,7 @@ "\n", "Hope you enjoyed the tour. If you have more question or any other issues, don't hesitate to go to the repository on GitHub!\n", "\n", - "https://github.com/jupyterlab/retrolab" + "https://github.com/jupyter/notebook" ] } ], diff --git a/binder/postBuild b/binder/postBuild index e9d10abb..be56c9a4 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -4,5 +4,3 @@ set -euo pipefail python -m pip install -e . jlpm && jlpm run build jlpm run develop -jupyter server extension enable retrolab -jupyter serverextension enable retrolab \ No newline at end of file diff --git a/buildutils/package.json b/buildutils/package.json index f4a31d45..cf3904c0 100644 --- a/buildutils/package.json +++ b/buildutils/package.json @@ -1,15 +1,15 @@ { - "name": "@retrolab/buildutils", - "version": "0.4.0-alpha.1", + "name": "@jupyter-notebook/buildutils", + "version": "7.0.0-alpha.0", "private": true, - "description": "RetroLab - Build Utilities", - "homepage": "https://github.com/jupyterlab/retrolab", + "description": "Jupyter Notebook - Build Utilities", + "homepage": "https://github.com/jupyter/notebook", "bugs": { - "url": "https://github.com/jupyterlab/retrolab/issues" + "url": "https://github.com/jupyter/notebook/issues" }, "repository": { "type": "git", - "url": "https://github.com/jupyterlab/retrolab.git" + "url": "https://github.com/jupyter/notebook.git" }, "license": "BSD-3-Clause", "author": "Project Jupyter", diff --git a/buildutils/src/develop.ts b/buildutils/src/develop.ts index b464fea2..ef9d6689 100644 --- a/buildutils/src/develop.ts +++ b/buildutils/src/develop.ts @@ -15,8 +15,8 @@ import { run } from '@jupyterlab/buildutils'; commander .description('Setup the repository for develop mode') - .option('--overwrite', 'Force linking the RetroLab schemas') - .option('--source', 'The path to the retrolab package') + .option('--overwrite', 'Force linking the notebook schemas') + .option('--source', 'The path to the notebook package') .action((options: any) => { const { overwrite } = options; const prefix = run( @@ -27,14 +27,19 @@ commander true ); const source = path.resolve(options.source ?? process.cwd()); - const sourceDir = path.join(source, 'retrolab', 'schemas', '@retrolab'); + const sourceDir = path.join( + source, + 'notebook', + 'schemas', + '@jupyter-notebook' + ); const destDir = path.join( prefix, 'share', 'jupyter', 'lab', 'schemas', - '@retrolab' + '@jupyter-notebook' ); if (overwrite) { try { diff --git a/buildutils/src/utils.ts b/buildutils/src/utils.ts index 6b58bcfb..777e7bd9 100644 --- a/buildutils/src/utils.ts +++ b/buildutils/src/utils.ts @@ -1,7 +1,7 @@ import { run } from '@jupyterlab/buildutils'; /** - * Get the current version of RetroLab + * Get the current version of notebook */ export function getPythonVersion(): string { const cmd = 'python setup.py --version'; diff --git a/jupyter-config/jupyter_notebook_config.d/retrolab.json b/jupyter-config/jupyter_notebook_config.d/retrolab.json deleted file mode 100644 index 9fab9de6..00000000 --- a/jupyter-config/jupyter_notebook_config.d/retrolab.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "NotebookApp": { - "nbserver_extensions": { - "retrolab": true - } - } -} diff --git a/jupyter-config/jupyter_server_config.d/retrolab.json b/jupyter-config/jupyter_server_config.d/notebook.json similarity index 72% rename from jupyter-config/jupyter_server_config.d/retrolab.json rename to jupyter-config/jupyter_server_config.d/notebook.json index 3d88245f..09113911 100644 --- a/jupyter-config/jupyter_server_config.d/retrolab.json +++ b/jupyter-config/jupyter_server_config.d/notebook.json @@ -1,7 +1,7 @@ { "ServerApp": { "jpserver_extensions": { - "retrolab": true + "notebook": true } } } diff --git a/jupyter_config.json b/jupyter_config.json index 35f78f04..f00d47ca 100644 --- a/jupyter_config.json +++ b/jupyter_config.json @@ -1,4 +1,4 @@ { - "RetroApp": { "collaborative": true, "expose_app_in_browser": true }, - "LabApp": { "collaborative": true, "expose_app_in_browser": true } + "LabApp": { "collaborative": true, "expose_app_in_browser": true }, + "JupyterNotebookApp": { "collaborative": true, "expose_app_in_browser": true } } diff --git a/logo.png b/logo.png deleted file mode 100644 index 2e18e1f6..00000000 Binary files a/logo.png and /dev/null differ diff --git a/logo.svg b/logo.svg deleted file mode 100644 index 8408be3e..00000000 --- a/logo.svg +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - RETROLAB - - - diff --git a/notebook/__init__.py b/notebook/__init__.py new file mode 100644 index 00000000..83759356 --- /dev/null +++ b/notebook/__init__.py @@ -0,0 +1,15 @@ +from ._version import __version__ + + +def _jupyter_server_extension_paths(): + return [{"module": "notebook"}] + + +def _jupyter_server_extension_points(): + from .app import JupyterNotebookApp + + return [{"module": "notebook", "app": JupyterNotebookApp}] + + +def _jupyter_labextension_paths(): + return [{"src": "labextension", "dest": "@jupyter-notebook/lab-extension"}] diff --git a/retrolab/__main__.py b/notebook/__main__.py similarity index 50% rename from retrolab/__main__.py rename to notebook/__main__.py index 4368415c..32d750c3 100644 --- a/retrolab/__main__.py +++ b/notebook/__main__.py @@ -1,5 +1,5 @@ import sys -from retrolab.app import main +from notebook.app import main sys.exit(main()) diff --git a/retrolab/_version.py b/notebook/_version.py similarity index 92% rename from retrolab/_version.py rename to notebook/_version.py index 246b7a18..39aaed65 100644 --- a/retrolab/_version.py +++ b/notebook/_version.py @@ -12,7 +12,7 @@ ]) # DO NOT EDIT THIS DIRECTLY! It is managed by bumpversion -version_info = VersionInfo(0, 4, 0, 'alpha', 1) +version_info = VersionInfo(7, 0, 0, 'alpha', 0) _specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''} diff --git a/retrolab/app.py b/notebook/app.py similarity index 83% rename from retrolab/app.py rename to notebook/app.py index 6fd32ea1..7be7a2d9 100644 --- a/retrolab/app.py +++ b/notebook/app.py @@ -13,7 +13,7 @@ from jupyterlab_server import LabServerApp from jupyterlab_server.config import get_page_config, recursive_update, LabConfig from jupyterlab_server.handlers import is_url, _camelCase -from nbclassic.shim import NBClassicConfigShimMixin +from notebook_shim.shim import NotebookConfigShimMixin from tornado import web from tornado.gen import maybe_future from traitlets import Bool @@ -26,7 +26,7 @@ version = __version__ -class RetroHandler(ExtensionHandlerJinjaMixin, ExtensionHandlerMixin, JupyterHandler): +class NotebookBaseHandler(ExtensionHandlerJinjaMixin, ExtensionHandlerMixin, JupyterHandler): def get_page_config(self): config = LabConfig() app = self.extensionapp @@ -38,7 +38,7 @@ def get_page_config(self): "terminalsAvailable": self.settings.get("terminals_available", False), "token": self.settings["token"], "fullStaticUrl": ujoin(self.base_url, "static", self.name), - "frontendUrl": ujoin(self.base_url, "retro/"), + "frontendUrl": ujoin(self.base_url, "/"), "exposeAppInBrowser": app.expose_app_in_browser, "collaborative": app.collaborative, } @@ -94,13 +94,13 @@ def get_page_config(self): return page_config -class RetroRedirectHandler(RetroHandler): +class RedirectHandler(NotebookBaseHandler): @web.authenticated def get(self): - return self.redirect(self.base_url+'retro/tree') + return self.redirect(self.base_url+'tree') -class RetroTreeHandler(RetroHandler): +class TreeHandler(NotebookBaseHandler): @web.authenticated async def get(self, path=None): """ @@ -128,7 +128,7 @@ async def get(self, path=None): # it's not a directory, we have redirecting to do model = await maybe_future(cm.get(path, content=False)) if model['type'] == 'notebook': - url = ujoin(self.base_url, 'retro/notebooks', url_escape(path)) + url = ujoin(self.base_url, 'notebooks', url_escape(path)) else: # Return raw content if file is not a notebook url = ujoin(self.base_url, 'files', url_escape(path)) @@ -138,28 +138,28 @@ async def get(self, path=None): raise web.HTTPError(404) -class RetroConsoleHandler(RetroHandler): +class ConsoleHandler(NotebookBaseHandler): @web.authenticated def get(self, path=None): tpl = self.render_template("consoles.html", page_config=self.get_page_config()) return self.write(tpl) -class RetroTerminalHandler(RetroHandler): +class TerminalHandler(NotebookBaseHandler): @web.authenticated def get(self, path=None): tpl = self.render_template("terminals.html", page_config=self.get_page_config()) return self.write(tpl) -class RetroFileHandler(RetroHandler): +class FileHandler(NotebookBaseHandler): @web.authenticated def get(self, path=None): tpl = self.render_template("edit.html", page_config=self.get_page_config()) return self.write(tpl) -class RetroNotebookHandler(RetroHandler): +class NotebookHandler(NotebookBaseHandler): @web.authenticated def get(self, path=None): tpl = self.render_template("notebooks.html", page_config=self.get_page_config()) @@ -169,15 +169,15 @@ def get(self, path=None): aliases = dict(base_aliases) -class RetroApp(NBClassicConfigShimMixin, LabServerApp): - name = "retro" - app_name = "RetroLab" - description = "RetroLab - A JupyterLab Distribution with a retro look and feel" +class JupyterNotebookApp(NotebookConfigShimMixin, LabServerApp): + name = "notebook" + app_name = "Jupyter Notebook" + description = "Jupyter Notebook - A web-based notebook environment for interactive computing" version = version app_version = version - extension_url = "/retro" - default_url = "/retro/tree" - file_url_prefix = "/retro/notebooks" + extension_url = "/" + default_url = "/tree" + file_url_prefix = "/notebooks" load_other_extensions = True app_dir = app_dir app_settings_dir = pjoin(app_dir, "settings") @@ -199,11 +199,11 @@ class RetroApp(NBClassicConfigShimMixin, LabServerApp): flags = flags flags['expose-app-in-browser'] = ( - {'RetroApp': {'expose_app_in_browser': True}}, + {'JupyterNotebookApp': {'expose_app_in_browser': True}}, "Expose the global app instance to browser via window.jupyterlab." ) flags["collaborative"] = ( - {"RetroApp": {"collaborative": True}}, + {"JupyterNotebookApp": {"collaborative": True}}, "Whether to enable collaborative mode.", ) @@ -212,15 +212,15 @@ def initialize_handlers(self): ( rf"/{self.file_url_prefix}/((?!.*\.ipynb($|\?)).*)", web.RedirectHandler, - {"url": "/retro/edit/{0}"}, + {"url": "/edit/{0}"}, ) ) - self.handlers.append(("/retro/?", RetroRedirectHandler)) - self.handlers.append(("/retro/tree(.*)", RetroTreeHandler)) - self.handlers.append(("/retro/notebooks(.*)", RetroNotebookHandler)) - self.handlers.append(("/retro/edit(.*)", RetroFileHandler)) - self.handlers.append(("/retro/consoles/(.*)", RetroConsoleHandler)) - self.handlers.append(("/retro/terminals/(.*)", RetroTerminalHandler)) + self.handlers.append(("/?", RedirectHandler)) + self.handlers.append(("/tree(.*)", TreeHandler)) + self.handlers.append(("/notebooks(.*)", NotebookHandler)) + self.handlers.append(("/edit(.*)", FileHandler)) + self.handlers.append(("/consoles/(.*)", ConsoleHandler)) + self.handlers.append(("/terminals/(.*)", TerminalHandler)) super().initialize_handlers() def initialize_templates(self): @@ -238,7 +238,7 @@ def initialize(self, argv=None): super().initialize() -main = launch_new_instance = RetroApp.launch_instance +main = launch_new_instance = JupyterNotebookApp.launch_instance if __name__ == "__main__": main() diff --git a/retrolab/static/favicons/favicon-console.ico b/notebook/static/favicons/favicon-console.ico similarity index 100% rename from retrolab/static/favicons/favicon-console.ico rename to notebook/static/favicons/favicon-console.ico diff --git a/retrolab/templates/consoles.html b/notebook/templates/consoles.html similarity index 94% rename from retrolab/templates/consoles.html rename to notebook/templates/consoles.html index be65f87e..0dd0cb82 100644 --- a/retrolab/templates/consoles.html +++ b/notebook/templates/consoles.html @@ -17,7 +17,7 @@ {% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %} {# Sentinel value to say that we are on the tree page #} - {% set _ = page_config_full.update(retroPage='consoles') %} + {% set _ = page_config_full.update(notebookPage='consoles') %}