From e314ad759ee99148965c95a32512815ec445b6c7 Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Mon, 10 Jun 2024 12:42:51 -0700 Subject: [PATCH 1/3] Added cell to create a project from a template Added cell to create a project from a template --- 01_Introduction_to_Citsci_Pipeline.ipynb | 55 ++++++++++++++++--- 02_Send_Flipbook_Variable_Stars_Imaging.ipynb | 34 ++++++++++-- 2 files changed, 76 insertions(+), 13 deletions(-) diff --git a/01_Introduction_to_Citsci_Pipeline.ipynb b/01_Introduction_to_Citsci_Pipeline.ipynb index 9f36d97..838887d 100644 --- a/01_Introduction_to_Citsci_Pipeline.ipynb +++ b/01_Introduction_to_Citsci_Pipeline.ipynb @@ -84,7 +84,7 @@ }, { "cell_type": "markdown", - "id": "09bfadd7-fa36-48c1-bb3b-f2c193c798fd", + "id": "b0d75d73-12d4-4663-aedd-f16d469b1f26", "metadata": { "execution": { "iopub.execute_input": "2023-09-25T18:31:03.183596Z", @@ -110,7 +110,7 @@ "\n", "If this package is already installed, make sure it is updated:\n", "```\n", - "pip install --u rubin.citsci\n", + "pip install --upgrade rubin.citsci\n", "```\n", "\n", "4. Confirm the next cell containing `from rubin.citsci import pipeline` works as expected and does not throw an error" @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "9e60062b-f301-4d6c-9e29-e67aa55b2e62", + "id": "74336c3f-65ad-488a-a414-0a94eee45664", "metadata": {}, "source": [ "### 1.2 Define functions and parameters \n", @@ -147,26 +147,57 @@ "\n", "Supply the email associated with your Zooniverse account and project slug below. \n", "\n", - "A \"slug\" is the string of your Zooniverse username and your project name without the leading forward slash, for instance: \"username/project-name\". [Click here for more details](https://www.zooniverse.org/talk/18/967061?comment=1898157&page=1).\n" + "A \"slug\" is the string of your Zooniverse username and your project name without the leading forward slash, for instance: \"username/project-name\". [Click here for more details](https://www.zooniverse.org/talk/18/967061?comment=1898157&page=1).\n", + "\n", + "**If you have __not__ yet created a Zooniverse project do not provide a `slug_name` and run the subsequent cell**" ] }, { "cell_type": "code", "execution_count": null, - "id": "0edb67a4-1508-4b90-872c-8c42e642126b", + "id": "a577e133-35ae-4e54-9ee2-727f3dce996c", "metadata": { "tags": [] }, "outputs": [], "source": [ - "email = \"beckynevin@gmail.com\"\n", - "slug_name = \"rebecca-dot-nevin/test-project\"\n", + "email = \"\"\n", + "slug_name = \"\"\n", "print(\"Loading and running utilities to establish a link with Zooniverse\")\n", "print(\"Enter your Zooniverse username followed by password below\")\n", "cit_sci_pipeline = pipeline.CitSciPipeline()\n", "cit_sci_pipeline.login_to_zooniverse(slug_name, email)" ] }, + { + "cell_type": "markdown", + "id": "081794cf-f493-4832-9c1c-6641bcd9b4ed", + "metadata": { + "execution": { + "iopub.execute_input": "2024-06-10T18:31:30.334716Z", + "iopub.status.busy": "2024-06-10T18:31:30.333633Z", + "iopub.status.idle": "2024-06-10T18:31:30.682149Z", + "shell.execute_reply": "2024-06-10T18:31:30.681257Z", + "shell.execute_reply.started": "2024-06-10T18:31:30.334679Z" + }, + "tags": [] + }, + "source": [ + "**Run the following cell if you would like to create a new Zooniverse project**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "23a9b8b6-52b9-4211-81a0-e6ceee9fd08f", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "cit_sci_pipeline.project = cit_sci_pipeline.create_new_project_from_template()" + ] + }, { "cell_type": "markdown", "id": "1cf92062-0e45-44a8-988c-010104405ab3", @@ -464,7 +495,7 @@ }, "outputs": [], "source": [ - "subject_set_name = \"final_test_01\"\n", + "subject_set_name = \"\"\n", "cit_sci_pipeline.send_image_data(subject_set_name, zip_path)" ] }, @@ -532,6 +563,14 @@ "metadata": {}, "outputs": [], "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "32ff8161-a239-46b7-88cf-5fa144c6f8b2", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/02_Send_Flipbook_Variable_Stars_Imaging.ipynb b/02_Send_Flipbook_Variable_Stars_Imaging.ipynb index 72e17cc..26e607c 100644 --- a/02_Send_Flipbook_Variable_Stars_Imaging.ipynb +++ b/02_Send_Flipbook_Variable_Stars_Imaging.ipynb @@ -101,7 +101,7 @@ }, { "cell_type": "markdown", - "id": "9735d0b1-bfb4-4b40-9021-4703255a9ad4", + "id": "f92bdc88-f17b-485a-9249-5084173595e6", "metadata": {}, "source": [ "#### Install Pipeline Package\n", @@ -118,7 +118,7 @@ "\n", "If this package is already installed, make sure it is updated:\n", "```\n", - "pip install --u rubin.citsci\n", + "pip install --upgrade rubin.citsci\n", "```\n", "\n", "4. Confirm the next cell containing `from rubin.citsci import pipeline` works as expected and does not throw an error" @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "44f9d903-511b-42a9-b9ab-0d7d26d528db", + "id": "012b5377-65fd-4a9e-bcce-729d77723b07", "metadata": {}, "source": [ "### 1.2 Define functions and parameters \n", @@ -157,13 +157,15 @@ "\n", "Supply the email associated with your Zooniverse account and project slug below.\n", "\n", - "A \"slug\" is the string of your Zooniverse username and your project name without the leading forward slash, for instance: \"username/project-name\". [Click here for more details](https://www.zooniverse.org/talk/18/967061?comment=1898157&page=1).\n" + "A \"slug\" is the string of your Zooniverse username and your project name without the leading forward slash, for instance: \"username/project-name\". [Click here for more details](https://www.zooniverse.org/talk/18/967061?comment=1898157&page=1).\n", + "\n", + "**If you have __not__ yet created a Zooniverse project do not provide a `slug_name` and run the subsequent cell**" ] }, { "cell_type": "code", "execution_count": null, - "id": "72b03aec-f204-45ac-b1d0-e66abd36e90e", + "id": "92d71bbe-9f67-4e66-924c-5f37a0e391fc", "metadata": { "tags": [] }, @@ -177,6 +179,28 @@ "cit_sci_pipeline.login_to_zooniverse(slug_name, email)" ] }, + { + "cell_type": "markdown", + "id": "2ec42020-6bcb-40eb-920b-aa815cbd7dd0", + "metadata": { + "tags": [] + }, + "source": [ + "**Run the following cell if you would like to create a new Zooniverse project**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ab36cee0-9589-4242-8674-5b543543b40b", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "cit_sci_pipeline.project = cit_sci_pipeline.create_new_project_from_template()" + ] + }, { "cell_type": "markdown", "id": "3732cb8c-dd68-452c-b74c-748785b62a99", From 6f0cf22ebfeba3fc004395fbd2504fbf3dbf4396 Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Mon, 24 Jun 2024 15:46:15 -0700 Subject: [PATCH 2/3] Updated text for creating project/template Updated text for creating project/template --- 01_Introduction_to_Citsci_Pipeline.ipynb | 6 +++--- 02_Send_Flipbook_Variable_Stars_Imaging.ipynb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/01_Introduction_to_Citsci_Pipeline.ipynb b/01_Introduction_to_Citsci_Pipeline.ipynb index 838887d..a7a42e5 100644 --- a/01_Introduction_to_Citsci_Pipeline.ipynb +++ b/01_Introduction_to_Citsci_Pipeline.ipynb @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "74336c3f-65ad-488a-a414-0a94eee45664", + "id": "d83175d3-fa20-47fa-bc91-b69b15a0f5dd", "metadata": {}, "source": [ "### 1.2 Define functions and parameters \n", @@ -149,7 +149,7 @@ "\n", "A \"slug\" is the string of your Zooniverse username and your project name without the leading forward slash, for instance: \"username/project-name\". [Click here for more details](https://www.zooniverse.org/talk/18/967061?comment=1898157&page=1).\n", "\n", - "**If you have __not__ yet created a Zooniverse project do not provide a `slug_name` and run the subsequent cell**" + "**The `rubin.citsci` package includes a method that creates a Zooniverse project from template. If you wish to use this feature, do not provide a slug_name and run the subsequent cell.**" ] }, { @@ -183,7 +183,7 @@ "tags": [] }, "source": [ - "**Run the following cell if you would like to create a new Zooniverse project**" + "**Run the following cell if you would like to create a new Zooniverse project from the Vera Rubin template**" ] }, { diff --git a/02_Send_Flipbook_Variable_Stars_Imaging.ipynb b/02_Send_Flipbook_Variable_Stars_Imaging.ipynb index 26e607c..773c955 100644 --- a/02_Send_Flipbook_Variable_Stars_Imaging.ipynb +++ b/02_Send_Flipbook_Variable_Stars_Imaging.ipynb @@ -147,7 +147,7 @@ }, { "cell_type": "markdown", - "id": "012b5377-65fd-4a9e-bcce-729d77723b07", + "id": "1727c3e0-67ae-41d5-8f0b-4e75d5666666", "metadata": {}, "source": [ "### 1.2 Define functions and parameters \n", @@ -159,7 +159,7 @@ "\n", "A \"slug\" is the string of your Zooniverse username and your project name without the leading forward slash, for instance: \"username/project-name\". [Click here for more details](https://www.zooniverse.org/talk/18/967061?comment=1898157&page=1).\n", "\n", - "**If you have __not__ yet created a Zooniverse project do not provide a `slug_name` and run the subsequent cell**" + "**The `rubin.citsci` package includes a method that creates a Zooniverse project from template. If you wish to use this feature, do not provide a slug_name and run the subsequent cell.**" ] }, { @@ -181,12 +181,12 @@ }, { "cell_type": "markdown", - "id": "2ec42020-6bcb-40eb-920b-aa815cbd7dd0", + "id": "265dbef5-74bf-4834-8d72-5f1062e6212a", "metadata": { "tags": [] }, "source": [ - "**Run the following cell if you would like to create a new Zooniverse project**" + "**Run the following cell if you would like to create a new Zooniverse project from the Vera Rubin template**" ] }, { From c7182af03f3d8bc1f5d1f1e9941d47ec78049b2f Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Mon, 24 Jun 2024 15:52:13 -0700 Subject: [PATCH 3/3] No longer using return val for template method No longer using return val from create_new_project_from_template() --- 01_Introduction_to_Citsci_Pipeline.ipynb | 2 +- 02_Send_Flipbook_Variable_Stars_Imaging.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/01_Introduction_to_Citsci_Pipeline.ipynb b/01_Introduction_to_Citsci_Pipeline.ipynb index a7a42e5..4dae2e6 100644 --- a/01_Introduction_to_Citsci_Pipeline.ipynb +++ b/01_Introduction_to_Citsci_Pipeline.ipynb @@ -195,7 +195,7 @@ }, "outputs": [], "source": [ - "cit_sci_pipeline.project = cit_sci_pipeline.create_new_project_from_template()" + "cit_sci_pipeline.create_new_project_from_template()" ] }, { diff --git a/02_Send_Flipbook_Variable_Stars_Imaging.ipynb b/02_Send_Flipbook_Variable_Stars_Imaging.ipynb index 773c955..8eb85b3 100644 --- a/02_Send_Flipbook_Variable_Stars_Imaging.ipynb +++ b/02_Send_Flipbook_Variable_Stars_Imaging.ipynb @@ -198,7 +198,7 @@ }, "outputs": [], "source": [ - "cit_sci_pipeline.project = cit_sci_pipeline.create_new_project_from_template()" + "cit_sci_pipeline.create_new_project_from_template()" ] }, {