dpinney / omf

The Open Modeling Framework for smart grid cost-benefit analysis.
https://omf.coop
GNU General Public License v2.0
112 stars 60 forks source link

Email user when model is done running. #191

Closed dpinney closed 9 years ago

dpinney commented 10 years ago

TODO

Only for long-running models like Gridlab.

dpinney commented 9 years ago

Assigned Mannan.

mannanj commented 9 years ago

Implementation of this is ready for testing in production.

mannanj commented 9 years ago

Version without checkbox functionality committed. It emails the user by default right now. I'll commit a version with checkbox selection asap.

dpinney commented 9 years ago

Could we move the checkbox up with the other shortInput fields (yellow box in attached)? And not have the line break after zip code?

untitled

dpinney commented 9 years ago

Email fine where it is. Mannan is going to close up the space marked in yellow.

mannanj commented 9 years ago

Changes done, and committed.

mannanj commented 9 years ago

Shouldn't be closed yet, still have to implement checkbox functionality.

mannanj commented 9 years ago

Now commited.

Looks like this: emailselection

dpinney commented 9 years ago

Nice. Let's leave this open until we confirm the emailing functionality works.

dpinney commented 9 years ago

Got a problem with the omf import and this new code.

If I make a file like:

import omf
print 'yo'

And run I get the following error:

Traceback (most recent call last):
  File "/Users/dpinney/Desktop/test.py", line 1, in <module>
    import omf
  File "/Users/dpinney/Dropbox/omf/omf/__init__.py", line 14, in <module>
    import models
  File "/Users/dpinney/Dropbox/omf/omf/models/__init__.py", line 14, in <module>
    for name in __all__: exec('import ' + name)
  File "<string>", line 1, in <module>
  File "/Users/dpinney/Dropbox/omf/omf/models/gridlabMulti.py", line 18, in <module>
    from web import send_link
  File "/Users/dpinney/Dropbox/omf/omf/web.py", line 8, in <module>
    import models, feeder, milToGridlab
  File "/Users/dpinney/Dropbox/omf/omf/models/__init__.py", line 14, in <module>
    for name in __all__: exec('import ' + name)
  File "<string>", line 1, in <module>
  File "/Users/dpinney/Dropbox/omf/omf/models/gridlabMulti.py", line 18, in <module>
    from web import send_link
ImportError: cannot import name send_link
[Finished in 0.7s with exit code 1]
[shell_cmd: python -u "/Users/dpinney/Desktop/test.py"]
[dir: /Users/dpinney/Desktop]
[path: /usr/bin:/bin:/usr/sbin:/sbin]

Maybe a circular import?

mannanj commented 9 years ago

Could be; I installed the various packages & dependencies seperately so I can't import omf (or just not sure how to if I can). Can it be built on Linux so I can test this?

dpinney commented 9 years ago

I can reproduce the issue on Linux with the same script as above. This used to work.

dpinney commented 9 years ago

I fixed the circular import issue. Commit 70dd2ce028e79c5a7d2b570b1ef5d5abcf736216

Documentation: http://stackoverflow.com/a/22210807

mannanj commented 9 years ago

Great. Thanks for the reference.

mannanj commented 9 years ago

Assigned to david to test in production

dpinney commented 9 years ago

This works perfectly in production. Closing the issue.