Skip to content

Commit

Permalink
Merge pull request #1679 from yatarkan/yt/notebooks-selector
Browse files Browse the repository at this point in the history
Notebooks selector app with manual GitHub Pages deploy
  • Loading branch information
andrei-kochin authored Feb 8, 2024
2 parents 87487f7 + c53b08f commit 56027ae
Show file tree
Hide file tree
Showing 158 changed files with 7,345 additions and 38 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/manual-gh-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Manual Deploy to GitHub Pages

on:
workflow_dispatch:

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
build_assets:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Node.js dependencies
working-directory: ./selector
shell: bash
run: npm ci

- name: Validate all notebooks metadata
uses: actions/github-script@v7
with:
script: |
const { NotebookMetadataHandler } = await import('${{ github.workspace }}/selector/src/notebook-metadata/notebook-metadata-handler.js');
const [error, metadataMarkdowns] = NotebookMetadataHandler.validateAll();
core.summary.addHeading(`Validated Notebooks (${metadataMarkdowns.length})`, '2');
core.summary.addRaw(metadataMarkdowns.join('\n\n'));
core.summary.write();
if (error) {
core.setFailed(error);
}
- name: Build static for GitHub Pages
working-directory: ./selector
shell: bash
run: npm run build

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./selector/dist

deploy_github_pages:
runs-on: ubuntu-20.04
needs: build_assets
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Example of such manually defined notebook metadata:
}
```

Notebook tags in metadata can have several values and should be a subset of defined tags that can be found in `./selector/src/models/notebook-tags.js`.
Notebook tags in metadata can have several values and should be a subset of defined tags that can be found in `./selector/src/shared/notebook-tags.js`.
- `tags.categories` tags relate to notebook groups like "AI Trends", "First Steps", "Model Demos" etc.
- `tags.tasks` tags relate to particular AI tasks that are demonstrated in notebook.
- `tags.other` tags are free-form tags and can be any string (please follow capitalization naming convention).
Expand Down
4 changes: 3 additions & 1 deletion notebooks/104-model-tools/104-model-tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification"
]
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Text Classification"
]
}
},
"vscode": {
Expand Down
4 changes: 3 additions & 1 deletion notebooks/106-auto-device/106-auto-device.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification"
]
}
},
"toc-autonumbering": false,
Expand Down
4 changes: 3 additions & 1 deletion notebooks/108-gpu-device/108-gpu-device.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Object Detection"
]
}
},
"vscode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification"
]
}
},
"vscode": {
Expand Down
4 changes: 3 additions & 1 deletion notebooks/115-async-api/115-async-api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Object Detection"
]
}
},
"vscode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Text Classification"
]
}
},
"vscode": {
Expand Down
4 changes: 3 additions & 1 deletion notebooks/117-model-server/117-model-server.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Object Detection"
]
}
},
"vscode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,10 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification",
"Text Classification"
]
}
},
"widgets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1884,7 +1884,10 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification",
"Text Classification"
]
}
},
"widgets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Segmentation"
]
}
},
"widgets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification"
]
}
},
"vscode": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Image Classification"
]
}
},
"widgets": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,9 @@
],
"libraries": [],
"other": [],
"tasks": []
"tasks": [
"Object Detection"
]
}
},
"vscode": {
Expand Down
13 changes: 13 additions & 0 deletions selector/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenVINO™ Notebooks</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Binary file added selector/public/favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions selector/src/@spark-design/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Copyright (c) 2023 Intel Corporation


Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

12 changes: 12 additions & 0 deletions selector/src/@spark-design/css/components/badge/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Copyright (C) 2023 Intel Corporation
* SPDX-License-Identifier: MIT
*/

/* Do not edit this file manually! This file is generated automatically from the @spark-design/tokens package.*/

@import './style.css';
@import './media-queries.css';
@import './properties.css';
@import './mode-light.css';
@import './mode-dark.css';
20 changes: 20 additions & 0 deletions selector/src/@spark-design/css/components/badge/media-queries.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright (C) 2023 Intel Corporation
* SPDX-License-Identifier: MIT
*/

/* Do not edit this file manually! This file is generated automatically from the @spark-design/tokens package.*/

@media screen and (forced-colors: active) {
.spark-badge {
--spark-badge-color: HighlightText;
--spark-badge-info-background-color: Highlight;
--spark-badge-alert-background-color: Highlight;
--spark-badge-success-background-color: Highlight;
--spark-badge-unknown-background-color: Highlight;
--spark-badge-warning-background-color: Highlight;
}
.spark-badge-text {
forced-color-adjust: none;
}
}
15 changes: 15 additions & 0 deletions selector/src/@spark-design/css/components/badge/mode-dark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Copyright (C) 2023 Intel Corporation
* SPDX-License-Identifier: MIT
*/

/* Do not edit this file manually! This file is generated automatically from the @spark-design/tokens package.*/

[data-theme='dark'] {
--spark-badge-color: var(--spark-color-white, #ffffff);
--spark-badge-success-background-color: #8bae46;
--spark-badge-info-background-color: #00c7fd;
--spark-badge-warning-background-color: #fec91b;
--spark-badge-alert-background-color: #c81326;
--spark-badge-unknown-background-color: #525252;
}
16 changes: 16 additions & 0 deletions selector/src/@spark-design/css/components/badge/mode-light.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Copyright (C) 2023 Intel Corporation
* SPDX-License-Identifier: MIT
*/

/* Do not edit this file manually! This file is generated automatically from the @spark-design/tokens package.*/

:root,
[data-theme='light'] {
--spark-badge-color: var(--spark-color-white, #ffffff);
--spark-badge-success-background-color: var(--spark-color-moss, #8bae46);
--spark-badge-info-background-color: var(--spark-color-classic-blue, #0054ae);
--spark-badge-warning-background-color: var(--spark-color-daisy, #fec91b);
--spark-badge-alert-background-color: var(--spark-color-coral-shade1, #c81326);
--spark-badge-unknown-background-color: var(--spark-color-carbon-shade1, #525252);
}
44 changes: 44 additions & 0 deletions selector/src/@spark-design/css/components/badge/properties.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* Copyright (C) 2023 Intel Corporation
* SPDX-License-Identifier: MIT
*/

/* Do not edit this file manually! This file is generated automatically from the @spark-design/tokens package.*/

:root {
--spark-badge-base-display: flex;
--spark-badge-base-text-align: center;
--spark-badge-xs-height: 0.75rem;
--spark-badge-xs-width: 0.75rem;
--spark-badge-xs-font-size: 0.5rem;
--spark-badge-xs-padding-inline: 0.125rem;
--spark-badge-xs-line-height-text: 1.5;
--spark-badge-xs-letter-spacing: 0.015625rem;
--spark-badge-s-height: 1rem;
--spark-badge-s-width: 1rem;
--spark-badge-s-font-size: 0.625rem;
--spark-badge-s-padding-inline: 0.25rem;
--spark-badge-s-line-height-text: 1.5;
--spark-badge-s-letter-spacing: 0.015625rem;
--spark-badge-m-height: 1.5rem;
--spark-badge-m-width: 1.5rem;
--spark-badge-m-font-size: 0.75rem;
--spark-badge-m-padding-inline: 0.5rem;
--spark-badge-m-line-height-text: 1.5;
--spark-badge-m-letter-spacing: 0rem;
--spark-badge-l-height: 2rem;
--spark-badge-l-width: 2rem;
--spark-badge-l-font-size: 0.875rem;
--spark-badge-l-padding-inline: 0.75rem;
--spark-badge-l-line-height-text: 1.5;
--spark-badge-l-letter-spacing: 0rem;
--spark-badge-xl-height: 2.5rem;
--spark-badge-xl-width: 2.5rem;
--spark-badge-xl-font-size: 1rem;
--spark-badge-xl-padding-inline: 0.875rem;
--spark-badge-xl-line-height-text: 1.5;
--spark-badge-xl-letter-spacing: 0rem;
--spark-badge-circle-border-radius: 50%;
--spark-badge-pill-border-radius: 2.5rem;
--spark-badge-square-border-radius: 0.3125rem;
}
Loading

0 comments on commit 56027ae

Please sign in to comment.