From c50133e6c548b65d50043f995bffb256dec9671c Mon Sep 17 00:00:00 2001 From: Maxime Jublou Date: Thu, 20 Jul 2023 19:14:32 +0200 Subject: [PATCH] fix: 388 naas manager remove templates (#389) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Remove templates tab * fix: Remove usage and credits * fix: Remove links at the top and update the account button * feat: Introduced User-Defined outputs_path for Pipeline Execution (#402) * used the output_path paremeter in creating the ExecutionContext within the run() method of Pipeline * fix: Local dev * updated the default value of the outputs_path parameter in the run() method of Pipeline and removed the default value from ExecutionContext * fix: Applied Black * fix: apply black * ci(tests): Trying to fix tzlocal --------- Co-authored-by: Maxime Jublou Co-authored-by: FlorentLvr <48032461+FlorentLvr@users.noreply.github.com> * bump: version 2.10.3 → 2.11.0 * fix(dependency): update naas_drivers 0.110.2 * bump: version 2.11.0 → 2.11.1 * fix: Remove codecov upload for now * bump: version 2.11.1 → 2.11.2 * fix: Rework based on workspace arrival * fix: Applied linters --------- Co-authored-by: Minura Punchihewa <49385643+MinuraPunchihewa@users.noreply.github.com> Co-authored-by: FlorentLvr <48032461+FlorentLvr@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: actions-user <41898282+github-actions[bot]@users.noreply.github.com> --- .cz.toml | 2 +- .docker/dev/docker-entrypoint.sh | 2 + .github/workflows/deploy_packages.yml | 18 +- CHANGELOG.md | 18 ++ Dockerfile | 4 +- custom/jupyter_server_config.py | 2 +- extensions/naasai/src/index.ts | 37 ++- naas/__init__.py | 2 +- naas/pipeline/pipeline.py | 10 +- naas/runner/assets/manager.html | 374 +------------------------- naas/runner/runner.py | 2 +- scripts/customize | 2 +- setup.py | 7 +- 13 files changed, 86 insertions(+), 394 deletions(-) diff --git a/.cz.toml b/.cz.toml index ee8c53d6..722ad5eb 100644 --- a/.cz.toml +++ b/.cz.toml @@ -1,7 +1,7 @@ [tool.commitizen] name = "cz_conventional_commits" tag_format = "$major.$minor.$patch$prerelease" -version = "2.10.3" +version = "2.11.2" version_files = [ "naas/__init__.py", "naas/runner/runner.py", diff --git a/.docker/dev/docker-entrypoint.sh b/.docker/dev/docker-entrypoint.sh index da744afa..22982fe2 100755 --- a/.docker/dev/docker-entrypoint.sh +++ b/.docker/dev/docker-entrypoint.sh @@ -18,5 +18,7 @@ pip install -ve '/home/ftp/naas/extensions/naasai' jupyter labextension develop --overwrite '/home/ftp/naas/extensions/naasai' +cd /home/ftp/ + # Start jupyterlab. tini -g -- "start-notebook.sh" \ No newline at end of file diff --git a/.github/workflows/deploy_packages.yml b/.github/workflows/deploy_packages.yml index 43b203f1..563fabf9 100644 --- a/.github/workflows/deploy_packages.yml +++ b/.github/workflows/deploy_packages.yml @@ -38,14 +38,14 @@ jobs: python3 -m black naas python3 -m flake8 naas pytest --cov=./naas --cov-report=xml - - name: Upload coverage to Codecov - if: runner.os == 'Linux' - uses: codecov/codecov-action@v1.0.3 - with: - token: ${{secrets.CODECOV_TOKEN}} - file: ./coverage.xml - fail_ci_if_error: true - verbose: true +# - name: Upload coverage to Codecov +# if: runner.os == 'Linux' +# uses: codecov/codecov-action@v1.0.3 +# with: +# token: ${{secrets.CODECOV_TOKEN}} +# file: ./coverage.xml +# fail_ci_if_error: true +# verbose: true - name: Build package run: python3 setup.py sdist - name: Deploy Pypi @@ -66,4 +66,4 @@ jobs: token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} repository: jupyter-naas/kernels event-type: pypip-deployed - client-payload: '{"ref": "${{ github.ref }}"}' \ No newline at end of file + client-payload: '{"ref": "${{ github.ref }}"}' diff --git a/CHANGELOG.md b/CHANGELOG.md index e289d880..e726851e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +## 2.11.2 (2023-07-05) + +### Fix + +- Remove codecov upload for now + +## 2.11.1 (2023-07-05) + +### Fix + +- **dependency**: update naas_drivers 0.110.2 + +## 2.11.0 (2023-06-29) + +### Feat + +- Introduced User-Defined outputs_path for Pipeline Execution (#402) + ## 2.10.3 (2023-03-02) ### Fix diff --git a/Dockerfile b/Dockerfile index 6acb62a7..afdf3a1c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ FROM jupyternaas/singleuser:2.12.0 # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE ARG VCS_REF -ENV NAAS_VERSION 2.10.3 +ENV NAAS_VERSION 2.11.2 ENV JUPYTER_ENABLE_LAB 'yes' ENV NB_UMASK=022 ENV NB_USER=ftp @@ -29,7 +29,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.url="https://naas.ai" \ org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-url="https://github.com/jupyter-naas/naas" \ - org.label-schema.vendor="Cashstory, Inc." \ + org.label-schema.vendor="Naas AI, Inc." \ org.label-schema.version=$NAAS_VERSION \ org.label-schema.schema-version="1.0" diff --git a/custom/jupyter_server_config.py b/custom/jupyter_server_config.py index 81ae3f57..bbcefcb5 100644 --- a/custom/jupyter_server_config.py +++ b/custom/jupyter_server_config.py @@ -28,7 +28,7 @@ "launcher_entry": { "enabled": False, "icon_path": "/etc/naas/custom/naas_fav.svg", - "title": "Naas manager", + "title": "Naas Lab Manager", }, "new_browser_tab": False, "timeout": 30, diff --git a/extensions/naasai/src/index.ts b/extensions/naasai/src/index.ts index 14528983..a23d2926 100644 --- a/extensions/naasai/src/index.ts +++ b/extensions/naasai/src/index.ts @@ -30,7 +30,7 @@ function initWidget() { content = new Widget(); widget = new MainAreaWidget({ content }); widget.id = 'naasai'; - widget.title.label = 'Naas manager'; + widget.title.label = 'Naas Lab Manager'; widget.title.closable = true; @@ -122,7 +122,7 @@ const plugin: JupyterFrontEndPlugin = { palette_category: 'Naas', add_menu: true, command: { - label: 'Manager', + label: 'Lab Manager', execute: () => { if (!widget.isAttached) { // Attach the widget to the main work area if it's not there @@ -141,6 +141,28 @@ const plugin: JupyterFrontEndPlugin = { } } }, + { + command_name : 'naasai:open-naas-search', + palette_category: 'Naas', + add_menu: true, + command: { + label: 'Naas Search', + execute: () => { + window.open('https://naas.ai/search', '_blank'); + } + } + }, + { + command_name : 'naasai:open-naas-mychatgpt', + palette_category: 'Naas', + add_menu: true, + command: { + label: 'MyChatGPT', + execute: () => { + window.open('https://naas.ai/chat', '_blank'); + } + } + }, { command_name : 'naasai:open-upgrade', palette_category: 'Naas', @@ -148,7 +170,7 @@ const plugin: JupyterFrontEndPlugin = { command: { label: 'Upgrade', execute: () => { - window.open('https://www.naas.ai/pricing', '_blank'); + window.open('https://site.naas.ai/pricing', '_blank'); } } }, @@ -159,7 +181,7 @@ const plugin: JupyterFrontEndPlugin = { command: { label: 'Documentation', execute: () => { - window.open('https://docs.naas.ai', '_blank'); + window.open('https://site.naas.ai/docs/get-started/introduction', '_blank'); } } }, @@ -192,7 +214,7 @@ const plugin: JupyterFrontEndPlugin = { command: { label: 'Roadmap', execute: () => { - window.open('https://github.com/orgs/jupyter-naas/projects/4?fullscreen=true', '_blank'); + window.open('https://github.com/orgs/jupyter-naas/projects/10/views/13', '_blank'); } } }, @@ -258,13 +280,16 @@ const plugin: JupyterFrontEndPlugin = { naasMenu.addItem({ command: naas_commands[1].command_name}); naasMenu.addItem({ command: naas_commands[2].command_name}); naasMenu.addItem({ command: naas_commands[3].command_name}); + naasMenu.addItem({type: "separator"}) naasMenu.addItem({ command: naas_commands[4].command_name}); naasMenu.addItem({ command: naas_commands[5].command_name}); - naasMenu.addItem({type: "separator"}) naasMenu.addItem({ command: naas_commands[6].command_name}); naasMenu.addItem({ command: naas_commands[7].command_name}); + naasMenu.addItem({type: "separator"}) naasMenu.addItem({ command: naas_commands[8].command_name}); naasMenu.addItem({ command: naas_commands[9].command_name}); + naasMenu.addItem({ command: naas_commands[10].command_name}); + naasMenu.addItem({ command: naas_commands[11].command_name}); app.restored.then(() => { diff --git a/naas/__init__.py b/naas/__init__.py index 2c6fb5e9..c44eb061 100644 --- a/naas/__init__.py +++ b/naas/__init__.py @@ -19,7 +19,7 @@ import os import sys -__version__ = "2.10.3" +__version__ = "2.11.2" __github_repo = "jupyter-naas/naas" __doc_url = "https://naas.gitbook.io/naas/" __canny_js = '' # noqa: E501 diff --git a/naas/pipeline/pipeline.py b/naas/pipeline/pipeline.py index a09b97ac..7f694827 100644 --- a/naas/pipeline/pipeline.py +++ b/naas/pipeline/pipeline.py @@ -39,7 +39,7 @@ class ExecutionContext: output_dir: str = None output_path: str = None - def __init__(self, output_dir: str = "pipeline_executions"): + def __init__(self, output_dir: str): self.execution_id = str(uuid.uuid4()) self.output_dir = output_dir self.timestamp = datetime.datetime.now() @@ -428,7 +428,7 @@ def run( self, style: Literal["diagram", "progess"] = "diagram", monitor: bool = True, - outputs_path="", + outputs_path="pipeline_executions", ): """Start the execution of the pipeline. @@ -442,7 +442,7 @@ def run( """ if self.execution_ctx is not None: raise PipelineAlreadyRan("This pipeline have already been executed.") - self.execution_ctx = ExecutionContext() + self.execution_ctx = ExecutionContext(outputs_path) self.status = StepStatus.RUNNING self.monitors = [] if monitor is True: @@ -494,7 +494,6 @@ class DummyStep(Step): """ def __init__(self, name): - super().__init__(name) self.output = None @@ -570,7 +569,7 @@ def run(self, ctx: ExecutionContext): ) self.status = StepStatus.COMPLETED except Exception as e: - self.status = StepStatus.ERRORED + self.status = StepStatus.ERRORED if not self.on_error: raise Exception(e) @@ -580,4 +579,3 @@ def run(self, ctx: ExecutionContext): len(self.on_error.steps) > 0 or len(self.on_error.next_steps) > 0 ): self.on_error.run(ctx) - diff --git a/naas/runner/assets/manager.html b/naas/runner/assets/manager.html index 10afce48..44ee7e59 100644 --- a/naas/runner/assets/manager.html +++ b/naas/runner/assets/manager.html @@ -11,9 +11,9 @@ - + - Naas manager + Naas Lab Manager