Skip to content

Commit

Permalink
fix: update readme and template
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Oct 18, 2022
1 parent 017eb1d commit 13cb2b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 75 deletions.
78 changes: 7 additions & 71 deletions generate_readme.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
"execution_count": null,
"id": "sitting-directory",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:31.599314Z",
"iopub.status.busy": "2022-10-18T12:11:31.598957Z",
"iopub.status.idle": "2022-10-18T12:11:35.562574Z",
"shell.execute_reply": "2022-10-18T12:11:35.561344Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -84,12 +78,6 @@
"execution_count": null,
"id": "guided-edgar",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:35.568347Z",
"iopub.status.busy": "2022-10-18T12:11:35.567345Z",
"iopub.status.idle": "2022-10-18T12:11:35.578172Z",
"shell.execute_reply": "2022-10-18T12:11:35.577178Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -126,12 +114,6 @@
"execution_count": null,
"id": "36c9011e-5f51-4779-8062-a627503100e1",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:35.582600Z",
"iopub.status.busy": "2022-10-18T12:11:35.582185Z",
"iopub.status.idle": "2022-10-18T12:11:36.094330Z",
"shell.execute_reply": "2022-10-18T12:11:36.093231Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -190,12 +172,6 @@
"execution_count": null,
"id": "abb4dd05-cc19-4b8a-b65d-b5a509425ed8",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:36.099314Z",
"iopub.status.busy": "2022-10-18T12:11:36.098601Z",
"iopub.status.idle": "2022-10-18T12:11:36.104683Z",
"shell.execute_reply": "2022-10-18T12:11:36.103475Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -223,21 +199,16 @@
"execution_count": null,
"id": "60f09f7c-1930-4c6b-92d0-02676447e008",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:36.109317Z",
"iopub.status.busy": "2022-10-18T12:11:36.108900Z",
"iopub.status.idle": "2022-10-18T12:11:36.114618Z",
"shell.execute_reply": "2022-10-18T12:11:36.113877Z"
},
"tags": []
},
"outputs": [],
"source": [
"def get_open_button(download_link):\n",
" return f\"\"\"<a href=\"{download_link}\" target=\"_parent\"><img src=\"{naas_logo}\"/></a><br><br><a href=\"{template_request}\">💡 Template request</a> | <a href=\"{bug_report}\">🚨 Bug report</a>\"\"\"\n",
"def get_open_button(download_link, title_url):\n",
" return f\"\"\"<a href=\"{download_link}\" target=\"_parent\"><img src=\"{naas_logo}\"/></a><br><br><a href=\"{template_request}\">💡 Template request</a> | <a href=\"{bug_report}{title_url}:+Error+short+description\">🚨 Bug report</a>\"\"\"\n",
"\n",
"def get_title(folder_nice, file_nice, download_link):\n",
" return f\"\"\"# {folder_nice} - {file_nice}\\n{get_open_button(download_link)}\"\"\"\n",
" title_url = (f\"{folder_nice} - {file_nice}\").replace(\" \", \"+\")\n",
" return f\"\"\"# {folder_nice} - {file_nice}\\n{get_open_button(download_link, title_url)}\"\"\"\n",
"\n",
"def get_tags(text):\n",
" result = []\n",
Expand All @@ -261,12 +232,6 @@
"execution_count": null,
"id": "shared-savannah",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:36.118942Z",
"iopub.status.busy": "2022-10-18T12:11:36.118266Z",
"iopub.status.idle": "2022-10-18T12:11:36.125260Z",
"shell.execute_reply": "2022-10-18T12:11:36.124535Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -323,12 +288,6 @@
"execution_count": null,
"id": "devoted-syracuse",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:36.129319Z",
"iopub.status.busy": "2022-10-18T12:11:36.129060Z",
"iopub.status.idle": "2022-10-18T12:11:36.137363Z",
"shell.execute_reply": "2022-10-18T12:11:36.136655Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -370,7 +329,8 @@
" # Get the name of the Notebook and the redirect to github link\n",
" nb_redirect = f\"[{file_nice}]({github_url}/{folder_url}/{file_url})\"\n",
" # Get the open in naas format\n",
" open_button = get_open_button(dl_url)\n",
" title_url = (f\"{folder_nice} - {file_nice}\").replace(\" \", \"+\")\n",
" open_button = get_open_button(dl_url, title_url)\n",
" # For the actual file, put the nnotebook name and the gihub link for the return in markdown\n",
" md += f\"{subtitle_sep} {nb_redirect}\\n\"\n",
" json_templates.append({\n",
Expand All @@ -396,12 +356,6 @@
"execution_count": null,
"id": "viral-cause",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:36.141212Z",
"iopub.status.busy": "2022-10-18T12:11:36.140928Z",
"iopub.status.idle": "2022-10-18T12:11:38.795612Z",
"shell.execute_reply": "2022-10-18T12:11:38.794132Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -458,12 +412,6 @@
"execution_count": null,
"id": "broadband-rachel",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:38.800376Z",
"iopub.status.busy": "2022-10-18T12:11:38.800054Z",
"iopub.status.idle": "2022-10-18T12:11:39.429925Z",
"shell.execute_reply": "2022-10-18T12:11:39.428986Z"
},
"tags": []
},
"outputs": [],
Expand All @@ -484,12 +432,6 @@
"execution_count": null,
"id": "younger-consensus",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:39.438339Z",
"iopub.status.busy": "2022-10-18T12:11:39.436440Z",
"iopub.status.idle": "2022-10-18T12:11:39.444693Z",
"shell.execute_reply": "2022-10-18T12:11:39.443787Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -519,12 +461,6 @@
"execution_count": null,
"id": "2a95cba3-027c-4a57-8bfa-2ee1e9053bb7",
"metadata": {
"execution": {
"iopub.execute_input": "2022-10-18T12:11:39.448883Z",
"iopub.status.busy": "2022-10-18T12:11:39.448345Z",
"iopub.status.idle": "2022-10-18T12:11:39.460002Z",
"shell.execute_reply": "2022-10-18T12:11:39.459253Z"
},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -561,7 +497,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.9.6"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
8 changes: 4 additions & 4 deletions template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"# Tool/Folder - Action of the notebook\n",
"<a href=\"https://app.naas.ai/user-redirect/naas/downloader?url=https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/template.ipynb\" target=\"_parent\">\n",
"<img src=\"https://img.shields.io/badge/-Open%20in%20Naas-success?labelColor=000000&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTAyNHB4IiBoZWlnaHQ9IjEwMjRweCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIj4KIDwhLS0gR2VuZXJhdGVkIGJ5IFBpeGVsbWF0b3IgUHJvIDIuMC41IC0tPgogPGRlZnM+CiAgPHRleHQgaWQ9InN0cmluZyIgdHJhbnNmb3JtPSJtYXRyaXgoMS4wIDAuMCAwLjAgMS4wIDIyOC4wIDU0LjUpIiBmb250LWZhbWlseT0iQ29tZm9ydGFhLVJlZ3VsYXIsIENvbWZvcnRhYSIgZm9udC1zaXplPSI4MDAiIHRleHQtZGVjb3JhdGlvbj0ibm9uZSIgZmlsbD0iI2ZmZmZmZiIgeD0iMS4xOTk5OTk5OTk5OTk5ODg2IiB5PSI3MDUuMCI+bjwvdGV4dD4KIDwvZGVmcz4KIDx1c2UgaWQ9Im4iIHhsaW5rOmhyZWY9IiNzdHJpbmciLz4KPC9zdmc+Cg==\"/>\n",
"</a>"
"</a><br><br><a href=\"https://github.com/jupyter-naas/awesome-notebooks/issues/new?assignees=&labels=&template=template-request.md&title=Tool+-+Action+of+the+notebook+\">💡 Template request</a> | <a href=\"https://github.com/jupyter-naas/awesome-notebooks/issues/new?assignees=&labels=&template=bug_report.md&title=[ERROR]+Tool+/+Folder+Action+of+the+notebook+\">🚨 Bug report</a>"
]
},
{
Expand All @@ -53,7 +53,7 @@
"id": "31ea7cdb-e10d-43fc-b026-f69249a59736",
"metadata": {},
"source": [
"Notebook description"
"**Description:** This notebook ...."
]
},
{
Expand All @@ -72,7 +72,7 @@
"id": "numeric-mediterranean",
"metadata": {},
"source": [
"### Import library"
"### Import libraries"
]
},
{
Expand Down Expand Up @@ -242,7 +242,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.9.6"
},
"papermill": {
"default_parameters": {},
Expand Down

0 comments on commit 13cb2b5

Please sign in to comment.