Welcome to Prophecy Practicum’s documentation!¶
user¶
A user participating in the Prophecy Practicum.
-
class
prophecypracticum.engine.user.User(name: str, email: str, my_id: int = 0, supplicant_id: int = 0, prophet_id: int = 0, prophecy_given: bool = False, prophecy_received: bool = False, prophecy_received_and_interacted: bool = False)¶ Bases:
objectThe user participating in the Prophecy Practicum.
- Parameters
self.name – Name of the user participating in the practicum.
self.email – Email address of the user participating in the practicum.
self.my_id – The users ID in the database.
self.supplicant_id – The ID of this prophet’s supplicant
self.prophet_id – The ID of this supplicant’s prophet.
self.prophecy_given – A boolean that stores whether the prophecy has been recorded.
self.prophecy_received – Marked True when prophecy is ready to read.
self.prophecy_received_and_interacted – A boolean that stores whether this user has interacted with the prophecy they received.
self.this_week_prophecy – This week’s prophecy.
-
change_email_address(new_email: str) → None¶ Allow the user to update their email address.
- Parameters
new_email – The new email address to associate with the user.
-
change_name(new_name: str) → None¶ Allow the user to update their name.
- Parameters
new_name – The new name to associate with this user.
-
create_prophecy(prophetic_words: str = '', photo_location: str = '') → None¶ Create a prophecy object.
Should also set self.prophecy_given to True.
- Parameters
prophetic_words – The text of the prophecy.
photo_location – The location of a photo prophecy.
-
email: str = None¶
-
get_email_address() → str¶ Return user’s email address.
- Returns
The user’s email address.
-
get_prophecy() → prophecypracticum.engine.prophecy.Prophecy¶ Return a prophecy object.
Need to change to get previous prophecies, but how to do that depends on how many weeks will be kept.
- Returns
A prophecy object.
-
get_supplicant_id() → int¶ Returns the supplicant ID.
- Returns
Supplicant ID
-
get_user_id() → int¶ Return the user ID
- Returns
The user’s ID
-
is_practicum_complete() → bool¶ Determine whether the practicum is complete.
- Returns
True if completed and false if any step is incomplete.
-
my_id: int = None¶
-
name: str = None¶
-
prophecy_given: bool = None¶
-
prophecy_ready_to_read() → None¶ Let the user know there is a prophecy to read
-
prophecy_received: bool = None¶
-
prophecy_received_and_interacted: bool = None¶
-
prophet_id: int = None¶
-
set_supplicant_id(supplicant_id: int) → None¶ Sets the supplicant id number.
- Parameters
supplicant_id – The id number for the supplicant.
-
set_user_id(user_id: int) → None¶ Set this user’s ID
- Parameters
user_id – The ID that will identify this user.
-
supplicant_id: int = None¶
prophecy¶
A prophecy.
-
class
prophecypracticum.engine.prophecy.Prophecy(date_of_prophecy: datetime.datetime, prophecy_text: str = '', prophecy_photo: str = '', feedback_rating: int = 0, feedback_text: str = '')¶ Bases:
objectThe Prophecy Object.
feedback_rating is initialized to 0 as a check of whether feedback has been input.
- Parameters
self.date_of_prophecy – Date and time prophecy is created.
self.prophecy_text – If the prophecy is text, it is stored here.
self.prophecy_photo – If the prophecy is a photo, this is the path to find the photo.
self.feedback_rating – Rating on a scale of 1-5 of how relevant the prophecy was.
self.feedback_text – If feedback was given on the prophecy, store it as text here.
-
date_of_prophecy: datetime = None¶
-
feedback_rating: int = None¶
-
feedback_text: str = None¶
-
get_feedback_rating() → int¶ Return the feedback rating.
- Returns
The feedback rating.
-
get_feedback_text() → str¶ Return feedback text.
- Returns
Feedback text.
-
get_photo_location() → str¶ Return photo location on disk.
- Returns
The location of the photo on the disk.
-
get_text_prophecy() → str¶ Return prophecy text.
- Returns
The text of the prophecy
-
modify_photo_prophecy(new_photo_location: str) → None¶ Point to a new photo prophecy location.
- Parameters
new_photo_location – The new location for the photo.
-
modify_text_prophecy(new_prophecy: str) → None¶ Modify the text of the prophecy.
- Parameters
new_prophecy – The text of the new prophecy.
-
prophecy_photo: str = None¶
-
prophecy_text: str = None¶
-
set_feedback_rating(rating: int) → None¶ Set feedback rating for the prophecy.
- Parameters
rating – A 1-5 number representing the rating
-
set_feedback_text(new_feedback_text: str) → None¶ Set feedback text.
- Parameters
new_feedback_text – Feedback text for the prophecy.