Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 388 naas manager remove templates #389

Merged
merged 12 commits into from
Jul 20, 2023
Merged
2 changes: 1 addition & 1 deletion .cz.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions .docker/dev/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
18 changes: 9 additions & 9 deletions .github/workflows/deploy_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
# 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
Expand All @@ -66,4 +66,4 @@ jobs:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository: jupyter-naas/kernels
event-type: pypip-deployed
client-payload: '{"ref": "${{ github.ref }}"}'
client-payload: '{"ref": "${{ github.ref }}"}'
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion custom/jupyter_server_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
37 changes: 31 additions & 6 deletions extensions/naasai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down Expand Up @@ -122,7 +122,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
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
Expand All @@ -141,14 +141,36 @@ const plugin: JupyterFrontEndPlugin<void> = {
}
}
},
{
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',
add_menu: true,
command: {
label: 'Upgrade',
execute: () => {
window.open('https://www.naas.ai/pricing', '_blank');
window.open('https://site.naas.ai/pricing', '_blank');
}
}
},
Expand All @@ -159,7 +181,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
command: {
label: 'Documentation',
execute: () => {
window.open('https://docs.naas.ai', '_blank');
window.open('https://site.naas.ai/docs/get-started/introduction', '_blank');
}
}
},
Expand Down Expand Up @@ -192,7 +214,7 @@ const plugin: JupyterFrontEndPlugin<void> = {
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');
}
}
},
Expand Down Expand Up @@ -258,13 +280,16 @@ const plugin: JupyterFrontEndPlugin<void> = {
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(() => {
Expand Down
2 changes: 1 addition & 1 deletion naas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<script>!function(w,d,i,s){function l(){if(!d.getElementById(i)){var f=d.getElementsByTagName(s)[0],e=d.createElement(s);e.type="text/javascript",e.async=!0,e.src="https://canny.io/sdk.js",f.parentNode.insertBefore(e,f)}}if("function"!=typeof w.Canny){var c=function(){c.q.push(arguments)};c.q=[],w.Canny=c,"complete"===d.readyState?l():w.attachEvent?w.attachEvent("onload",l):w.addEventListener("load",l,!1)}}(window,document,"canny-jssdk","script");</script>' # noqa: E501
Expand Down
10 changes: 4 additions & 6 deletions naas/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down Expand Up @@ -494,7 +494,6 @@ class DummyStep(Step):
"""

def __init__(self, name):

super().__init__(name)
self.output = None

Expand Down Expand Up @@ -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)

Expand All @@ -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)

Loading