Skip to content

Commit 8884484

Browse files
committed
Added - Workflow for users w/no existing projects
Added - Workflow for users w/no existing projects and checks
1 parent ab0428e commit 8884484

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ authors = [
1010
]
1111
description = "The companion package to the Rubin citizen science notebooks."
1212

13-
version = "0.4.1"
13+
version = "0.4.3"
1414
readme = "README.md"
1515
dependencies = [
1616
"panoptes_client",

src/rubin/citsci/pipeline.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ def login_to_zooniverse(self, slug_name, email):
9191
if(valid_email):
9292
self.email = email
9393
self.client = panoptes_client.Panoptes.connect(login="interactive")
94-
self.project = Project.find(slug=slug_name)
95-
self.project_id = self.project.id
94+
if slug_name is not "":
95+
self.project = Project.find(slug=slug_name)
96+
self.project_id = self.project.id
97+
print("No project was provided! Run the project-template copy cell if you would like to create a new one.")
9698

9799
print("You now are logged in to the Zooniverse platform.")
98100
else:
@@ -163,6 +165,9 @@ def write_manifest_file(self, manifest, batch_dir):
163165
Returns the relative path to the manifest.csv
164166
"""
165167

168+
if self.project is "":
169+
print("Please create or specify a Zooniverse project before attempting to write a manifest file.")
170+
return
166171
manifest_filename = 'manifest.csv'
167172
with open(batch_dir + manifest_filename, 'w', newline='') as csvfile:
168173
fieldnames = list(manifest[0].keys())
@@ -318,6 +323,9 @@ def send_image_data(self, subject_set_name, zip_path, **options):
318323
set is available.
319324
"""
320325

326+
if self.project is "":
327+
print("Please create or specify a Zooniverse project before attempting to send image data!")
328+
return
321329
print("Send the data to Zooniverse")
322330
if len(subject_set_name) == 0:
323331
print("Please set the subject set name - did not send batch")

0 commit comments

Comments
 (0)