-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from compute-tooling/email-cleanup
Email cleanup
- Loading branch information
Showing
17 changed files
with
47 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
|
||
This guide describes how to publish a model on Compute Studio. The Compute Studio framework depends on model interfaces meeting several Compute Studio criteria, and we walk you through how to meet those criteria, either by modifying your model's interface or building a new wrapper interface around your model. The great part is that you don't have to deal with any web technology to build your Compute Studio app. | ||
|
||
If you have any questions as you proceed through this guide, send Hank an email at [email protected]. | ||
If you have any questions as you proceed through this guide, send Hank an email at [email protected]. | ||
|
||
The documentation is split into three parts. | ||
The documentation is split into three parts. | ||
|
||
- The first part documents the [inputs](/publish/inputs) and [outputs](/publish/outputs/) JSON schemas that your model will need to adopt for Compute Studio to be able to generate input forms representing your model's default specification, validate user adjustments, and display model outputs. | ||
- The [second part](/publish/functions/) documents the python functions that will be used by Compute Studio to get data from and submit data to your model. | ||
- The first part documents the [inputs](/publish/inputs) and [outputs](/publish/outputs/) JSON schemas that your model will need to adopt for Compute Studio to be able to generate input forms representing your model's default specification, validate user adjustments, and display model outputs. | ||
- The [second part](/publish/functions/) documents the python functions that will be used by Compute Studio to get data from and submit data to your model. | ||
- The third part is a [publish form](https://compute.studio/publish) that asks you to provide a title and overview for your new Compute Studio app, code snippets for the three python functions, and information describing your app's resource requirements and installation directions. If you would like to see a publishing template that has already been completed, you can view the Matchups template [here](https://compute.studio/hdoupe/Matchups/detail). | ||
|
||
Once you've submitted the publishing form, Hank will review it and get back to you within 24 hours to inform you whether the model is ready to be published or if there are criteria that have not been satisfied. Your model will be deployed to Compute Studio once it has met all of the critera. You will have the opportunity to test it out after it has been deployed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
|
||
This guide describes how to publish a model on Compute Studio. The Compute Studio framework depends on model interfaces meeting several Compute Studio criteria, and we walk you through how to meet those criteria, either by modifying your model's interface or building a new wrapper interface around your model. The great part is that you don't have to deal with any web technology to build your Compute Studio app. | ||
|
||
If you have any questions as you proceed through this guide, send Hank an email at [email protected]. | ||
If you have any questions as you proceed through this guide, send Hank an email at [email protected]. | ||
|
||
The documentation is split into three parts. The [first part](IOSCHEMA.md) documents the inputs and outputs JSON schemas that your model will need to adopt for Compute Studio to be able to generate input forms representing your model's default specification, validate user adjustments, and display model outputs. The [second part](ENDPOINTS.md) documents the python functions that will be used by Compute Studio to get data from and submit data to your model. The third part is a [publish form](https://www.compute.studio/publish) that asks you to provide a title and overview for your new Compute Studio app, code snippets for the three python functions, and information describing your app's resource requirements and installation directions. If you would like to see a publishing template that has already been completed, you can view the Matchups template [here](https://www.compute.studio/hdoupe/Matchups/detail). | ||
|
||
Once you've submitted the publishing form, Hank will review it and get back to you within 24 hours to inform you whether the model is ready to be published or if there are criteria that have not been satisfied. Your model will be deployed to Compute Studio once it has met all of the critera. You will have the opportunity to test it out after it has been deployed. | ||
|
||
For those who are interested in a more detailed explanation of the additional steps we take to publish your model on Compute Studio, feel free to checkout the [Technical Publishing Guide](technical/TECHNICALPUBLISH.md), and, since Compute Studio is an open-source website, you can even follow along. | ||
For those who are interested in a more detailed explanation of the additional steps we take to publish your model on Compute Studio, feel free to checkout the [Technical Publishing Guide](technical/TECHNICALPUBLISH.md), and, since Compute Studio is an open-source website, you can even follow along. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ export default class ErrorBoundary extends React.Component { | |
issue | ||
</a>{" "} | ||
in the Compute Studio source code repository or{" "} | ||
<a href="mailto:[email protected]">emailing Hank</a>. | ||
<a href="mailto:[email protected]">emailing Hank</a>. | ||
</Card.Text> | ||
</Card.Body> | ||
</Card> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ const specialRequests = ( | |
<div> | ||
<p> | ||
You may contact the Compute Studio admin at | ||
<a href="mailto:[email protected]"> [email protected]</a> to | ||
<a href="mailto:[email protected]"> [email protected]</a> to | ||
discuss: | ||
</p> | ||
<ul> | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
<div class="card card-body card-outer"> | ||
<h1 class="card-title text-center">There was an error with your simulation.</h1> | ||
<p class="lead">Compute Studio developers have already been notified about this failure. You are welcome to email me at <a href="mailto:[email protected]">[email protected]</a> if you would like to get in touch about this error.</p> | ||
<p class="lead">Compute Studio developers have already been notified about this failure. You are welcome to email me at <a href="mailto:[email protected]">[email protected]</a> if you would like to get in touch about this error.</p> | ||
{% include 'comp/diagnostic_collapse.html' %} | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
<div class="card card-body card-outer"> | ||
<h1 class="card-title text-center">Your calculation failed. You may re-enter your parameters and try again.</h1> | ||
<p class="lead">Compute Studio developers have already been notified about this failure. You are welcome to email me at <a href="mailto:[email protected]">[email protected]</a> if you would like to get in touch about this error.</p> | ||
<p class="lead">Compute Studio developers have already been notified about this failure. You are welcome to email me at <a href="mailto:[email protected]">[email protected]</a> if you would like to get in touch about this error.</p> | ||
{% include 'comp/diagnostic_collapse.html' %} | ||
</div> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,11 @@ | |
|
||
def invoice_payment_failed(event, link="test"): | ||
print("processing invoice.payment_failed event...") | ||
print("sending mail...") | ||
user = event.customer.user | ||
if hasattr(user, "email"): | ||
target_email = user.email | ||
else: | ||
target_email = "[email protected]" | ||
send_mail( | ||
"Your Payment Failed", | ||
f"Please pay the invoice at: {link}", | ||
"[email protected]", | ||
[target_email], | ||
"Compute Studio", | ||
"Payment failed", | ||
"Compute Studio <[email protected]>", | ||
["[email protected]"], | ||
fail_silently=False, | ||
) | ||
|
||
|
@@ -33,9 +27,9 @@ def customer_created(event): | |
print("processing customer.created event...") | ||
customer = Customer.objects.get(stripe_id=event.data["object"]["id"]) | ||
send_mail( | ||
"Welcome to Compute Studio", | ||
"Thanks for joining!", | ||
"[email protected]", | ||
"Compute Studio", | ||
"Your payment method was set successfully! Please write back if you have any questions.", | ||
"Compute Studio <[email protected]>", | ||
[customer.user.email], | ||
fail_silently=False, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,8 +127,8 @@ def post(self, request, *args, **kwargs): | |
f"{ae.traceback}\n user:{request.user.username}\n " | ||
f"project: {project.app_url}." | ||
), | ||
"[email protected]", | ||
["[email protected]"], | ||
"[email protected]", | ||
["[email protected]"], | ||
fail_silently=True, | ||
) | ||
# Http 401 exception if mail credentials are not set up. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,8 +197,8 @@ def fail(self, model_pk, username, title): | |
send_mail( | ||
f"Compute Studio Sim fail", | ||
f"An error has occurred at {username}/{title}/{model_pk}", | ||
"[email protected]", | ||
["[email protected]"], | ||
"[email protected]", | ||
["[email protected]"], | ||
fail_silently=True, | ||
) | ||
# Http 401 exception if mail credentials are not set up. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,8 @@ def put(self, request, *args, **kwargs): | |
f"the next 24 hours. Check the status of the update at " | ||
f"{status_url}." | ||
), | ||
"[email protected]", | ||
list({request.user.email, "[email protected]"}), | ||
"[email protected]", | ||
list({request.user.email, "[email protected]"}), | ||
fail_silently=False, | ||
) | ||
# Http 401 exception if mail credentials are not set up. | ||
|
@@ -122,8 +122,8 @@ def post(self, request, *args, **kwargs): | |
f"the next 24 hours. Check the status of the submission at " | ||
f"{status_url}." | ||
), | ||
"[email protected]", | ||
list({request.user.email, "[email protected]"}), | ||
"[email protected]", | ||
list({request.user.email, "[email protected]"}), | ||
fail_silently=False, | ||
) | ||
# Http 401 exception if mail credentials are not set up. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,8 +78,8 @@ def save(self, commit=True): | |
f"from Compute Studio. We value your feedback. Please let us know why " | ||
f"you unsubscribed and how we can win you back in the future." | ||
), | ||
"[email protected]", | ||
set([user.email, "[email protected]"]), | ||
"[email protected]", | ||
set([user.email, "[email protected]"]), | ||
fail_silently=True, | ||
) | ||
return user | ||
|
@@ -101,8 +101,8 @@ def save(self, commit=True): | |
f"mistake, please let us know why you deleted your account " | ||
f"and how we can win you back in the future." | ||
), | ||
"[email protected]", | ||
set([user.email, "[email protected]"]), | ||
"[email protected]", | ||
set([user.email, "[email protected]"]), | ||
fail_silently=True, | ||
) | ||
return user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ def create_profile_from_user(user): | |
f"questions or there is anything else we " | ||
f"can do to help you get up and running." | ||
), | ||
from_email="[email protected]", | ||
from_email="[email protected]", | ||
to=[user.email], | ||
bcc=["[email protected]"], | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,8 +18,7 @@ | |
|
||
WEBAPP_VERSION = "0.1.0" | ||
|
||
ADMINS = [("Hank", "[email protected]")] | ||
SERVER_EMAIL = "[email protected]" | ||
ADMINS = [("Hank", "[email protected]")] | ||
|
||
# Quick-start development settings - unsuitable for production | ||
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ | ||
|
@@ -75,6 +74,7 @@ def get_salt(env_var, dev_value): | |
"allauth.account", | ||
"rest_auth.registration", | ||
"allauth.socialaccount", | ||
"anymail", | ||
# 'allauth.socialaccount.providers.github', # new | ||
] | ||
|
||
|
@@ -182,5 +182,11 @@ def get_salt(env_var, dev_value): | |
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] | ||
|
||
|
||
EMAIL_BACKEND = "sgbackend.SendGridBackend" | ||
SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY", "dne") | ||
ANYMAIL = { | ||
# (exact settings here depend on your ESP...) | ||
"MAILGUN_API_KEY": os.environ.get("MAILGUN_API_KEY"), | ||
"MAILGUN_SENDER_DOMAIN": "mg.compute.studio", # your Mailgun domain, if needed | ||
} | ||
EMAIL_BACKEND = "anymail.backends.mailgun.EmailBackend" | ||
DEFAULT_FROM_EMAIL = "[email protected]" | ||
SERVER_EMAIL = "[email protected]" |